From 66b374dc1dc016c4e6cfd4305309db0f7c0fea95 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Sat, 17 Oct 2026 14:28:14 +0200 Subject: [PATCH 01/11] Make merge --- .scripts/plot.py | 2 +- CONTRIBUTING-CORE.rst | 6 +- CONTRIBUTING.rst | 4 +- Makefile | 4 +- README.rst | 2 +- about.po | 10 +- bugs.po | 74 +- c-api/allocation.po | 63 +- c-api/apiabiversion.po | 125 +- c-api/arg.po | 382 +- c-api/buffer.po | 232 +- c-api/bytearray.po | 36 +- c-api/bytes.po | 390 +- c-api/call.po | 28 +- c-api/capsule.po | 66 +- c-api/cell.po | 5 +- c-api/code.po | 164 +- c-api/codec.po | 19 +- c-api/complex.po | 307 +- c-api/concrete.po | 6 +- c-api/conversion.po | 158 +- c-api/curses.po | 146 + c-api/datetime.po | 172 +- c-api/descriptor.po | 231 +- c-api/dict.po | 443 +- c-api/exceptions.po | 657 ++- c-api/extension-modules.po | 321 +- c-api/file.po | 74 +- c-api/float.po | 214 +- c-api/frame.po | 128 +- c-api/function.po | 63 +- c-api/gcsupport.po | 288 +- c-api/gen.po | 63 +- c-api/hash.po | 119 +- c-api/import.po | 227 +- c-api/index.po | 5 +- c-api/init.po | 3094 +---------- c-api/init_config.po | 827 +-- c-api/interp-lifecycle.po | 1208 +++++ c-api/intro.po | 747 ++- c-api/iter.po | 4 +- c-api/iterator.po | 79 +- c-api/lifecycle.po | 7 +- c-api/list.po | 76 +- c-api/long.po | 361 +- c-api/mapping.po | 12 +- c-api/marshal.po | 4 +- c-api/memory.po | 538 +- c-api/memoryview.po | 26 +- c-api/module.po | 989 +++- c-api/monitoring.po | 8 +- c-api/object.po | 298 +- c-api/perfmaps.po | 102 +- c-api/picklebuffer.po | 94 + c-api/profiling.po | 304 ++ c-api/refcounting.po | 4 +- c-api/sentinel.po | 61 + c-api/sequence.po | 28 +- c-api/set.po | 96 +- c-api/slots.po | 251 + c-api/stable.po | 714 ++- c-api/structures.po | 462 +- c-api/subinterpreters.po | 554 ++ c-api/synchronization.po | 344 ++ c-api/sys.po | 216 +- c-api/threads.po | 1185 +++++ c-api/tls.po | 192 + c-api/tuple.po | 123 +- c-api/type.po | 856 ++- c-api/typeobj.po | 1097 ++-- c-api/unicode.po | 886 ++-- c-api/veryhigh.po | 247 +- c-api/weakref.po | 105 +- deprecations/c-api-pending-removal-in-3.15.po | 106 +- deprecations/c-api-pending-removal-in-3.16.po | 3 +- deprecations/c-api-pending-removal-in-3.18.po | 3 +- deprecations/c-api-pending-removal-in-3.19.po | 26 + deprecations/c-api-pending-removal-in-3.20.po | 44 + deprecations/index.po | 694 ++- deprecations/pending-removal-in-3.13.po | 41 +- deprecations/pending-removal-in-3.15.po | 85 +- deprecations/pending-removal-in-3.17.po | 55 +- deprecations/pending-removal-in-3.18.po | 52 + deprecations/pending-removal-in-3.19.po | 64 +- deprecations/pending-removal-in-3.20.po | 172 + deprecations/pending-removal-in-future.po | 138 +- deprecations/soft-deprecations.po | 52 + extending/extending.po | 1224 ++--- extending/first-extension-module.po | 727 +++ extending/index.po | 121 +- extending/newtypes.po | 22 +- extending/newtypes_tutorial.po | 248 +- extending/windows.po | 40 +- faq/design.po | 143 +- faq/general.po | 5 +- faq/programming.po | 961 ++-- glossary.po | 1244 +++-- howto/a-conceptual-overview-of-asyncio.po | 144 +- howto/abi3t-migration.po | 766 +++ howto/annotations.po | 4 +- howto/curses.po | 162 +- howto/enum.po | 417 +- howto/free-threading-extensions.po | 268 +- howto/free-threading-python.po | 351 +- howto/functional.po | 5 +- howto/index.po | 63 +- howto/instrumentation.po | 118 +- howto/ipaddress.po | 4 +- howto/isolating-extensions.po | 8 +- howto/logging-cookbook.po | 408 +- howto/logging.po | 4 +- howto/perf_profiling.po | 154 +- howto/regex.po | 632 ++- howto/remote_debugging.po | 348 +- howto/sockets.po | 4 +- howto/unicode.po | 132 +- howto/urllib2.po | 8 +- improve-page-nojs.po | 54 + improve-page.po | 71 + installing/index.po | 299 +- library/__future__.po | 16 +- library/_thread.po | 82 +- library/abc.po | 98 +- library/aifc.po | 3 +- library/annotationlib.po | 239 +- library/argparse.po | 760 +-- library/array.po | 225 +- library/ast.po | 645 +-- library/asynchat.po | 3 +- library/asyncio-dev.po | 130 +- library/asyncio-eventloop.po | 785 +-- library/asyncio-future.po | 85 +- library/asyncio-graph.po | 3 +- library/asyncio-queue.po | 41 +- library/asyncio-subprocess.po | 148 +- library/asyncio-task.po | 508 +- library/asyncio.po | 25 +- library/asyncore.po | 3 +- library/atexit.po | 52 +- library/audioop.po | 3 +- library/base64.po | 510 +- library/bdb.po | 157 +- library/binascii.po | 418 +- library/bisect.po | 75 +- library/bz2.po | 162 +- library/calendar.po | 310 +- library/cgi.po | 3 +- library/cgitb.po | 3 +- library/chunk.po | 3 +- library/cmath.po | 15 +- library/cmd.po | 95 +- library/cmdline.po | 64 +- library/cmdlinelibs.po | 3 +- library/codecs.po | 1206 ++--- library/codeop.po | 36 +- library/collections.abc.po | 272 +- library/collections.po | 495 +- library/colorsys.po | 33 +- library/compression.po | 3 +- library/compression.zstd.po | 342 +- library/concurrency.po | 4 +- library/concurrent.futures.po | 254 +- library/concurrent.interpreters.po | 179 +- library/configparser.po | 414 +- library/constants.po | 10 +- library/contextlib.po | 306 +- library/contextvars.po | 145 +- library/copy.po | 43 +- library/copyreg.po | 5 +- library/crypt.po | 3 +- library/csv.po | 233 +- library/ctypes.po | 2217 ++++---- library/curses.ascii.po | 136 +- library/curses.panel.po | 48 +- library/curses.po | 558 +- library/dataclasses.po | 277 +- library/datetime.po | 1933 ++++--- library/dbm.po | 297 +- library/debug.po | 5 +- library/decimal.po | 788 +-- library/dialog.po | 130 +- library/difflib.po | 287 +- library/dis.po | 237 +- library/distutils.po | 3 +- library/doctest.po | 743 +-- library/email.charset.po | 8 +- library/email.contentmanager.po | 84 +- library/email.encoders.po | 6 +- library/email.errors.po | 5 +- library/email.generator.po | 5 +- library/email.header.po | 13 +- library/email.headerregistry.po | 191 +- library/email.iterators.po | 9 +- library/email.message.po | 221 +- library/email.parser.po | 11 +- library/email.po | 62 +- library/email.policy.po | 249 +- library/email.utils.po | 5 +- library/ensurepip.po | 79 +- library/enum.po | 544 +- library/exceptions.po | 324 +- library/faulthandler.po | 111 +- library/fcntl.po | 120 +- library/filecmp.po | 88 +- library/fileinput.po | 86 +- library/filesys.po | 14 +- library/fnmatch.po | 11 +- library/fractions.po | 77 +- library/ftplib.po | 43 +- library/functions.po | 1252 +++-- library/functools.po | 191 +- library/gc.po | 321 +- library/getpass.po | 75 +- library/gettext.po | 250 +- library/glob.po | 93 +- library/graphlib.po | 5 +- library/grp.po | 54 +- library/gzip.po | 166 +- library/hashlib.po | 331 +- library/heapq.po | 161 +- library/hmac.po | 54 +- library/html.entities.po | 18 +- library/html.parser.po | 133 +- library/http.client.po | 238 +- library/http.cookiejar.po | 339 +- library/http.cookies.po | 122 +- library/http.po | 7 +- library/http.server.po | 264 +- library/idle.po | 631 +-- library/imaplib.po | 246 +- library/imghdr.po | 3 +- library/imp.po | 3 +- library/importlib.metadata.po | 430 +- library/importlib.po | 941 ++-- library/importlib.resources.abc.po | 52 +- library/importlib.resources.po | 99 +- library/inspect.po | 990 ++-- library/io.po | 620 ++- library/ipaddress.po | 335 +- library/itertools.po | 435 +- library/json.po | 386 +- library/linecache.po | 34 +- library/locale.po | 367 +- library/logging.config.po | 312 +- library/logging.handlers.po | 632 +-- library/logging.po | 774 +-- library/lzma.po | 226 +- library/mailbox.po | 650 +-- library/mailcap.po | 6 +- library/marshal.po | 110 +- library/math.integer.po | 113 + library/math.po | 943 ++-- library/mimetypes.po | 129 +- library/mmap.po | 196 +- library/modulefinder.po | 26 +- library/msilib.po | 3 +- library/msvcrt.po | 100 +- library/multiprocessing.po | 1411 ++--- library/netrc.po | 38 +- library/nis.po | 3 +- library/nntplib.po | 3 +- library/operator.po | 474 +- library/optparse.po | 1220 ++--- library/os.path.po | 223 +- library/os.po | 2606 +++++---- library/ossaudiodev.po | 3 +- library/pathlib.po | 650 +-- library/pdb.po | 305 +- library/pickle.po | 583 ++- library/pickletools.po | 20 +- library/pipes.po | 3 +- library/pkgutil.po | 89 +- library/platform.po | 213 +- library/plistlib.po | 95 +- library/poplib.po | 100 +- library/posix.po | 43 +- library/pprint.po | 115 +- library/profile.po | 879 +--- library/profiling.po | 435 ++ library/profiling.sampling.po | 2374 +++++++++ library/profiling.tracing.po | 412 ++ library/pstats.po | 561 ++ library/pty.po | 55 +- library/pwd.po | 72 +- library/py_compile.po | 59 +- library/pyclbr.po | 54 +- library/pydoc.po | 44 +- library/pyexpat.po | 497 +- library/queue.po | 104 +- library/random.po | 54 +- library/re.po | 877 ++-- library/readline.po | 140 +- library/removed.po | 3 +- library/reprlib.po | 58 +- library/resource.po | 317 +- library/rlcompleter.po | 24 +- library/runpy.po | 106 +- library/sched.po | 48 +- library/secrets.po | 110 +- library/select.po | 599 ++- library/selectors.po | 4 +- library/shelve.po | 164 +- library/shlex.po | 162 +- library/shutil.po | 382 +- library/signal.po | 299 +- library/site.po | 421 +- library/smtpd.po | 3 +- library/smtplib.po | 309 +- library/sndhdr.po | 3 +- library/socket.po | 878 ++-- library/socketserver.po | 175 +- library/spwd.po | 3 +- library/sqlite3.po | 802 +-- library/ssl.po | 1216 +++-- library/stat.po | 196 +- library/statistics.po | 428 +- library/stdtypes.po | 3160 ++++++----- library/string.po | 259 +- library/string.templatelib.po | 54 +- library/stringprep.po | 55 +- library/struct.po | 281 +- library/subprocess.po | 669 +-- library/sunau.po | 3 +- library/superseded.po | 5 +- library/symtable.po | 161 +- library/sys.monitoring.po | 158 +- library/sys.po | 1112 ++-- library/sys_path_init.po | 59 +- library/sysconfig.po | 292 +- library/syslog.po | 58 +- library/tabnanny.po | 22 +- library/tarfile.po | 744 +-- library/telnetlib.po | 3 +- library/tempfile.po | 178 +- library/termios.po | 45 +- library/test.po | 722 +-- library/textwrap.po | 102 +- library/threading.po | 612 ++- library/threadsafety.po | 577 ++ library/time.po | 479 +- library/timeit.po | 98 +- library/tkinter.colorchooser.po | 15 +- library/tkinter.dnd.po | 43 +- library/tkinter.font.po | 75 +- library/tkinter.messagebox.po | 86 +- library/tkinter.po | 331 +- library/tkinter.scrolledtext.po | 17 +- library/tkinter.ttk.po | 857 +-- library/token.po | 103 +- library/tokenize.po | 111 +- library/tomllib.po | 117 +- library/trace.po | 18 +- library/traceback.po | 180 +- library/tracemalloc.po | 60 +- library/tty.po | 40 +- library/turtle.po | 1280 ++--- library/types.po | 97 +- library/typing.po | 1426 ++--- library/unicodedata.po | 349 +- library/unittest.mock-examples.po | 399 +- library/unittest.mock.po | 806 +-- library/unittest.po | 1243 ++--- library/urllib.error.po | 36 +- library/urllib.parse.po | 485 +- library/urllib.request.po | 558 +- library/urllib.robotparser.po | 33 +- library/uu.po | 3 +- library/uuid.po | 167 +- library/venv.po | 265 +- library/warnings.po | 225 +- library/wave.po | 290 +- library/weakref.po | 182 +- library/webbrowser.po | 228 +- library/winreg.po | 393 +- library/winsound.po | 94 +- library/wsgiref.po | 296 +- library/xdrlib.po | 3 +- library/xml.dom.minidom.po | 140 +- library/xml.dom.po | 474 +- library/xml.dom.pulldom.po | 57 +- library/xml.etree.elementtree.po | 506 +- library/xml.po | 130 +- library/xml.sax.handler.po | 224 +- library/xml.sax.po | 73 +- library/xml.sax.reader.po | 150 +- library/xml.sax.utils.po | 34 +- library/xmlrpc.client.po | 213 +- library/xmlrpc.po | 10 +- library/xmlrpc.server.po | 112 +- library/zipapp.po | 5 +- library/zipfile.po | 480 +- library/zipimport.po | 106 +- library/zlib.po | 336 +- library/zoneinfo.po | 159 +- license.po | 84 +- reference/compound_stmts.po | 728 +-- reference/datamodel.po | 1652 +++--- reference/executionmodel.po | 16 +- reference/expressions.po | 2281 +++++--- reference/grammar.po | 19 +- reference/import.po | 338 +- reference/lexical_analysis.po | 1189 +++-- reference/simple_stmts.po | 540 +- sphinx.po | 209 +- tutorial/appendix.po | 59 +- tutorial/classes.po | 83 +- tutorial/controlflow.po | 116 +- tutorial/datastructures.po | 259 +- tutorial/errors.po | 6 +- tutorial/floatingpoint.po | 96 +- tutorial/index.po | 5 +- tutorial/interpreter.po | 19 +- tutorial/introduction.po | 5 +- tutorial/stdlib.po | 41 +- tutorial/stdlib2.po | 73 +- tutorial/whatnow.po | 8 +- using/android.po | 5 +- using/cmdline.po | 585 ++- using/configure.po | 1312 +++-- using/mac.po | 174 +- using/unix.po | 112 +- using/windows.po | 1350 +++-- whatsnew/2.3.po | 6 +- whatsnew/2.5.po | 28 +- whatsnew/2.6.po | 4 +- whatsnew/2.7.po | 246 +- whatsnew/3.0.po | 4 +- whatsnew/3.10.po | 52 +- whatsnew/3.11.po | 58 +- whatsnew/3.12.po | 1285 +++-- whatsnew/3.13.po | 1204 +++-- whatsnew/3.14.po | 1977 ++++--- whatsnew/3.15.po | 4635 +++++++++++++++++ whatsnew/3.2.po | 6 +- whatsnew/3.3.po | 6 +- whatsnew/3.4.po | 14 +- whatsnew/3.6.po | 14 +- whatsnew/3.7.po | 16 +- whatsnew/3.8.po | 933 ++-- whatsnew/index.po | 4 +- 440 files changed, 80920 insertions(+), 52161 deletions(-) create mode 100644 c-api/curses.po create mode 100644 c-api/interp-lifecycle.po create mode 100644 c-api/picklebuffer.po create mode 100644 c-api/profiling.po create mode 100644 c-api/sentinel.po create mode 100644 c-api/slots.po create mode 100644 c-api/subinterpreters.po create mode 100644 c-api/synchronization.po create mode 100644 c-api/threads.po create mode 100644 c-api/tls.po create mode 100644 deprecations/c-api-pending-removal-in-3.19.po create mode 100644 deprecations/c-api-pending-removal-in-3.20.po create mode 100644 deprecations/pending-removal-in-3.18.po create mode 100644 deprecations/pending-removal-in-3.20.po create mode 100644 deprecations/soft-deprecations.po create mode 100644 extending/first-extension-module.po create mode 100644 howto/abi3t-migration.po create mode 100644 improve-page-nojs.po create mode 100644 improve-page.po create mode 100644 library/math.integer.po create mode 100644 library/profiling.po create mode 100644 library/profiling.sampling.po create mode 100644 library/profiling.tracing.po create mode 100644 library/pstats.po create mode 100644 library/threadsafety.po create mode 100644 whatsnew/3.15.po diff --git a/.scripts/plot.py b/.scripts/plot.py index 2d6722da26..f3062fff62 100644 --- a/.scripts/plot.py +++ b/.scripts/plot.py @@ -9,7 +9,7 @@ do git clean -dfqx >/dev/null git checkout -- . >/dev/null - git checkout $(git log 3.14 --after "$YEAR-$i-01" | grep ^commit | tail -n 1 | cut -d' ' -f2) >/dev/null 2>/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')" \ diff --git a/CONTRIBUTING-CORE.rst b/CONTRIBUTING-CORE.rst index 41d0f900a5..4458778519 100644 --- a/CONTRIBUTING-CORE.rst +++ b/CONTRIBUTING-CORE.rst @@ -1,11 +1,11 @@ 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 + 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 1de992927c..50679a10f7 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,7 +1,7 @@ Guide de contribution à la documentation ######################################## -.. |branch| replace:: 3.14 +.. |branch| replace:: 3.15 Prérequis @@ -220,7 +220,7 @@ lequel on travaille. Par exemple, si vous travaillez sur .. code-block:: bash - git switch -c library-sys upstream/3.14 + 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 diff --git a/Makefile b/Makefile index 89063d339f..28e2de51e5 100644 --- a/Makefile +++ b/Makefile @@ -21,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 := 5513f6a99d3dc05b93f92c740484a607ef7c0cbf +CPYTHON_CURRENT_COMMIT := 86e291e6627a6eee2912c4f6ec6848b7e4866029 LANGUAGE := fr -BRANCH := 3.14 +BRANCH := 3.15 EXCLUDED := \ whatsnew/2.?.po \ diff --git a/README.rst b/README.rst index cbc90afbf2..76c23d24f8 100644 --- a/README.rst +++ b/README.rst @@ -29,7 +29,7 @@ Vous pouvez contribuer : Consultez le `guide de style `_ de la documentation, et le -`guide de la traduction en français `_ +`guide de la traduction en français `_ pour apprendre les conventions à respecter. Le `coordinateur `_ de diff --git a/about.po b/about.po index f4883ef010..03645694e8 100644 --- a/about.po +++ b/about.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2025-10-20 00:29+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -74,17 +74,19 @@ msgid "Contributors to the Python documentation" msgstr "Contributrices et contributeurs de la documentation Python" #: about.rst:34 +#, fuzzy 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." -#: about.rst:38 +#: 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 4f77c4152b..962eb16e6a 100644 --- a/bugs.po +++ b/bugs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -30,20 +30,21 @@ 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 " +"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:`issue tracker `_ instead." +msgstr "" + +#: bugs.rst:31 msgid "" "You can also open a discussion item on our `Documentation Discourse forum " "`_." @@ -68,7 +76,7 @@ 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 issue " @@ -78,11 +86,11 @@ msgstr "" "documentation, prenez le temps d'écrire un ticket sur le dépôt `python-docs-" "theme `_." -#: bugs.rst:31 +#: bugs.rst:40 msgid "`Documentation bugs`_" msgstr "`Bogues de documentation`_" -#: bugs.rst:32 +#: bugs.rst:41 msgid "" "A list of documentation bugs that have been submitted to the Python issue " "tracker." @@ -90,18 +98,18 @@ msgstr "" "Liste des bogues de documentation soumis à l'outil de suivi des problèmes " "Python." -#: bugs.rst:34 +#: bugs.rst:43 msgid "`Issue Tracking `_" msgstr "`Outil de suivi des problèmes `_" -#: bugs.rst:35 +#: 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:37 +#: bugs.rst:46 msgid "" "`Helping with Documentation `_" @@ -109,33 +117,35 @@ msgstr "" "`Aider avec la documentation `_" -#: bugs.rst:38 +#: 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:40 +#: bugs.rst:49 +#, fuzzy msgid "" "`Documentation Translations `_" +"translations/translating/#translation-coordinators>`_" msgstr "" "`Traductions de la Documentation `_" -#: bugs.rst:41 +#: 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:47 +#: bugs.rst:56 msgid "Using the Python issue tracker" msgstr "Utilisation du gestionnaire de tickets Python" -#: bugs.rst:49 +#: 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 " @@ -148,7 +158,7 @@ msgstr "" "permettant de saisir des informations pertinentes à soumettre aux " "développeurs." -#: bugs.rst:54 +#: 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 " @@ -166,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:61 +#: 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 " @@ -178,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:66 +#: 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." @@ -187,11 +197,11 @@ msgstr "" "*New issue* dans la barre en haut pour ouvrir un nouveau formulaire de " "rapport." -#: bugs.rst:69 +#: 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:71 +#: bugs.rst:80 msgid "" "For the \"Title\" field, enter a *very* short description of the problem; " "fewer than ten words is good." @@ -199,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:74 +#: 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 " @@ -212,7 +222,7 @@ msgstr "" "plateforme matérielle et logicielle vous utilisiez (en incluant les " "informations de versions)." -#: bugs.rst:79 +#: 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 " @@ -222,7 +232,7 @@ msgstr "" "nécessaire d'entreprendre pour corriger le problème. Vous recevrez une " "notification à chaque action concernant le rapport." -#: bugs.rst:86 +#: bugs.rst:95 msgid "" "`How to Report Bugs Effectively `_" @@ -230,7 +240,7 @@ msgstr "" "`Comment signaler des bogues de manière efficace `_ (en anglais)" -#: bugs.rst:87 +#: 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." @@ -239,7 +249,7 @@ msgstr "" "bogue utile. Il décrit quel genre d'information est utile et pourquoi elle " "est utile." -#: bugs.rst:90 +#: bugs.rst:99 msgid "" "`Bug Writing Guidelines `_" @@ -247,7 +257,7 @@ msgstr "" "`Guide pour la rédaction de rapports de bogues `_" -#: bugs.rst:91 +#: 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." @@ -255,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:97 +#: bugs.rst:106 msgid "Getting started contributing to Python yourself" msgstr "Commencer à contribuer à Python vous-même" -#: bugs.rst:99 +#: 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 " diff --git a/c-api/allocation.po b/c-api/allocation.po index 321e8248f0..ef3cb7dd49 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: 2025-10-17 09:58+0200\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,7 +16,8 @@ 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 @@ -127,7 +128,7 @@ msgid "" "object, call *typeobj* instead. For example::" msgstr "" -#: c-api/allocation.rst:137 +#: 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`" @@ -185,10 +186,6 @@ msgid ":c:macro:`PyObject_GC_NewVar`" msgstr "" #: c-api/allocation.rst:145 -msgid "Same as :c:func:`PyObject_Free`." -msgstr "" - -#: c-api/allocation.rst:149 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 " @@ -198,14 +195,62 @@ msgstr "" "accessible uniquement en utilisant la macro :c:macro:`Py_None`, qui évalue " "cet objet à un pointeur." -#: c-api/allocation.rst:156 +#: c-api/allocation.rst:152 msgid ":ref:`moduleobjects`" msgstr "" -#: c-api/allocation.rst:157 +#: 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 " diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 0ea301f9b5..dc2a26880e 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: 2025-10-17 09:58+0200\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" @@ -60,18 +60,26 @@ 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:39 +#: 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:43 +#: 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:46 +#: c-api/apiabiversion.rst:63 #, fuzzy msgid "" "Use this for numeric comparisons, for example, ``#if PY_VERSION_HEX >= ...``." @@ -79,11 +87,21 @@ msgstr "" "Vous pouvez l'utiliser pour les comparaisons numériques, par exemple, ``#if " "PY_VERSION_HEX >= ...``." -#: c-api/apiabiversion.rst:51 +#: 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:55 +#: c-api/apiabiversion.rst:78 #, fuzzy msgid "" "The Python runtime version number encoded in a single constant integer. " @@ -94,7 +112,7 @@ msgstr "" "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:59 +#: c-api/apiabiversion.rst:82 #, fuzzy msgid "" "Use this for numeric comparisons, for example, ``if (Py_Version >= ...)``." @@ -102,199 +120,199 @@ msgstr "" "Vous pouvez l'utiliser pour les comparaisons numériques, par exemple, ``#if " "PY_VERSION_HEX >= ...``." -#: c-api/apiabiversion.rst:65 +#: c-api/apiabiversion.rst:88 msgid "Bit-packing macros" msgstr "" -#: c-api/apiabiversion.rst:69 +#: 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:75 +#: c-api/apiabiversion.rst:98 msgid "Argument" msgstr "" -#: c-api/apiabiversion.rst:73 +#: c-api/apiabiversion.rst:96 msgid "No. of bits" msgstr "" -#: c-api/apiabiversion.rst:75 +#: c-api/apiabiversion.rst:98 msgid "Bit mask" msgstr "" -#: c-api/apiabiversion.rst:75 +#: c-api/apiabiversion.rst:98 msgid "Bit shift" msgstr "" -#: c-api/apiabiversion.rst:73 +#: c-api/apiabiversion.rst:96 msgid "Example values" msgstr "" -#: c-api/apiabiversion.rst:93 +#: c-api/apiabiversion.rst:116 #, fuzzy msgid "``3.4.1a2``" msgstr "Valeur pour ``3.4.1a2``" -#: c-api/apiabiversion.rst:95 +#: c-api/apiabiversion.rst:118 msgid "``3.10.0``" msgstr "" -#: c-api/apiabiversion.rst:77 +#: c-api/apiabiversion.rst:100 msgid "*major*" msgstr "" -#: c-api/apiabiversion.rst:79 c-api/apiabiversion.rst:81 +#: c-api/apiabiversion.rst:102 c-api/apiabiversion.rst:104 msgid "8" msgstr "8" -#: c-api/apiabiversion.rst:77 +#: c-api/apiabiversion.rst:100 #, fuzzy msgid "``0xFF000000``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:77 +#: c-api/apiabiversion.rst:100 #, fuzzy msgid "24" msgstr "2" -#: c-api/apiabiversion.rst:77 +#: c-api/apiabiversion.rst:100 msgid "``0x03``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:79 +#: c-api/apiabiversion.rst:102 msgid "*minor*" msgstr "" -#: c-api/apiabiversion.rst:79 +#: c-api/apiabiversion.rst:102 #, fuzzy msgid "``0x00FF0000``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:79 +#: c-api/apiabiversion.rst:102 #, fuzzy msgid "16" msgstr "1" -#: c-api/apiabiversion.rst:79 +#: c-api/apiabiversion.rst:102 msgid "``0x04``" msgstr "``0x04``" -#: c-api/apiabiversion.rst:79 +#: c-api/apiabiversion.rst:102 #, fuzzy msgid "``0x0A``" msgstr "``0xA``" -#: c-api/apiabiversion.rst:81 +#: c-api/apiabiversion.rst:104 msgid "*micro*" msgstr "" -#: c-api/apiabiversion.rst:81 +#: c-api/apiabiversion.rst:104 #, fuzzy msgid "``0x0000FF00``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:81 +#: c-api/apiabiversion.rst:104 msgid "``0x01``" msgstr "``0x01``" -#: c-api/apiabiversion.rst:81 +#: c-api/apiabiversion.rst:104 #, fuzzy msgid "``0x00``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:83 +#: c-api/apiabiversion.rst:106 msgid "*release_level*" msgstr "" -#: c-api/apiabiversion.rst:85 +#: c-api/apiabiversion.rst:108 msgid "4" msgstr "4" -#: c-api/apiabiversion.rst:83 +#: c-api/apiabiversion.rst:106 #, fuzzy msgid "``0x000000F0``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:83 +#: c-api/apiabiversion.rst:106 msgid "``0xA``" msgstr "``0xA``" -#: c-api/apiabiversion.rst:83 +#: c-api/apiabiversion.rst:106 #, fuzzy msgid "``0xF``" msgstr "``0xA``" -#: c-api/apiabiversion.rst:85 +#: c-api/apiabiversion.rst:108 msgid "*release_serial*" msgstr "" -#: c-api/apiabiversion.rst:85 +#: c-api/apiabiversion.rst:108 #, fuzzy msgid "``0x0000000F``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:85 +#: c-api/apiabiversion.rst:108 msgid "0" msgstr "0" -#: c-api/apiabiversion.rst:85 +#: c-api/apiabiversion.rst:108 msgid "``0x2``" msgstr "``0x2``" -#: c-api/apiabiversion.rst:85 +#: c-api/apiabiversion.rst:108 #, fuzzy msgid "``0x0``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:88 +#: c-api/apiabiversion.rst:111 msgid "For example:" msgstr "Par exemple :" -#: c-api/apiabiversion.rst:91 +#: c-api/apiabiversion.rst:114 msgid "Version" msgstr "" -#: c-api/apiabiversion.rst:91 +#: c-api/apiabiversion.rst:114 msgid "``Py_PACK_FULL_VERSION`` arguments" msgstr "" -#: c-api/apiabiversion.rst:91 +#: c-api/apiabiversion.rst:114 msgid "Encoded version" msgstr "" -#: c-api/apiabiversion.rst:93 +#: c-api/apiabiversion.rst:116 msgid "``(3, 4, 1, 0xA, 2)``" msgstr "" -#: c-api/apiabiversion.rst:93 +#: c-api/apiabiversion.rst:116 #, fuzzy msgid "``0x030401a2``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:95 +#: c-api/apiabiversion.rst:118 msgid "``(3, 10, 0, 0xF, 0)``" msgstr "" -#: c-api/apiabiversion.rst:95 +#: c-api/apiabiversion.rst:118 #, fuzzy msgid "``0x030a00f0``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:98 +#: c-api/apiabiversion.rst:121 msgid "" "Out-of range bits in the arguments are ignored. That is, the macro can be " "defined as:" msgstr "" -#: c-api/apiabiversion.rst:112 +#: 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 "" -#: c-api/apiabiversion.rst:119 +#: 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 " @@ -363,11 +381,6 @@ msgstr "" #~ msgstr "" #~ "Cette version est aussi disponible via le symbole :data:`Py_Version`." -#~ msgid "All the given macros are defined in :source:`Include/patchlevel.h`." -#~ msgstr "" -#~ "Toutes les macros données sont définies dans :source:`Include/" -#~ "patchlevel.h`." - #~ msgid "``1``" #~ msgstr "``1``" diff --git a/c-api/arg.po b/c-api/arg.po index 67edc20b12..2e17593b20 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: 2025-10-17 09:58+0200\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" @@ -245,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:614 +#: c-api/arg.rst:643 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "``z`` (:class:`str` ou ``None``) [``const char *``]" @@ -398,12 +398,18 @@ 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 " +"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]" @@ -545,16 +551,18 @@ 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, no range checking " -"is done --- the most significant bits are silently truncated when the " -"receiving field is too small to receive the value." +"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:244 +#: c-api/arg.rst:246 msgid "``b`` (:class:`int`) [unsigned char]" msgstr "``b`` (:class:`int`) [``unsigned char``]" -#: c-api/arg.rst:245 +#: c-api/arg.rst:247 #, fuzzy msgid "" "Convert a nonnegative Python integer to an unsigned tiny integer, stored in " @@ -563,90 +571,79 @@ 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:648 +#: c-api/arg.rst:677 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [``unsigned char``]" -#: c-api/arg.rst:249 +#: c-api/arg.rst:251 #, fuzzy msgid "" "Convert a Python integer to a tiny integer without overflow checking, stored " -"in a C :c:expr:`unsigned char`." +"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:642 +#: c-api/arg.rst:671 msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [``short int``]" -#: c-api/arg.rst:253 +#: 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:651 +#: c-api/arg.rst:680 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [``unsigned short int``]" -#: c-api/arg.rst:256 +#: 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:636 +#: c-api/arg.rst:665 msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [``int``]" -#: c-api/arg.rst:260 +#: 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:654 +#: c-api/arg.rst:683 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [``unsigned int``]" -#: c-api/arg.rst:263 +#: 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:645 +#: c-api/arg.rst:674 msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [``long int``]" -#: c-api/arg.rst:267 +#: 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:657 +#: c-api/arg.rst:686 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [``unsigned long``]" -#: c-api/arg.rst:270 +#: c-api/arg.rst:271 #, 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." +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:283 +#: c-api/arg.rst:282 msgid "Use :meth:`~object.__index__` if available." msgstr "" -#: c-api/arg.rst:660 +#: c-api/arg.rst:689 msgid "``L`` (:class:`int`) [long long]" msgstr "``L`` (:class:`int`) [``long long``]" @@ -655,33 +652,29 @@ msgstr "``L`` (:class:`int`) [``long long``]" 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:665 +#: c-api/arg.rst:694 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [``unsigned long long``]" #: 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:668 +#: 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:287 +#: 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:289 +#: 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:290 +#: c-api/arg.rst:289 #, fuzzy msgid "" "Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " @@ -690,15 +683,15 @@ msgstr "" "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:293 +#: c-api/arg.rst:292 msgid "Allow :class:`bytearray` objects." msgstr "" -#: c-api/arg.rst:686 +#: 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:297 +#: c-api/arg.rst:296 #, fuzzy msgid "" "Convert a Python character, represented as a :class:`str` object of length " @@ -707,43 +700,51 @@ 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:693 +#: c-api/arg.rst:722 msgid "``f`` (:class:`float`) [float]" msgstr "``f`` (:class:`float`) [``float``]" -#: c-api/arg.rst:301 +#: 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:690 +#: c-api/arg.rst:719 msgid "``d`` (:class:`float`) [double]" msgstr "``d`` (:class:`float`) [``double``]" -#: c-api/arg.rst:304 +#: 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:306 +#: c-api/arg.rst:305 msgid "``D`` (:class:`complex`) [Py_complex]" msgstr "``D`` (:class:`complex`) [``Py_complex``]" -#: c-api/arg.rst:307 +#: 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: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:699 +#: c-api/arg.rst:728 msgid "``O`` (object) [PyObject \\*]" msgstr "``O`` (objet) [``PyObject *``]" -#: c-api/arg.rst:313 +#: c-api/arg.rst:320 #, fuzzy msgid "" "Store a Python object (without any conversion) in a C object pointer. The C " @@ -756,11 +757,11 @@ msgstr "" "référence sur l'objet n'est pas incrémenté. Le pointeur stocké n'est pas " "*NULL*." -#: c-api/arg.rst:319 +#: c-api/arg.rst:326 msgid "``O!`` (object) [*typeobject*, PyObject \\*]" msgstr "``O!`` (objet) [*typeobject*, ``PyObject *``]" -#: c-api/arg.rst:320 +#: 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 " @@ -769,12 +770,12 @@ msgid "" "required type, :exc:`TypeError` is raised." msgstr "" -#: c-api/arg.rst:328 +#: c-api/arg.rst:335 #, fuzzy msgid "``O&`` (object) [*converter*, *address*]" msgstr "``O&`` (objet) [*converter*, *anything*]" -#: c-api/arg.rst:329 +#: 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 " @@ -782,7 +783,7 @@ msgid "" "*converter* function in turn is called as follows::" msgstr "" -#: c-api/arg.rst:336 +#: 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*`` " @@ -792,7 +793,7 @@ msgid "" "*address* unmodified." msgstr "" -#: c-api/arg.rst:345 +#: c-api/arg.rst:352 msgid "" "If the *converter* returns :c:macro:`!Py_CLEANUP_SUPPORTED`, it may get " "called a second time if the argument parsing eventually fails, giving the " @@ -801,22 +802,22 @@ msgid "" "have the same value as in the original call." msgstr "" -#: c-api/arg.rst:351 +#: c-api/arg.rst:358 msgid "" "Examples of converters: :c:func:`PyUnicode_FSConverter` " "and :c:func:`PyUnicode_FSDecoder`." msgstr "" -#: c-api/arg.rst:354 +#: c-api/arg.rst:361 #, fuzzy msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." msgstr "``Py_CLEANUP_SUPPORTED`` à été ajouté." -#: c-api/arg.rst:671 +#: c-api/arg.rst:700 msgid "``p`` (:class:`bool`) [int]" msgstr "``p`` (:class:`bool`) [``int``]" -#: c-api/arg.rst:358 +#: 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 " @@ -825,12 +826,12 @@ msgid "" "how Python tests values for truth." msgstr "" -#: c-api/arg.rst:366 +#: c-api/arg.rst:373 #, fuzzy msgid "``(items)`` (sequence) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" -#: c-api/arg.rst:367 +#: c-api/arg.rst:374 #, fuzzy msgid "" "The object must be a Python sequence (except :class:`str`, :class:`bytes` " @@ -843,7 +844,7 @@ msgstr "" "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:372 +#: 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 " @@ -852,18 +853,18 @@ msgid "" "*items* must not store a borrowed buffer or a borrowed reference." msgstr "" -#: c-api/arg.rst:379 +#: c-api/arg.rst:386 msgid "" ":class:`str` and :class:`bytearray` objects no longer accepted as a sequence." msgstr "" -#: c-api/arg.rst:382 +#: 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:386 +#: 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:" @@ -871,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:389 +#: c-api/arg.rst:396 msgid "``|``" msgstr "``|``" -#: c-api/arg.rst:390 +#: 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 " @@ -884,11 +885,11 @@ msgid "" "corresponding C variable(s)." msgstr "" -#: c-api/arg.rst:396 +#: c-api/arg.rst:403 msgid "``$``" msgstr "``$``" -#: c-api/arg.rst:397 +#: 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 " @@ -896,22 +897,22 @@ msgid "" "be specified before ``$`` in the format string." msgstr "" -#: c-api/arg.rst:405 +#: c-api/arg.rst:412 msgid "``:``" msgstr "" -#: c-api/arg.rst:406 +#: 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:410 +#: c-api/arg.rst:417 msgid "``;``" msgstr "" -#: c-api/arg.rst:411 +#: 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 " @@ -921,7 +922,7 @@ msgstr "" "virgule est utilise comme message d'erreur *au lieu* du message d'erreur par " "défaut. ``:`` et ``;`` sont mutuellement exclusifs." -#: c-api/arg.rst:415 +#: c-api/arg.rst:422 #, fuzzy msgid "" "Note that any Python object references which are provided to the caller are " @@ -932,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:419 +#: 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 " @@ -949,7 +950,7 @@ msgstr "" "devraient correspondre à ce qui est spécifié pour l'unité de format " "correspondante." -#: c-api/arg.rst:425 +#: 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 " @@ -959,24 +960,24 @@ msgid "" "the following format units are left untouched." msgstr "" -#: c-api/arg.rst:434 +#: c-api/arg.rst:441 msgid "API Functions" msgstr "Fonction de l'API" -#: c-api/arg.rst:438 +#: 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:445 +#: 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:451 +#: 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``-" @@ -986,51 +987,68 @@ msgid "" "failure, it returns false and raises the appropriate exception." msgstr "" -#: c-api/arg.rst:462 +#: 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." msgstr "" -#: c-api/arg.rst:466 +#: c-api/arg.rst:473 msgid "" "Added support for :ref:`positional-only parameters `." msgstr "" -#: c-api/arg.rst:470 +#: 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." msgstr "" -#: c-api/arg.rst:479 +#: 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:485 +#: 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:494 +#: 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:498 +#: c-api/arg.rst:505 msgid "Example::" msgstr "Exemple ::" -#: c-api/arg.rst:514 +#: 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 " @@ -1048,19 +1066,19 @@ msgid "" "if there was a failure." msgstr "" -#: c-api/arg.rst:529 +#: 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:545 +#: 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:552 +#: 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` " @@ -1069,11 +1087,11 @@ msgid "" "to the desired value before including :file:`Python.h`." msgstr "" -#: c-api/arg.rst:566 +#: c-api/arg.rst:595 msgid "Building values" msgstr "Construction des valeurs" -#: c-api/arg.rst:570 +#: 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 " @@ -1081,7 +1099,7 @@ msgid "" "``NULL`` is returned." msgstr "" -#: c-api/arg.rst:575 +#: 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 " @@ -1090,7 +1108,7 @@ msgid "" "it to return a tuple of size 0 or one, parenthesize the format string." msgstr "" -#: c-api/arg.rst:581 +#: 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. " @@ -1101,7 +1119,7 @@ msgid "" "calling :c:func:`free` for that memory once :c:func:`Py_BuildValue` returns." msgstr "" -#: c-api/arg.rst:589 +#: 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 " @@ -1109,168 +1127,168 @@ msgid "" "be passed." msgstr "" -#: c-api/arg.rst:593 +#: 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:597 +#: 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:598 +#: 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:601 +#: 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:602 +#: 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:606 +#: c-api/arg.rst:635 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "``y`` (:class:`bytes`) [``const char *``]" -#: c-api/arg.rst:607 +#: 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:610 +#: 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:611 +#: 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:631 +#: c-api/arg.rst:660 msgid "Same as ``s``." msgstr "" -#: c-api/arg.rst:617 +#: 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:634 +#: c-api/arg.rst:663 msgid "Same as ``s#``." msgstr "" -#: c-api/arg.rst:620 +#: c-api/arg.rst:649 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "``u`` (:class:`str`) [``const wchar_t *``]" -#: c-api/arg.rst:621 +#: 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:625 +#: 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:626 +#: 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:630 +#: 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:633 +#: 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:637 +#: 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:639 +#: c-api/arg.rst:668 msgid "``b`` (:class:`int`) [char]" msgstr "``b`` (:class:`int`) [``char``]" -#: c-api/arg.rst:640 +#: 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:643 +#: 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:646 +#: 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:649 +#: 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:652 +#: 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:655 +#: 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:658 +#: 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:661 +#: 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:666 +#: 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:669 +#: c-api/arg.rst:698 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "" -#: c-api/arg.rst:672 +#: 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:674 +#: 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 " @@ -1278,11 +1296,11 @@ msgid "" "float) to a suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``." msgstr "" -#: c-api/arg.rst:682 +#: 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:683 +#: c-api/arg.rst:712 #, fuzzy msgid "" "Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " @@ -1291,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:687 +#: c-api/arg.rst:716 #, fuzzy msgid "" "Convert a C :c:expr:`int` representing a character to Python :class:`str` " @@ -1300,25 +1318,25 @@ 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:691 +#: 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:694 +#: 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:696 +#: c-api/arg.rst:725 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "``D`` (:class:`complex`) [``Py_complex *``]" -#: c-api/arg.rst:697 +#: c-api/arg.rst:726 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" -#: c-api/arg.rst:700 +#: 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 " @@ -1328,30 +1346,30 @@ msgid "" "exception. If no exception has been raised yet, :exc:`SystemError` is set." msgstr "" -#: c-api/arg.rst:709 +#: c-api/arg.rst:738 msgid "``S`` (object) [PyObject \\*]" msgstr "``S`` (objet) [``PyObject *``]" -#: c-api/arg.rst:710 +#: c-api/arg.rst:739 msgid "Same as ``O``." msgstr "" -#: c-api/arg.rst:712 +#: c-api/arg.rst:741 msgid "``N`` (object) [PyObject \\*]" msgstr "``N`` (objet) [``PyObject *``]" -#: c-api/arg.rst:713 +#: 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:717 +#: c-api/arg.rst:746 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "``O&`` (objet) [*converter*, *anything*]" -#: c-api/arg.rst:718 +#: 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 " @@ -1359,49 +1377,81 @@ msgid "" "object, or ``NULL`` if an error occurred." msgstr "" -#: c-api/arg.rst:723 +#: c-api/arg.rst:752 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" -#: c-api/arg.rst:724 +#: 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:726 +#: c-api/arg.rst:755 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "``[items]`` (:class:`list`) [*matching-items*]" -#: c-api/arg.rst:727 +#: 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:729 +#: c-api/arg.rst:758 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "``{items}`` (:class:`dict`) [*matching-items*]" -#: c-api/arg.rst:730 +#: 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:734 +#: 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:739 +#: 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 *``]" diff --git a/c-api/buffer.po b/c-api/buffer.po index a550b3087f..4c3554242b 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: 2025-10-17 09:58+0200\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,7 +19,7 @@ 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` " @@ -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,7 +46,7 @@ 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 and Python level in the form of " @@ -56,7 +56,7 @@ msgstr "" "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 " @@ -69,7 +69,7 @@ msgstr "" "tampon sous-jacent. Cette interface est décrite dans la section :ref:`buffer-" "structs` ;" -#: c-api/buffer.rst:39 +#: c-api/buffer.rst:34 #, fuzzy msgid "" "on the consumer side, several means are available to obtain a pointer to the " @@ -80,7 +80,7 @@ msgstr "" "pointeur vers les données sous-jacentes brutes d'un objet (par exemple un " "paramètre de méthode)." -#: c-api/buffer.rst:43 +#: 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 " @@ -92,7 +92,7 @@ msgstr "" "possibles ; par exemple, les éléments exposés par un :class:`array.array` " "peuvent être des valeurs multi-octets." -#: c-api/buffer.rst:47 +#: c-api/buffer.rst:42 #, fuzzy msgid "" "An example consumer of the buffer interface is " @@ -114,7 +114,7 @@ msgstr "" "d'autoriser ou de rejeter sélectivement l'exportation de tampons en mode " "lecture-écriture et en mode lecture seule." -#: c-api/buffer.rst:55 +#: 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:" @@ -122,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:58 +#: 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:60 +#: 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 `." @@ -134,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:63 +#: 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 " @@ -144,17 +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:75 +#: c-api/buffer.rst:70 msgid "Buffer structure" msgstr "La structure *buffer*" -#: c-api/buffer.rst:77 +#: 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 " @@ -176,7 +176,7 @@ msgstr "" "être utilisé pour transmettre des données structurées dans son format natif " "en mémoire." -#: c-api/buffer.rst:86 +#: 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 " @@ -191,14 +191,14 @@ msgstr "" "(*wrapper* en anglais) pour un tampon, un objet :ref:`memoryview ` peut être créé." -#: c-api/buffer.rst:92 +#: 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`." msgstr "" -#: c-api/buffer.rst:100 +#: 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 " @@ -206,13 +206,13 @@ msgid "" "the value may point to the end of the memory block." msgstr "" -#: c-api/buffer.rst:105 +#: 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:110 +#: 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 " @@ -220,14 +220,14 @@ msgid "" "of the return value of any standard C-API function." msgstr "" -#: c-api/buffer.rst:117 +#: 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." msgstr "" -#: c-api/buffer.rst:124 +#: 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 " @@ -235,7 +235,7 @@ msgid "" "representation." msgstr "" -#: c-api/buffer.rst:129 +#: 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 " @@ -243,20 +243,20 @@ msgid "" "or :c:macro:`PyBUF_WRITABLE`." msgstr "" -#: c-api/buffer.rst:135 +#: 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:140 +#: 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." msgstr "" -#: c-api/buffer.rst:143 +#: 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 " @@ -264,14 +264,14 @@ msgid "" "the original format." msgstr "" -#: c-api/buffer.rst:148 +#: 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." msgstr "" -#: c-api/buffer.rst:152 +#: 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 " @@ -279,18 +279,18 @@ msgid "" "``itemsize == 1``." msgstr "" -#: c-api/buffer.rst:158 +#: 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:162 +#: c-api/buffer.rst:157 msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag." msgstr "" -#: c-api/buffer.rst:166 +#: 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 " @@ -300,7 +300,7 @@ msgid "" "of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`." msgstr "" -#: c-api/buffer.rst:174 +#: 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 " @@ -308,34 +308,34 @@ msgid "" "to :c:member:`~Py_buffer.len`." msgstr "" -#: c-api/buffer.rst:179 +#: 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:183 +#: c-api/buffer.rst:178 msgid "The shape array is read-only for the consumer." msgstr "" -#: c-api/buffer.rst:187 +#: 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:191 +#: 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:195 +#: c-api/buffer.rst:190 msgid "The strides array is read-only for the consumer." msgstr "" -#: c-api/buffer.rst:199 +#: 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 " @@ -344,24 +344,24 @@ msgid "" "that no de-referencing should occur (striding in a contiguous memory block)." msgstr "" -#: c-api/buffer.rst:206 +#: 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:209 +#: 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:213 +#: c-api/buffer.rst:208 msgid "The suboffsets array is read-only for the consumer." msgstr "" -#: c-api/buffer.rst:217 +#: 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 " @@ -369,22 +369,22 @@ msgid "" "the buffer is released. The consumer MUST NOT alter this value." msgstr "" -#: c-api/buffer.rst:224 +#: c-api/buffer.rst:219 msgid "Constants:" msgstr "" -#: c-api/buffer.rst:228 +#: 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:237 +#: c-api/buffer.rst:232 msgid "Buffer request types" msgstr "" -#: c-api/buffer.rst:239 +#: 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 " @@ -392,27 +392,27 @@ msgid "" "argument to specify the exact buffer type it can handle." msgstr "" -#: c-api/buffer.rst:244 +#: c-api/buffer.rst:239 msgid "" "All :c:type:`Py_buffer` fields are unambiguously defined by the request type." msgstr "" -#: c-api/buffer.rst:248 +#: c-api/buffer.rst:243 msgid "request-independent fields" msgstr "" -#: c-api/buffer.rst:249 +#: 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`." msgstr "" -#: c-api/buffer.rst:254 +#: c-api/buffer.rst:249 msgid "readonly, format" msgstr "" -#: c-api/buffer.rst:258 +#: 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 " @@ -421,13 +421,17 @@ msgid "" "PyBUF_WRITABLE` can be used to request a simple writable buffer." msgstr "" -#: c-api/buffer.rst:266 +#: 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:270 +#: 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 " @@ -435,140 +439,140 @@ msgid "" "simple writable buffer." msgstr "" -#: c-api/buffer.rst:274 +#: 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." msgstr "" -#: c-api/buffer.rst:280 +#: c-api/buffer.rst:281 msgid "shape, strides, suboffsets" msgstr "" -#: c-api/buffer.rst:282 +#: 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:313 c-api/buffer.rst:338 +#: c-api/buffer.rst:314 c-api/buffer.rst:339 msgid "Request" msgstr "" -#: c-api/buffer.rst:313 c-api/buffer.rst:338 +#: c-api/buffer.rst:314 c-api/buffer.rst:339 msgid "shape" msgstr "" -#: c-api/buffer.rst:313 c-api/buffer.rst:338 +#: c-api/buffer.rst:314 c-api/buffer.rst:339 msgid "strides" msgstr "" -#: c-api/buffer.rst:313 c-api/buffer.rst:338 +#: c-api/buffer.rst:314 c-api/buffer.rst:339 msgid "suboffsets" msgstr "" -#: c-api/buffer.rst:293 c-api/buffer.rst:315 c-api/buffer.rst:319 -#: c-api/buffer.rst:340 c-api/buffer.rst:344 c-api/buffer.rst:348 -#: c-api/buffer.rst:352 c-api/buffer.rst:354 +#: 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:340 c-api/buffer.rst:342 +#: c-api/buffer.rst:341 c-api/buffer.rst:343 msgid "if needed" msgstr "si nécessaire" -#: c-api/buffer.rst:295 c-api/buffer.rst:315 c-api/buffer.rst:319 -#: c-api/buffer.rst:344 c-api/buffer.rst:348 c-api/buffer.rst:352 -#: c-api/buffer.rst:354 +#: 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:304 +#: c-api/buffer.rst:305 msgid "contiguity requests" msgstr "" -#: c-api/buffer.rst:306 +#: 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:338 +#: c-api/buffer.rst:339 msgid "contig" msgstr "" -#: c-api/buffer.rst:321 c-api/buffer.rst:354 +#: c-api/buffer.rst:322 c-api/buffer.rst:355 msgid "C" msgstr "C" -#: c-api/buffer.rst:317 +#: c-api/buffer.rst:318 msgid "F" msgstr "F" -#: c-api/buffer.rst:319 +#: c-api/buffer.rst:320 msgid "C or F" msgstr "" -#: c-api/buffer.rst:321 +#: c-api/buffer.rst:322 msgid ":c:macro:`PyBUF_ND`" msgstr "" -#: c-api/buffer.rst:326 +#: c-api/buffer.rst:327 msgid "compound requests" msgstr "" -#: c-api/buffer.rst:328 +#: 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:332 +#: 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:338 +#: c-api/buffer.rst:339 msgid "readonly" msgstr "lecture seule" -#: c-api/buffer.rst:338 +#: c-api/buffer.rst:339 msgid "format" msgstr "format" -#: c-api/buffer.rst:342 c-api/buffer.rst:346 c-api/buffer.rst:350 +#: c-api/buffer.rst:343 c-api/buffer.rst:347 c-api/buffer.rst:351 msgid "U" msgstr "" -#: c-api/buffer.rst:344 c-api/buffer.rst:352 +#: c-api/buffer.rst:345 c-api/buffer.rst:353 msgid "0" msgstr "0" -#: c-api/buffer.rst:346 c-api/buffer.rst:354 +#: c-api/buffer.rst:347 c-api/buffer.rst:355 msgid "1 or 0" msgstr "0 ou 1" -#: c-api/buffer.rst:359 +#: c-api/buffer.rst:360 msgid "Complex arrays" msgstr "" -#: c-api/buffer.rst:362 +#: c-api/buffer.rst:363 msgid "NumPy-style: shape and strides" msgstr "" -#: c-api/buffer.rst:364 +#: 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`." msgstr "" -#: c-api/buffer.rst:367 +#: 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 " @@ -577,25 +581,25 @@ msgid "" "``NULL``." msgstr "" -#: c-api/buffer.rst:371 +#: 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:381 +#: 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:415 +#: c-api/buffer.rst:416 msgid "PIL-style: shape, strides and suboffsets" msgstr "" -#: c-api/buffer.rst:417 +#: 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 " @@ -606,32 +610,32 @@ msgid "" "x[2][3]`` arrays that can be located anywhere in memory." msgstr "" -#: c-api/buffer.rst:426 +#: 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:445 +#: c-api/buffer.rst:446 msgid "Buffer-related functions" msgstr "Fonctions relatives aux tampons" -#: c-api/buffer.rst:449 +#: 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:456 +#: 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``." msgstr "" -#: c-api/buffer.rst:461 +#: 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 " @@ -639,7 +643,7 @@ msgid "" "instead of *exporter* (See :ref:`Buffer Object Structures `)." msgstr "" -#: c-api/buffer.rst:466 +#: 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` " @@ -647,7 +651,7 @@ msgid "" "buffer, :c:func:`PyBuffer_Release` must be called exactly once." msgstr "" -#: c-api/buffer.rst:474 +#: 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-" @@ -655,13 +659,13 @@ msgid "" "used, otherwise reference leaks may occur." msgstr "" -#: c-api/buffer.rst:479 +#: 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`." msgstr "" -#: c-api/buffer.rst:485 +#: c-api/buffer.rst:486 #, fuzzy msgid "" "Return the implied :c:member:`~Py_buffer.itemsize` " @@ -671,7 +675,7 @@ 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:493 +#: 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 " @@ -679,69 +683,69 @@ msgid "" "succeeds." msgstr "" -#: c-api/buffer.rst:500 +#: 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:506 +#: 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:513 +#: 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:517 +#: c-api/buffer.rst:519 msgid "This function fails if *len* != *src->len*." msgstr "" -#: c-api/buffer.rst:522 +#: 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:525 +#: c-api/buffer.rst:527 msgid "``0`` is returned on success, ``-1`` on error." msgstr "" -#: c-api/buffer.rst:529 +#: 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:536 +#: 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:540 +#: 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:544 +#: 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:548 +#: 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 57db8a86b4..8e2c83d3af 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: 2025-10-17 09:58+0200\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" @@ -65,31 +65,37 @@ 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,34 +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 +#: 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:84 +#: c-api/bytearray.rst:95 msgid "Macros" msgstr "Macros" -#: c-api/bytearray.rst:86 +#: 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:90 +#: 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:95 +#: 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 33534ce830..07e385e9f3 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: 2025-10-17 09:58+0200\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,187 +87,193 @@ 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 " @@ -272,24 +284,24 @@ msgid "" "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,37 +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:196 +#: 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:201 +#: 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:204 +#: 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:212 +#: 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 " @@ -356,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 77dcf124c7..772e639450 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: 2025-10-17 09:58+0200\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" @@ -388,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." @@ -502,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*." 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 " @@ -524,7 +534,7 @@ 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 " @@ -536,17 +546,17 @@ msgid "" "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 ef335dcb21..595c94fa77 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: 2025-10-17 09:58+0200\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." 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." 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." 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,19 +148,19 @@ 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:111 +#: 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:116 +#: 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 " @@ -162,11 +168,11 @@ msgid "" "to succeed." msgstr "" -#: c-api/capsule.rst:121 +#: c-api/capsule.rst:127 msgid "*no_block* has no effect anymore." msgstr "" -#: c-api/capsule.rst:127 +#: 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`` " @@ -175,40 +181,40 @@ msgid "" "compared.)" msgstr "" -#: c-api/capsule.rst:133 +#: 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:137 +#: 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:143 +#: c-api/capsule.rst:149 msgid "Set the context pointer inside *capsule* to *context*." msgstr "" -#: c-api/capsule.rst:152 c-api/capsule.rst:169 +#: 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:150 +#: c-api/capsule.rst:156 msgid "Set the destructor inside *capsule* to *destructor*." msgstr "" -#: c-api/capsule.rst:157 +#: 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:166 +#: 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 05cb0aca52..377a219d8a 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 f5e8d5ac82..d032528022 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: 2025-10-17 09:58+0200\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,7 +36,7 @@ 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 " @@ -45,48 +45,48 @@ msgstr "" "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." 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, " @@ -98,38 +98,38 @@ msgstr "" "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, " @@ -140,53 +140,53 @@ msgstr "" "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>`." 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 " @@ -194,7 +194,7 @@ 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 " @@ -202,7 +202,7 @@ msgid "" "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 " @@ -210,7 +210,7 @@ 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`` " @@ -218,17 +218,17 @@ msgid "" "*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 " @@ -236,7 +236,7 @@ msgid "" "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 " @@ -244,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 " @@ -254,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``." 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 " @@ -270,12 +270,26 @@ msgid "" "it before returning." msgstr "" +#: c-api/code.rst:215 +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:219 +#: 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 " @@ -283,7 +297,7 @@ msgid "" "to :c:func:`PyUnstable_Code_New` and similar functions." msgstr "" -#: c-api/code.rst:224 +#: 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 " @@ -291,171 +305,171 @@ msgid "" "are mandatory in current versions of Python, and setting them has no effect." msgstr "" -#: c-api/code.rst:230 +#: 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:238 +#: c-api/code.rst:250 msgid "Flag" msgstr "Option" -#: c-api/code.rst:239 +#: c-api/code.rst:251 msgid "Meaning" msgstr "Signification" -#: c-api/code.rst:241 +#: c-api/code.rst:253 msgid ":py:data:`inspect.CO_OPTIMIZED`" msgstr "" -#: c-api/code.rst:243 +#: c-api/code.rst:255 msgid ":py:data:`inspect.CO_NEWLOCALS`" msgstr "" -#: c-api/code.rst:245 +#: c-api/code.rst:257 msgid ":py:data:`inspect.CO_VARARGS`" msgstr "" -#: c-api/code.rst:247 +#: c-api/code.rst:259 msgid ":py:data:`inspect.CO_VARKEYWORDS`" msgstr "" -#: c-api/code.rst:249 +#: c-api/code.rst:261 msgid ":py:data:`inspect.CO_NESTED`" msgstr "" -#: c-api/code.rst:251 +#: c-api/code.rst:263 msgid ":py:data:`inspect.CO_GENERATOR`" msgstr "" -#: c-api/code.rst:253 +#: c-api/code.rst:265 msgid ":py:data:`inspect.CO_COROUTINE`" msgstr "" -#: c-api/code.rst:255 +#: c-api/code.rst:267 msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`" msgstr "" -#: c-api/code.rst:257 +#: c-api/code.rst:269 msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`" msgstr "" -#: c-api/code.rst:259 +#: c-api/code.rst:271 msgid ":py:data:`inspect.CO_HAS_DOCSTRING`" msgstr "" -#: c-api/code.rst:261 +#: c-api/code.rst:273 msgid ":py:data:`inspect.CO_METHOD`" msgstr "" -#: c-api/code.rst:264 +#: c-api/code.rst:276 msgid "no effect (:py:data:`__future__.division`)" msgstr "" -#: c-api/code.rst:266 +#: c-api/code.rst:278 msgid "no effect (:py:data:`__future__.absolute_import`)" msgstr "" -#: c-api/code.rst:268 +#: c-api/code.rst:280 msgid "no effect (:py:data:`__future__.with_statement`)" msgstr "" -#: c-api/code.rst:270 +#: c-api/code.rst:282 msgid "no effect (:py:data:`__future__.print_function`)" msgstr "" -#: c-api/code.rst:272 +#: c-api/code.rst:284 msgid "no effect (:py:data:`__future__.unicode_literals`)" msgstr "" -#: c-api/code.rst:274 +#: c-api/code.rst:286 msgid "no effect (:py:data:`__future__.generator_stop`)" msgstr "" -#: c-api/code.rst:276 +#: c-api/code.rst:288 msgid ":py:data:`__future__.annotations`" msgstr "" -#: c-api/code.rst:280 +#: c-api/code.rst:292 msgid "Extra information" msgstr "" -#: c-api/code.rst:282 +#: 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:286 +#: 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:292 -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:294 +#: 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:298 +#: 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`." msgstr "" -#: c-api/code.rst:304 +#: c-api/code.rst:317 msgid "as ``_PyEval_RequestCodeExtraIndex``" msgstr "" -#: c-api/code.rst:308 +#: 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:314 +#: 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:317 +#: 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:322 +#: c-api/code.rst:336 msgid "as ``_PyCode_GetExtra``" msgstr "" -#: c-api/code.rst:326 +#: 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:332 +#: 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:337 +#: c-api/code.rst:352 msgid "as ``_PyCode_SetExtra``" msgstr "" -#: c-api/code.rst:341 +#: 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 bb67acce51..320691b272 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: 2025-10-17 09:58+0200\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 @@ -62,7 +63,7 @@ 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." +"a :exc:`LookupError` if no decoder can be found." msgstr "" #: c-api/codec.rst:46 @@ -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 b941bff014..16bb89cd03 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: 2025-10-17 09:58+0200\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,132 +19,29 @@ 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." -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 ::" - -#: c-api/complex.rst:33 -msgid "The structure is defined as::" -msgstr "" - -#: c-api/complex.rst:43 -msgid "" -"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " -"representation." +"The complex number value, 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:49 -msgid "" -"Return the difference between two complex numbers, using the " -"C :c:type:`Py_complex` representation." -msgstr "" -"Renvoie la différence de deux nombres complexes, sous la forme " -"d'un :c:type:`Py_complex` en C." - -#: c-api/complex.rst:55 -#, fuzzy -msgid "" -"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:61 -msgid "" -"Return the product of two complex numbers, using the C :c:type:`Py_complex` " -"representation." -msgstr "" -"Renvoie le produit de deux nombres complexes, sous la forme " -"d'un :c:type:`Py_complex` en C." - -#: c-api/complex.rst:67 +#: c-api/complex.rst:19 msgid "" -"Return the quotient 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 le quotient de deux nombres complexes, sous la forme " -"d'un :c:type:`Py_complex` en C." -#: c-api/complex.rst:70 -#, fuzzy -msgid "" -"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:76 -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:79 -#, 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`." -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:82 -msgid "Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows." -msgstr "" - -#: c-api/complex.rst:86 -msgid "Complex Numbers as Python Objects" -msgstr "Nombres complexes en tant qu'objets Python" - -#: c-api/complex.rst:91 -msgid "" -"This subtype of :c:type:`PyObject` represents 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:96 +#: c-api/complex.rst:28 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." @@ -153,7 +50,7 @@ msgstr "" "Python. C'est le même objet que la classe :class:`complex` de la couche " "Python." -#: c-api/complex.rst:102 +#: c-api/complex.rst:34 #, fuzzy msgid "" "Return true if its argument is a :c:type:`PyComplexObject` or a subtype " @@ -162,7 +59,7 @@ msgstr "" "Renvoie vrai si l'argument est de type :c:type:`PyComplexObject` ou un sous-" "type de :c:type:`PyComplexObject`." -#: c-api/complex.rst:108 +#: c-api/complex.rst:40 #, fuzzy msgid "" "Return true if its argument is a :c:type:`PyComplexObject`, but not a " @@ -171,16 +68,7 @@ msgstr "" "Renvoie vrai si l'argument est de type :c:type:`PyComplexObject`, mais pas " "un sous-type de :c:type:`PyComplexObject`." -#: c-api/complex.rst:114 -#, 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." -msgstr "" -"Crée un nouveau nombre complexe à partir de la valeur " -"d'un :c:type:`Py_complex` en C." - -#: c-api/complex.rst:120 +#: c-api/complex.rst:46 #, fuzzy msgid "" "Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " @@ -188,14 +76,14 @@ msgid "" msgstr "" "Renvoie un nouveau :c:type:`PyComplexObject` à partir de *real* et de *imag*." -#: c-api/complex.rst:126 +#: 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:128 +#: c-api/complex.rst:54 #, fuzzy msgid "" "If *op* is not a Python complex number object but has " @@ -209,24 +97,24 @@ msgstr "" "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:150 +#: c-api/complex.rst:76 msgid "" "Upon failure, this method returns ``-1.0`` with an exception set, so one " "should call :c:func:`PyErr_Occurred` to check for errors." msgstr "" -#: c-api/complex.rst:153 +#: c-api/complex.rst:79 msgid "Use :meth:`~object.__complex__` if available." msgstr "" -#: c-api/complex.rst:142 +#: c-api/complex.rst:68 #, fuzzy msgid "Return the imaginary part of *op* as a C :c:expr:`double`." msgstr "" "Renvoie la partie imaginaire du nombre complexe *op* sous la forme " "d'un :c:type:`double` en C." -#: c-api/complex.rst:144 +#: c-api/complex.rst:70 #, fuzzy msgid "" "If *op* is not a Python complex number object but has " @@ -240,13 +128,34 @@ msgstr "" "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:158 +#: c-api/complex.rst:85 +#, fuzzy +msgid "" +"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:91 +msgid "The structure is defined as::" +msgstr "" + +#: c-api/complex.rst:101 +#, 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." +msgstr "" +"Crée un nouveau nombre complexe à partir de la valeur " +"d'un :c:type:`Py_complex` en C." + +#: c-api/complex.rst:107 msgid "Return the :c:type:`Py_complex` value of the complex number *op*." msgstr "" "Renvoie la valeur du nombre complexe *op* sous la forme " "d'un :c:type:`Py_complex` en C." -#: c-api/complex.rst:160 +#: c-api/complex.rst:109 #, fuzzy msgid "" "If *op* is not a Python complex number object but has " @@ -260,17 +169,145 @@ msgstr "" "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:166 +#: c-api/complex.rst:115 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." msgstr "" -#: c-api/complex.rst:170 +#: c-api/complex.rst:119 msgid "Use :meth:`~object.__index__` if available." msgstr "" +#: 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 "" +"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 "" +"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:131 +msgid "" +"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: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:147 +msgid "" +"Return the difference between two complex numbers, using the " +"C :c:type:`Py_complex` representation." +msgstr "" +"Renvoie la différence de deux nombres complexes, sous la forme " +"d'un :c:type:`Py_complex` en C." + +#: c-api/complex.rst:155 +#, fuzzy +msgid "" +"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 le produit de deux nombres complexes, sous la forme " +"d'un :c:type:`Py_complex` en C." + +#: 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 *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 "" +"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: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 971bd2fe73..9856638274 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: 2025-10-17 09:58+0200\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" @@ -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/conversion.po b/c-api/conversion.po index 192ebda21b..3c85a55c82 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: 2025-10-17 09:58+0200\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" @@ -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 @@ -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_INFINITY`` (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 0000000000..b9931e32ff --- /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 bff69b13c7..413fcd7f4d 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: 2025-10-17 09:58+0200\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" @@ -26,10 +26,10 @@ 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 " +"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." +"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 " @@ -41,59 +41,105 @@ msgstr "" "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 " +"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`." @@ -101,11 +147,11 @@ msgstr "" "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,7 +319,7 @@ 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 " @@ -286,19 +332,19 @@ msgstr "" "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 b9eae213d3..841c1e1c52 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 ba3bd1d7b5..a9b7028e99 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: 2025-10-17 09:58+0200\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 @@ -58,29 +59,68 @@ 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*`." 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 " @@ -88,14 +128,14 @@ msgid "" "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*`." 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 " @@ -103,72 +143,80 @@ msgid "" "``-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*`." 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:129 +#: c-api/dict.rst:209 +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_GetItemRef`, which returns a :term:`strong reference`." +msgstr "" + +#: c-api/dict.rst:192 msgid "" "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*`." 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 " @@ -177,14 +225,22 @@ msgid "" "own :c:func:`PyUnicode_FromString` *key* instead." msgstr "" -#: c-api/dict.rst:159 +#: c-api/dict.rst:234 +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_GetItemStringRef`, which returns a :term:`strong " +"reference`." +msgstr "" + +#: 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:168 +#: 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 " @@ -194,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``, " @@ -206,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 " @@ -214,59 +278,71 @@ 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 "" "Similar to :meth:`dict.pop`, but without the default value and not " -"raising :exc:`KeyError` if the key missing." +"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`` " @@ -280,26 +356,30 @@ msgid "" "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:441 +msgid "The function is thread-safe on a :class:`frozendict`." msgstr "" -#: c-api/dict.rst:306 +#: 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* " @@ -310,7 +390,7 @@ msgid "" "using :c:func:`Py_NewRef`)." msgstr "" -#: c-api/dict.rst:316 +#: 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` " @@ -320,7 +400,15 @@ msgid "" "or ``-1`` if an exception was raised." msgstr "" -#: c-api/dict.rst:326 +#: 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 " @@ -329,7 +417,7 @@ msgid "" "exception was raised." msgstr "" -#: c-api/dict.rst:335 +#: 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, " @@ -338,7 +426,14 @@ msgid "" "if an exception was raised. Equivalent Python (except for the return value)::" msgstr "" -#: c-api/dict.rst:349 +#: 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 " @@ -346,21 +441,29 @@ msgid "" "exception." msgstr "" -#: c-api/dict.rst:358 +#: 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.)" msgstr "" -#: c-api/dict.rst:366 +#: 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 " "deallocated. Return ``0`` on success or ``-1`` on error." msgstr "" -#: c-api/dict.rst:374 +#: 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 " @@ -368,7 +471,7 @@ msgid "" "watched by this watcher. Return ``0`` on success or ``-1`` on error." msgstr "" -#: c-api/dict.rst:383 +#: c-api/dict.rst:560 msgid "" "Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, " "``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, " @@ -376,11 +479,11 @@ msgid "" "``PyDict_EVENT_DEALLOCATED``." msgstr "" -#: c-api/dict.rst:391 +#: c-api/dict.rst:568 msgid "Type of a dict watcher callback function." msgstr "" -#: c-api/dict.rst:393 +#: 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`` " @@ -389,7 +492,7 @@ msgid "" "dictionary and *new_value* will be ``NULL``." msgstr "" -#: c-api/dict.rst:399 +#: 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 " @@ -397,14 +500,14 @@ msgid "" "``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary." msgstr "" -#: c-api/dict.rst:405 +#: 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:409 +#: 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 " @@ -413,20 +516,20 @@ msgid "" "again." msgstr "" -#: c-api/dict.rst:415 +#: 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:418 +#: 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``." msgstr "" -#: c-api/dict.rst:422 +#: 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 " @@ -435,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 "" +"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 "dictionary" -#~ msgstr "Objets dictionnaires" +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 abce887a08..7f5ffe5268 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: 2025-10-17 09:58+0200\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" @@ -324,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 " @@ -342,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 " @@ -362,7 +387,7 @@ 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. " @@ -372,7 +397,7 @@ msgid "" "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 " @@ -382,14 +407,14 @@ msgid "" "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 " "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 " @@ -398,32 +423,39 @@ msgid "" "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`." msgstr "" -#: c-api/exceptions.rst:390 +#: c-api/exceptions.rst:415 msgid "" "Function similar to :c:func:`PyErr_WarnEx`, but " -"use :c:func:`PyUnicode_FromFormat` to format the warning message. *format* " +"uses :c:func:`PyUnicode_FromFormat` to format the warning message. *format* " +"is an ASCII-encoded string." +msgstr "" + +#: c-api/exceptions.rst:424 +msgid "" +"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`." 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*`` " @@ -432,11 +464,11 @@ msgid "" "to :c:func:`Py_DECREF` it." msgstr "" -#: c-api/exceptions.rst:416 +#: 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 " @@ -445,14 +477,14 @@ msgid "" "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 " @@ -460,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 " @@ -505,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 " @@ -528,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 " @@ -551,7 +583,7 @@ 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. " @@ -559,7 +591,7 @@ msgid "" "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 " @@ -568,7 +600,7 @@ msgid "" "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 " @@ -576,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 " @@ -591,7 +623,7 @@ 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 " @@ -601,7 +633,7 @@ msgid "" "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 " @@ -609,7 +641,7 @@ 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 " @@ -619,7 +651,7 @@ msgid "" "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 " @@ -627,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:655 +#: c-api/exceptions.rst:688 +msgid "Handlers invoked by this function currently include:" +msgstr "" + +#: 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 "" -"This function can be called by long-running C code that wants to be " -"interruptible by user requests (such as by pressing Ctrl-C)." +"Signal handlers are only run in the main thread of the main interpreter." msgstr "" -#: c-api/exceptions.rst:662 +#: c-api/exceptions.rst:695 msgid "" -"The default Python signal handler for :c:macro:`!SIGINT` raises " -"the :exc:`KeyboardInterrupt` exception." +"(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:673 +#: c-api/exceptions.rst:709 +msgid "" +"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:715 +msgid "" +"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: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 " "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." 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 " @@ -704,28 +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." 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 " @@ -733,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 " @@ -750,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 " @@ -760,41 +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:754 +#: 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:759 +#: c-api/exceptions.rst:816 msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." msgstr "" -#: c-api/exceptions.rst:763 +#: 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:767 +#: 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:775 +#: 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:781 +#: 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 " @@ -802,14 +898,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:789 +#: 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:796 +#: 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 " @@ -817,28 +913,28 @@ msgid "" "attribute." msgstr "" -#: c-api/exceptions.rst:804 +#: 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:808 +#: 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:814 +#: c-api/exceptions.rst:895 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: c-api/exceptions.rst:819 +#: c-api/exceptions.rst:900 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: c-api/exceptions.rst:823 +#: 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 " @@ -850,100 +946,100 @@ msgid "" "end, or ``None`` if there is nothing to reraise." msgstr "" -#: c-api/exceptions.rst:837 +#: c-api/exceptions.rst:918 msgid "Unicode Exception Objects" msgstr "Objets exception Unicode" -#: c-api/exceptions.rst:839 +#: c-api/exceptions.rst:920 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: c-api/exceptions.rst:843 +#: 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:850 +#: c-api/exceptions.rst:931 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:856 +#: c-api/exceptions.rst:937 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:862 +#: 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:866 +#: 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:869 +#: c-api/exceptions.rst:950 #, fuzzy msgid ":attr:`UnicodeError.start`" msgstr ":exc:`UnicodeError`" -#: c-api/exceptions.rst:875 +#: c-api/exceptions.rst:956 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:880 +#: 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:888 +#: 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:892 +#: 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:899 +#: 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:902 +#: c-api/exceptions.rst:983 #, fuzzy msgid ":attr:`UnicodeError.end`" msgstr ":exc:`UnicodeError`" -#: c-api/exceptions.rst:908 +#: c-api/exceptions.rst:989 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:914 +#: 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:921 +#: c-api/exceptions.rst:1002 msgid "Recursion Control" msgstr "Contrôle de la récursion" -#: c-api/exceptions.rst:923 +#: 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 " @@ -953,37 +1049,41 @@ msgid "" "recursion handling." msgstr "" -#: c-api/exceptions.rst:932 +#: 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:934 +#: c-api/exceptions.rst:1015 msgid "" "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:938 +#: 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:950 +#: 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:947 +#: 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:953 +#: 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 " @@ -992,13 +1092,13 @@ msgid "" "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: c-api/exceptions.rst:961 +#: 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:964 +#: 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 " @@ -1007,388 +1107,529 @@ msgid "" "return ``[...]``." msgstr "" -#: c-api/exceptions.rst:970 +#: 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:974 +#: c-api/exceptions.rst:1058 msgid "" "Otherwise, the function returns zero and " "the :c:member:`~PyTypeObject.tp_repr` implementation can continue normally." msgstr "" -#: c-api/exceptions.rst:979 +#: 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." msgstr "" -#: c-api/exceptions.rst:986 +#: 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:1082 +msgid "" +"This function cannot fail, and the caller must hold an :term:`attached " +"thread state`." +msgstr "" + +#: c-api/exceptions.rst:1076 +msgid ":py:func:`sys.getrecursionlimit`" +msgstr "" + +#: c-api/exceptions.rst:1080 +msgid "Set the recursion limit for the current interpreter." +msgstr "" + +#: c-api/exceptions.rst:1086 +msgid ":py:func:`sys.setrecursionlimit`" +msgstr "" + +#: c-api/exceptions.rst:1091 #, fuzzy msgid "Exception and warning types" msgstr "Gestion des exceptions" -#: c-api/exceptions.rst:988 +#: 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:992 +#: c-api/exceptions.rst:1097 msgid "For completeness, here are all the variables:" msgstr "" -#: c-api/exceptions.rst:995 +#: c-api/exceptions.rst:1100 #, fuzzy msgid "Exception types" msgstr "Objets exception" -#: c-api/exceptions.rst:1148 c-api/exceptions.rst:1178 +#: c-api/exceptions.rst:1255 c-api/exceptions.rst:1285 msgid "C name" msgstr "" -#: c-api/exceptions.rst:1149 c-api/exceptions.rst:1179 +#: c-api/exceptions.rst:1256 c-api/exceptions.rst:1286 #, fuzzy msgid "Python name" msgstr "Nom Python" -#: c-api/exceptions.rst:1005 +#: c-api/exceptions.rst:1110 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: c-api/exceptions.rst:1007 +#: c-api/exceptions.rst:1112 #, fuzzy msgid ":exc:`BaseExceptionGroup`" msgstr ":exc:`BaseException`" -#: c-api/exceptions.rst:1009 +#: c-api/exceptions.rst:1114 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: c-api/exceptions.rst:1011 +#: c-api/exceptions.rst:1116 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: c-api/exceptions.rst:1013 +#: c-api/exceptions.rst:1118 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: c-api/exceptions.rst:1015 +#: c-api/exceptions.rst:1120 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: c-api/exceptions.rst:1017 +#: c-api/exceptions.rst:1122 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: c-api/exceptions.rst:1019 +#: c-api/exceptions.rst:1124 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: c-api/exceptions.rst:1021 +#: c-api/exceptions.rst:1126 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: c-api/exceptions.rst:1023 +#: c-api/exceptions.rst:1128 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: c-api/exceptions.rst:1025 +#: c-api/exceptions.rst:1130 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: c-api/exceptions.rst:1027 +#: c-api/exceptions.rst:1132 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: c-api/exceptions.rst:1029 +#: c-api/exceptions.rst:1134 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: c-api/exceptions.rst:1031 +#: c-api/exceptions.rst:1136 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: c-api/exceptions.rst:1033 +#: c-api/exceptions.rst:1138 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: c-api/exceptions.rst:1035 +#: c-api/exceptions.rst:1140 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: c-api/exceptions.rst:1037 +#: c-api/exceptions.rst:1142 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: c-api/exceptions.rst:1039 +#: c-api/exceptions.rst:1144 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: c-api/exceptions.rst:1041 +#: c-api/exceptions.rst:1146 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: c-api/exceptions.rst:1043 +#: c-api/exceptions.rst:1148 +#, fuzzy +msgid ":exc:`ImportCycleError`" +msgstr ":exc:`ImportError`" + +#: c-api/exceptions.rst:1150 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: c-api/exceptions.rst:1045 +#: c-api/exceptions.rst:1152 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: c-api/exceptions.rst:1047 +#: c-api/exceptions.rst:1154 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: c-api/exceptions.rst:1049 +#: c-api/exceptions.rst:1156 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: c-api/exceptions.rst:1051 +#: c-api/exceptions.rst:1158 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: c-api/exceptions.rst:1053 +#: c-api/exceptions.rst:1160 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: c-api/exceptions.rst:1055 +#: c-api/exceptions.rst:1162 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: c-api/exceptions.rst:1057 +#: c-api/exceptions.rst:1164 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: c-api/exceptions.rst:1059 +#: c-api/exceptions.rst:1166 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: c-api/exceptions.rst:1061 +#: c-api/exceptions.rst:1168 msgid ":exc:`ModuleNotFoundError`" msgstr ":exc:`ModuleNotFoundError`" -#: c-api/exceptions.rst:1063 +#: c-api/exceptions.rst:1170 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: c-api/exceptions.rst:1065 +#: c-api/exceptions.rst:1172 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: c-api/exceptions.rst:1067 +#: c-api/exceptions.rst:1174 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: c-api/exceptions.rst:1152 c-api/exceptions.rst:1158 +#: c-api/exceptions.rst:1259 c-api/exceptions.rst:1265 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: c-api/exceptions.rst:1071 +#: c-api/exceptions.rst:1178 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: c-api/exceptions.rst:1073 +#: c-api/exceptions.rst:1180 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: c-api/exceptions.rst:1075 +#: c-api/exceptions.rst:1182 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: c-api/exceptions.rst:1077 +#: c-api/exceptions.rst:1184 #, fuzzy msgid ":exc:`PythonFinalizationError`" msgstr ":exc:`ConnectionError`" -#: c-api/exceptions.rst:1079 +#: c-api/exceptions.rst:1186 msgid ":exc:`RecursionError`" msgstr ":exc:`RecursionError`" -#: c-api/exceptions.rst:1081 +#: c-api/exceptions.rst:1188 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: c-api/exceptions.rst:1083 +#: c-api/exceptions.rst:1190 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: c-api/exceptions.rst:1085 +#: c-api/exceptions.rst:1192 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: c-api/exceptions.rst:1087 +#: c-api/exceptions.rst:1194 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: c-api/exceptions.rst:1089 +#: c-api/exceptions.rst:1196 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: c-api/exceptions.rst:1091 +#: c-api/exceptions.rst:1198 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: c-api/exceptions.rst:1093 +#: c-api/exceptions.rst:1200 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: c-api/exceptions.rst:1095 +#: c-api/exceptions.rst:1202 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: c-api/exceptions.rst:1097 +#: c-api/exceptions.rst:1204 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: c-api/exceptions.rst:1099 +#: c-api/exceptions.rst:1206 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: c-api/exceptions.rst:1101 +#: c-api/exceptions.rst:1208 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: c-api/exceptions.rst:1103 +#: c-api/exceptions.rst:1210 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: c-api/exceptions.rst:1105 +#: c-api/exceptions.rst:1212 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: c-api/exceptions.rst:1107 +#: c-api/exceptions.rst:1214 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: c-api/exceptions.rst:1109 +#: c-api/exceptions.rst:1216 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: c-api/exceptions.rst:1111 +#: c-api/exceptions.rst:1218 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: c-api/exceptions.rst:1113 +#: c-api/exceptions.rst:1220 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: c-api/exceptions.rst:1115 +#: 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`." msgstr "" -#: c-api/exceptions.rst:1125 +#: 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:1128 +#: c-api/exceptions.rst:1235 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: c-api/exceptions.rst:1131 +#: c-api/exceptions.rst:1238 #, fuzzy msgid ":c:data:`PyExc_BaseExceptionGroup`." msgstr ":c:data:`PyExc_BaseException`" -#: c-api/exceptions.rst:1136 +#: c-api/exceptions.rst:1243 msgid "OSError aliases" msgstr "" -#: c-api/exceptions.rst:1138 +#: c-api/exceptions.rst:1245 msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." msgstr "" -#: c-api/exceptions.rst:1140 +#: c-api/exceptions.rst:1247 msgid "These aliases used to be separate exception types." msgstr "" -#: c-api/exceptions.rst:1150 +#: c-api/exceptions.rst:1257 msgid "Notes" msgstr "Notes" -#: c-api/exceptions.rst:1159 +#: c-api/exceptions.rst:1266 msgid "[win]_" msgstr "" -#: c-api/exceptions.rst:1161 +#: c-api/exceptions.rst:1268 msgid "Notes:" msgstr "Notes :" -#: c-api/exceptions.rst:1164 +#: c-api/exceptions.rst:1271 msgid "" ":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:1171 +#: c-api/exceptions.rst:1278 msgid "Warning types" msgstr "" -#: c-api/exceptions.rst:1181 +#: c-api/exceptions.rst:1288 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: c-api/exceptions.rst:1183 +#: c-api/exceptions.rst:1290 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: c-api/exceptions.rst:1185 +#: c-api/exceptions.rst:1292 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: c-api/exceptions.rst:1187 +#: c-api/exceptions.rst:1294 #, fuzzy msgid ":exc:`EncodingWarning`" msgstr ":exc:`UnicodeWarning`" -#: c-api/exceptions.rst:1189 +#: c-api/exceptions.rst:1296 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: c-api/exceptions.rst:1191 +#: c-api/exceptions.rst:1298 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: c-api/exceptions.rst:1193 +#: c-api/exceptions.rst:1300 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: c-api/exceptions.rst:1195 +#: c-api/exceptions.rst:1302 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: c-api/exceptions.rst:1197 +#: c-api/exceptions.rst:1304 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: c-api/exceptions.rst:1199 +#: c-api/exceptions.rst:1306 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: c-api/exceptions.rst:1201 +#: c-api/exceptions.rst:1308 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: c-api/exceptions.rst:1203 +#: c-api/exceptions.rst:1310 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: c-api/exceptions.rst:1205 +#: c-api/exceptions.rst:1312 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: c-api/exceptions.rst:1208 +#: 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" diff --git a/c-api/extension-modules.po b/c-api/extension-modules.po index 811c22f065..939a2a6ac1 100644 --- a/c-api/extension-modules.po +++ b/c-api/extension-modules.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,10 +24,11 @@ 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 :ref:`initialization function `." +"which exports an :dfn:`export hook` function (or an old-" +"style :ref:`initialization function `)." msgstr "" -#: c-api/extension-modules.rst:13 +#: c-api/extension-modules.rst:14 msgid "" "To be importable by default (that is, " "by :py:class:`importlib.machinery.ExtensionFileLoader`), the shared library " @@ -37,7 +37,7 @@ msgid "" "in :py:attr:`importlib.machinery.EXTENSION_SUFFIXES`." msgstr "" -#: c-api/extension-modules.rst:21 +#: 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 " @@ -45,60 +45,179 @@ msgid "" "setuptools.pypa.io/en/latest/setuptools.html." msgstr "" -#: c-api/extension-modules.rst:26 +#: c-api/extension-modules.rst:30 +msgid "Extension export hook" +msgstr "" + +#: c-api/extension-modules.rst:34 msgid "" -"Normally, the initialization function returns a module definition " -"initialized using :c:func:`PyModuleDef_Init`. This allows splitting the " -"creation process into several phases:" +"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:30 +#: 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." +"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:33 +#: c-api/extension-modules.rst:134 msgid "" -"By default, Python itself creates the module object -- that is, it does the " -"equivalent of :py:meth:`object.__new__` for classes. It also sets initial " -"attributes like :attr:`~module.__package__` and :attr:`~module.__loader__`." +"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:37 +#: c-api/extension-modules.rst:137 msgid "" -"Afterwards, the module object is initialized using extension-specific code " -"-- the equivalent of :py:meth:`~object.__init__` on classes." +"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:40 +#: 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) *single-phase initialization* scheme, where the " -"initialization function returns a fully constructed module. See " -"the :ref:`single-phase-initialization section below ` for details." +"legacy (but still supported) :ref:`single-phase initialization `, where an initialization function returns a fully " +"constructed module." msgstr "" -#: c-api/extension-modules.rst:48 +#: c-api/extension-modules.rst:151 msgid "Added support for multi-phase initialization (:pep:`489`)." msgstr "" -#: c-api/extension-modules.rst:52 +#: c-api/extension-modules.rst:155 msgid "Multiple module instances" msgstr "" -#: c-api/extension-modules.rst:54 +#: 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 " +"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:61 +#: c-api/extension-modules.rst:164 msgid "" "Additional module instances may be created in :ref:`sub-interpreters ` or after Python runtime reinitialization " @@ -107,7 +226,7 @@ msgid "" "undefined behavior." msgstr "" -#: c-api/extension-modules.rst:68 +#: 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, " @@ -116,13 +235,13 @@ msgid "" "extensions-howto` for more details and a practical guide." msgstr "" -#: c-api/extension-modules.rst:74 +#: 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:77 +#: 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 " @@ -131,144 +250,130 @@ msgid "" "the :c:data:`Py_mod_multiple_interpreters` slot." msgstr "" -#: c-api/extension-modules.rst:89 -msgid "Initialization function" +#: c-api/extension-modules.rst:192 +msgid "``PyInit`` function" msgstr "" -#: c-api/extension-modules.rst:91 +#: c-api/extension-modules.rst:196 msgid "" -"The initialization function defined by an extension module has the following " -"signature:" +"This functionality will not get new features, but there are no plans to " +"remove it." msgstr "" -#: c-api/extension-modules.rst:96 +#: 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." +"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:99 +#: c-api/extension-modules.rst:211 msgid "" -"For modules with ASCII-only names, the function must instead be " -"named :samp:`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 :samp:`PyInitU_{}`, with ```` encoded using Python's " -"*punycode* encoding with hyphens replaced by underscores. In Python:" +"If a module exports both :samp:`PyInit_{}` " +"and :samp:`PyModExport_{}`, the :samp:`PyInit_{}` function is " +"ignored." msgstr "" -#: c-api/extension-modules.rst:115 +#: c-api/extension-modules.rst:215 msgid "" -"It is recommended to define the initialization function using a helper macro:" +"Like with :c:macro:`PyMODEXPORT_FUNC`, it is recommended to define the " +"initialization function using a helper macro:" msgstr "" -#: c-api/extension-modules.rst:119 +#: c-api/extension-modules.rst:220 msgid "Declare an extension module initialization function. This macro:" msgstr "" -#: c-api/extension-modules.rst:122 +#: c-api/extension-modules.rst:223 msgid "specifies the :c:expr:`PyObject*` return type," msgstr "" -#: c-api/extension-modules.rst:123 -msgid "adds any special linkage declarations required by the platform, and" -msgstr "" - -#: c-api/extension-modules.rst:124 -msgid "for C++, declares the function as ``extern \"C\"``." -msgstr "" - -#: c-api/extension-modules.rst:126 -msgid "For example, a module called ``spam`` would be defined like this::" -msgstr "" - -#: c-api/extension-modules.rst:140 +#: c-api/extension-modules.rst:228 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." +"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:147 +#: c-api/extension-modules.rst:233 msgid "" -"The initialization function is typically the only non-\\ ``static`` item " -"defined in the module's C source." +"Before it is returned, the ``PyModuleDef`` instance must be initialized " +"using the following function:" msgstr "" -#: c-api/extension-modules.rst:154 -msgid "Multi-phase initialization" -msgstr "" - -#: c-api/extension-modules.rst:156 -msgid "" -"Normally, the :ref:`initialization function ` " -"(``PyInit_modulename``) returns a :c:type:`PyModuleDef` instance with non-" -"``NULL`` :c:member:`~PyModuleDef.m_slots`. Before it is returned, the " -"``PyModuleDef`` instance must be initialized using the following function:" -msgstr "" - -#: c-api/extension-modules.rst:165 +#: 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:168 +#: c-api/extension-modules.rst:241 msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." msgstr "" -#: c-api/extension-modules.rst:170 +#: c-api/extension-modules.rst:243 msgid "" -"Calling this function is required for :ref:`multi-phase-initialization`. It " -"should not be used in other contexts." +"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:173 +#: 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:184 +#: c-api/extension-modules.rst:273 msgid "Legacy single-phase initialization" msgstr "" -#: c-api/extension-modules.rst:187 +#: 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:191 +#: 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 :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`." +"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:197 +#: 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:200 +#: c-api/extension-modules.rst:292 msgid "Single-phase modules are, or rather *contain*, “singletons”." msgstr "" -#: c-api/extension-modules.rst:202 +#: 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:206 +#: 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 " @@ -277,12 +382,12 @@ msgid "" "an exception class ``error``:" msgstr "" -#: c-api/extension-modules.rst:229 +#: c-api/extension-modules.rst:321 msgid "" "The exact behavior should be considered a CPython implementation detail." msgstr "" -#: c-api/extension-modules.rst:231 +#: 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 " @@ -291,23 +396,27 @@ msgid "" "parent package name to the name of the module." msgstr "" -#: c-api/extension-modules.rst:237 +#: 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:240 +#: c-api/extension-modules.rst:332 msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported." msgstr "" -#: c-api/extension-modules.rst:242 +#: 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:245 +#: 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." diff --git a/c-api/file.po b/c-api/file.po index 114c20e4cf..85de5e2a8e 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: 2025-10-17 09:58+0200\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 @@ -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 d1ec17f53e..cd3aa21cc6 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: 2025-10-17 09:58+0200\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" @@ -129,126 +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." +"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:194 +msgid "The 4-byte format is the IEEE 754 binary32 single-precision format." +msgstr "" + +#: c-api/float.rst:195 +msgid "The 8-byte format is the IEEE 754 binary64 double-precision format." msgstr "" -#: c-api/float.rst:99 +#: c-api/float.rst:197 msgid "" -"Note that NaNs type may not be preserved on IEEE platforms (silent NaN " -"become quiet), for example on x86 systems in 32-bit mode." +"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:102 +#: c-api/float.rst:200 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)." +"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:110 +#: c-api/float.rst:212 msgid "Pack functions" msgstr "" -#: c-api/float.rst:112 +#: 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`` ``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." +"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:119 +#: 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:122 -msgid "There are two problems on non-IEEE platforms:" -msgstr "" - -#: c-api/float.rst:124 -msgid "What this does is undefined if *x* is a NaN or infinity." -msgstr "" - -#: c-api/float.rst:125 -msgid "``-0.0`` and ``+0.0`` produce the same bytes string." -msgstr "" - -#: c-api/float.rst:129 +#: c-api/float.rst:226 msgid "Pack a C double as the IEEE 754 binary16 half-precision format." msgstr "" -#: c-api/float.rst:133 +#: c-api/float.rst:230 msgid "Pack a C double as the IEEE 754 binary32 single precision format." msgstr "" -#: c-api/float.rst:137 +#: c-api/float.rst:234 msgid "Pack a C double as the IEEE 754 binary64 double precision format." msgstr "" -#: c-api/float.rst:141 +#: 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:143 +#: 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." +"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:150 +#: 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`)." msgstr "" -#: c-api/float.rst:154 -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:159 +#: c-api/float.rst:259 msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." msgstr "" -#: c-api/float.rst:163 +#: c-api/float.rst:263 msgid "Unpack the IEEE 754 binary32 single precision format as a C double." msgstr "" -#: c-api/float.rst:167 +#: 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 d23874f3af..824cf473d4 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: 2025-10-17 09:58+0200\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 @@ -63,10 +64,17 @@ 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 " "````." @@ -74,40 +82,42 @@ 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,55 +128,55 @@ 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 " @@ -175,21 +185,21 @@ msgid "" "frame locals directly (as described for :func:`locals`)." msgstr "" -#: c-api/frame.rst:134 +#: 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:144 -msgid "Frame Locals Proxies" +#: c-api/frame.rst:151 +msgid "Frame locals proxies" msgstr "" -#: c-api/frame.rst:148 +#: 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 " @@ -198,42 +208,84 @@ msgid "" "to date with the live local variables in the frame itself." msgstr "" -#: c-api/frame.rst:154 +#: c-api/frame.rst:161 msgid "See :pep:`667` for more information." msgstr "" -#: c-api/frame.rst:158 +#: c-api/frame.rst:165 msgid "The type of frame :func:`locals` proxy objects." msgstr "" -#: c-api/frame.rst:162 +#: 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:165 -msgid "Internal Frames" +#: 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:167 +#: c-api/frame.rst:219 msgid "Unless using :pep:`523`, you will not need this." msgstr "" -#: c-api/frame.rst:171 +#: c-api/frame.rst:223 msgid "The interpreter's internal frame representation." msgstr "" -#: c-api/frame.rst:177 +#: 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:184 +#: c-api/frame.rst:236 msgid "Return the byte offset into the last executed instruction." msgstr "" -#: c-api/frame.rst:191 +#: 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 adf6f6754a..d8cd04b5cf 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: 2025-10-17 09:58+0200\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" @@ -127,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:116 c-api/function.rst:130 +#: 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." @@ -152,6 +152,21 @@ msgstr "" "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." @@ -159,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:113 +#: 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." @@ -167,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:121 +#: c-api/function.rst:130 msgid "" "Return the annotations of the function object *op*. This can be a mutable " "dictionary or ``NULL``." @@ -175,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:127 +#: c-api/function.rst:136 msgid "" "Set the annotations for the function object *op*. *annotations* must be a " "dictionary or ``Py_None``." @@ -183,14 +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:141 +#: 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:148 +#: 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 " @@ -198,7 +213,7 @@ msgid "" "exception." msgstr "" -#: c-api/function.rst:158 +#: c-api/function.rst:167 msgid "" "Clear watcher identified by *watcher_id* previously returned " "from :c:func:`PyFunction_AddWatcher` for the current interpreter. Return " @@ -206,35 +221,39 @@ msgid "" "given *watcher_id* was never registered.)" msgstr "" -#: c-api/function.rst:168 +#: c-api/function.rst:177 msgid "Enumeration of possible function watcher events:" msgstr "" -#: c-api/function.rst:170 +#: c-api/function.rst:179 msgid "``PyFunction_EVENT_CREATE``" msgstr "" -#: c-api/function.rst:171 +#: c-api/function.rst:180 msgid "``PyFunction_EVENT_DESTROY``" msgstr "" -#: c-api/function.rst:172 +#: c-api/function.rst:181 msgid "``PyFunction_EVENT_MODIFY_CODE``" msgstr "" -#: c-api/function.rst:173 +#: c-api/function.rst:182 msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``" msgstr "" -#: c-api/function.rst:174 +#: c-api/function.rst:183 msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" msgstr "" -#: c-api/function.rst:181 +#: 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:183 +#: 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 " @@ -242,13 +261,13 @@ msgid "" "*func* for the attribute that is being modified." msgstr "" -#: c-api/function.rst:188 +#: 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:191 +#: 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 " @@ -260,22 +279,22 @@ msgid "" "semantics of the Python code being executed." msgstr "" -#: c-api/function.rst:200 +#: 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:205 +#: 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``." msgstr "" -#: c-api/function.rst:209 +#: 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 f6b26b2a5b..b8e0e91b4d 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: 2025-10-17 09:58+0200\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" @@ -302,69 +302,285 @@ 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 "" +"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: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:228 +#: 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:235 +#: c-api/gcsupport.rst:255 +msgid "" +"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:273 +msgid "" +":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:277 +msgid "" +"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:282 +msgid "" +"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: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, " +"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:242 +#: 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. Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers " -"look like::" +"with arguments *o* and *arg*. If *visit* returns a non-zero value, then " +"return it." msgstr "" -#: c-api/gcsupport.rst:255 +#: 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 :c:member:`~PyTypeObject.tp_clear` handler must be of " -"the :c:type:`inquiry` type, or ``NULL`` if the object is immutable." +"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:261 +#: c-api/gcsupport.rst:382 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." +":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:270 +#: 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:272 +#: c-api/gcsupport.rst:459 msgid "" "The C-API provides the following functions for controlling garbage " "collection runs." msgstr "" -#: c-api/gcsupport.rst:277 +#: 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:280 +#: 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, " @@ -372,54 +588,54 @@ msgid "" "to :data:`sys.unraisablehook`. This function does not raise exceptions." msgstr "" -#: c-api/gcsupport.rst:290 +#: 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:298 +#: 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:306 +#: 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:313 +#: c-api/gcsupport.rst:500 msgid "Querying Garbage Collector State" msgstr "" -#: c-api/gcsupport.rst:315 +#: 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:320 +#: 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:324 +#: 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:327 +#: 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:335 +#: 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* " diff --git a/c-api/gen.po b/c-api/gen.po index 75d93086eb..7422d82d60 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: 2025-10-17 09:58+0200\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" @@ -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 5d4e96e9cb..ef09dc4bd0 100644 --- a/c-api/hash.po +++ b/c-api/hash.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -27,71 +27,146 @@ 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:56 +#: c-api/hash.rst:112 msgid "Hash function." msgstr "" -#: c-api/hash.rst:60 +#: 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:95 +#: 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 " @@ -99,27 +174,27 @@ msgid "" "implement the :ref:`buffer protocol `." msgstr "" -#: c-api/hash.rst:100 +#: 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:104 +#: c-api/hash.rst:166 msgid "*len* must be greater than or equal to ``0``." msgstr "" -#: c-api/hash.rst:106 +#: c-api/hash.rst:168 msgid "This function always succeeds." msgstr "" -#: c-api/hash.rst:113 +#: 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:118 +#: 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 7442d02df1..078be57451 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: 2025-10-17 09:58+0200\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,29 +24,13 @@ msgid "" "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 " @@ -55,30 +39,30 @@ msgid "" "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`." 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 " @@ -87,38 +71,38 @@ 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. " @@ -127,19 +111,19 @@ msgid "" "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 " @@ -153,7 +137,7 @@ msgid "" "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 " @@ -161,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." 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`." 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:148 +msgid "``__cached__`` is no longer set." msgstr "" -#: c-api/import.rst:165 +#: 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. " +"Setting ``__cached__`` is deprecated. " "See :class:`~importlib.machinery.ModuleSpec` for alternatives." msgstr "" -#: c-api/import.rst:186 +#: c-api/import.rst:172 +msgid "``__cached__`` no longer set." +msgstr "" + +#: 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 " @@ -223,48 +214,48 @@ 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." 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` " @@ -276,7 +267,7 @@ msgid "" "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 " @@ -285,17 +276,17 @@ msgid "" "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 " @@ -303,13 +294,13 @@ msgid "" "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` " @@ -324,7 +315,7 @@ msgstr "" "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 " @@ -334,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 " @@ -342,15 +333,15 @@ 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 " @@ -361,22 +352,29 @@ msgid "" "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:332 +#: 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:334 +#: c-api/import.rst:333 msgid "Names must be Python :class:`str` objects." msgstr "" -#: c-api/import.rst:336 +#: 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` " @@ -384,12 +382,87 @@ msgid "" "doesn't exist." msgstr "" -#: c-api/import.rst:345 +#: 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 ab618732d4..7ccf83a428 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: 2025-10-17 09:58+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,7 +15,8 @@ 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 diff --git a/c-api/init.po b/c-api/init.po index c55b3816da..086e4b14c0 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: 2025-10-17 09:58+0200\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,3040 +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 "Disponibilité" - -#: 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." - -#: 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 "" +#~ msgid ":c:func:`PyMutex_Unlock`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:320 -msgid "Force the stdout and stderr streams to be unbuffered." -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:322 -msgid "" -"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " -"environment variable." -msgstr "" +#~ msgid "See :pep:`529` for more details." +#~ msgstr "Voir la :pep:`529` pour plus d'informations." -#: 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 "" +#~ msgid "Availability" +#~ msgstr "Disponibilité" -#: 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 "" +#, fuzzy +#~ msgid "See :pep:`528` for more details." +#~ msgstr "Voir la :pep:`529` pour plus d'informations." -#: c-api/init.rst:338 -msgid "" -"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " -"variable." -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:345 -msgid "Initializing and finalizing the interpreter" -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: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 "" +#~ 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: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 "High-level API" +#~ msgstr "Bibliothèques de haut-niveau" -#: c-api/init.rst:386 -msgid "" -"Use :c:func:`Py_InitializeFromConfig` to customize the :ref:`Python " -"Initialization Configuration `." -msgstr "" +#, fuzzy +#~ msgid ":c:func:`PyEval_ReleaseThread`" +#~ 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 ":c:func:`PyThreadState_Get`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: 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 "Low-level API" +#~ msgstr "Bibliothèques de bas-niveau" -#: c-api/init.rst:392 -msgid "" -"Initialize Python from *config* configuration, as described in :ref:`init-" -"from-config`." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_CALL`" +#~ msgstr ":const:`PyTrace_CALL`" -#: 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_EXCEPTION`" +#~ msgstr ":const:`PyTrace_EXCEPTION`" -#: 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_LINE`" +#~ msgstr ":const:`PyTrace_LINE`" -#: 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_RETURN`" +#~ msgstr ":const:`PyTrace_RETURN`" -#: 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`. 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_CALL`" +#~ msgstr ":const:`PyTrace_C_CALL`" -#: c-api/init.rst:423 -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_EXCEPTION`" +#~ msgstr ":const:`PyTrace_C_EXCEPTION`" -#: c-api/init.rst:428 -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_C_RETURN`" +#~ msgstr ":const:`PyTrace_C_RETURN`" -#: c-api/init.rst:432 -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 preveiously allocated PyObjects before using " -"them in subsequent calls to :c:func:`Py_Initialize`. Otherwise it could " -"introduce vulnerabilities and incorrect behavior." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_OPCODE`" +#~ msgstr ":const:`PyTrace_OPCODE`" -#: c-api/init.rst:438 -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:446 -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 "" +#~ msgid "Methods" +#~ msgstr "Méthodes" -#: c-api/init.rst:462 -msgid "" -"Raises an :ref:`auditing event ` " -"``cpython._PySys_ClearAuditHooks`` with no arguments." -msgstr "" +#~ msgid "Synchronization Primitives" +#~ msgstr "Primitives de synchronisation" -#: c-api/init.rst:469 -msgid "" -"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " -"disregards the return value." -msgstr "" - -#: c-api/init.rst:475 -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:484 -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:490 -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:494 -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:501 -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/init.rst:504 -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:516 -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:529 -msgid "Executes the main module in a fully configured CPython runtime." -msgstr "" - -#: c-api/init.rst:531 -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:537 -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/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: ``0``, ``1``, or the " -"status of a :exc:`SystemExit`, as specified above." -msgstr "" - -#: c-api/init.rst:550 -msgid "" -"This function always finalizes the Python interpreter before it returns." -msgstr "" - -#: c-api/init.rst:552 -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:558 -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/init.rst:562 -msgid "There must be an :term:`attached thread state` for *interp*." -msgstr "" - -#: c-api/init.rst:567 -msgid "Process-wide parameters" -msgstr "" - -#: c-api/init.rst:577 -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:581 -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:840 c-api/init.rst:902 -msgid "" -"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get " -"a :c:expr:`wchar_t*` string." -msgstr "" - -#: c-api/init.rst:600 -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:627 c-api/init.rst:699 c-api/init.rst:914 -msgid "" -"This function should not be called before :c:func:`Py_Initialize`, otherwise " -"it returns ``NULL``." -msgstr "" - -#: c-api/init.rst:630 c-api/init.rst:702 c-api/init.rst:917 -msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." -msgstr "" - -#: c-api/init.rst:705 -msgid "" -"Use :c:func:`PyConfig_Get(\"executable\") ` " -"(:data:`sys.executable`) instead." -msgstr "" - -#: c-api/init.rst:617 -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:633 -msgid "" -"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 "" - -#: c-api/init.rst:642 -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:653 -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:659 -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:670 -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:681 -msgid "" -"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 "" - -#: c-api/init.rst:693 -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:716 -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:734 -msgid "" -"Use :c:func:`PyConfig_Get(\"module_search_paths\") ` " -"(:data:`sys.path`) instead." -msgstr "" - -#: c-api/init.rst:740 -msgid "" -"Return the version of this Python interpreter. This is a string that looks " -"something like ::" -msgstr "" - -#: c-api/init.rst:747 -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:752 -msgid "See also the :c:var:`Py_Version` constant." -msgstr "" - -#: c-api/init.rst:759 -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:770 -msgid "" -"Return the official copyright string for the current Python version, for " -"example" -msgstr "" - -#: c-api/init.rst:772 -msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" -msgstr "" - -#: c-api/init.rst:776 -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:782 -msgid "" -"Return an indication of the compiler used to build the current Python " -"version, in square brackets, for example::" -msgstr "" - -#: c-api/init.rst:803 -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:796 -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:815 -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:820 -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:828 -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:832 -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:835 -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:879 -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:847 -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:852 -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:868 -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:872 -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:882 -msgid "The *updatepath* value depends on :option:`-I`." -msgstr "" - -#: c-api/init.rst:889 -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:893 -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:897 -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:910 -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:920 -msgid "" -"Use :c:func:`PyConfig_Get(\"home\") ` or " -"the :envvar:`PYTHONHOME` environment variable instead." -msgstr "" - -#: c-api/init.rst:928 -msgid "Thread State and the Global Interpreter Lock" -msgstr "" - -#: c-api/init.rst:935 -msgid "" -"Unless on a :term:`free-threaded ` build of :term:`CPython`, " -"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:946 -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:956 -msgid "" -"The Python interpreter keeps some thread-specific bookkeeping information " -"inside a data structure called :c:type:`PyThreadState`, known as " -"a :term:`thread state`. Each OS 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/init.rst:961 -msgid "" -"A thread can only have one :term:`attached thread state` at a time. An " -"attached thread state is typically analogous with holding the :term:`GIL`, " -"except on :term:`free-threaded ` builds. On builds with " -"the :term:`GIL` enabled, :term:`attaching ` a thread " -"state will block until the :term:`GIL` can be acquired. However, even on " -"builds with the :term:`GIL` disabled, it is still required to have an " -"attached thread state to call most of the C API." -msgstr "" - -#: c-api/init.rst:968 -msgid "" -"In general, there will always be an :term:`attached thread state` when using " -"Python's C API. Only in some specific cases (such as in " -"a :c:macro:`Py_BEGIN_ALLOW_THREADS` block) will the thread not have an " -"attached thread state. If uncertain, check " -"if :c:func:`PyThreadState_GetUnchecked` returns ``NULL``." -msgstr "" - -#: c-api/init.rst:974 -msgid "Detaching the thread state from extension code" -msgstr "" - -#: c-api/init.rst:976 -msgid "" -"Most extension code manipulating the :term:`thread state` has the following " -"simple structure::" -msgstr "" - -#: c-api/init.rst:983 -msgid "This is so common that a pair of macros exists to simplify it::" -msgstr "" - -#: c-api/init.rst:993 -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:997 -msgid "The block above expands to the following code::" -msgstr "" - -#: c-api/init.rst:1009 -msgid "Here is how these functions work:" -msgstr "" - -#: c-api/init.rst:1011 -msgid "" -"The :term:`attached thread state` holds the :term:`GIL` for the entire " -"interpreter. When detaching the :term:`attached thread state`, " -"the :term:`GIL` is released, allowing other threads to attach a thread state " -"to their own thread, thus getting the :term:`GIL` and can start executing. " -"The pointer to the prior :term:`attached thread state` is stored as a local " -"variable. Upon reaching :c:macro:`Py_END_ALLOW_THREADS`, the thread state " -"that was previously :term:`attached ` is passed " -"to :c:func:`PyEval_RestoreThread`. This function will block until another " -"releases its :term:`thread state `, thus allowing the " -"old :term:`thread state ` to get re-attached and the " -"C API can be called again." -msgstr "" - -#: c-api/init.rst:1021 -msgid "" -"For :term:`free-threaded ` builds, the :term:`GIL` is " -"normally out of the question, but detaching the :term:`thread state " -"` is still required for blocking I/O and long " -"operations. The difference is that threads don't have to wait for " -"the :term:`GIL` to be released to attach their thread state, allowing true " -"multi-core parallelism." -msgstr "" - -#: c-api/init.rst:1027 -msgid "" -"Calling system I/O functions is the most common use case for detaching " -"the :term:`thread state `, 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 detach the :term:`thread state ` when " -"compressing or hashing data." -msgstr "" - -#: c-api/init.rst:1038 -msgid "Non-Python created threads" -msgstr "" - -#: c-api/init.rst:1040 -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 :term:`GIL`, because they don't have " -"an :term:`attached thread state`." -msgstr "" - -#: c-api/init.rst:1047 -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 " -"an :term:`attached thread state` before you can start using the Python/C " -"API. When you are done, you should detach the :term:`thread state `, and finally free it." -msgstr "" - -#: c-api/init.rst:1054 -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:1068 -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. This is " -"because :c:func:`PyGILState_Ensure` and similar functions default " -"to :term:`attaching ` a :term:`thread state` for the " -"main interpreter, meaning that the thread can't safely interact with the " -"calling subinterpreter." -msgstr "" - -#: c-api/init.rst:1078 -msgid "Supporting subinterpreters in non-Python threads" -msgstr "" - -#: c-api/init.rst:1080 -msgid "" -"If you would like to support subinterpreters with non-Python created " -"threads, you must use the ``PyThreadState_*`` API instead of the traditional " -"``PyGILState_*`` API." -msgstr "" - -#: c-api/init.rst:1084 -msgid "" -"In particular, you must store the interpreter state from the calling " -"function and pass it to :c:func:`PyThreadState_New`, which will ensure that " -"the :term:`thread state` is targeting the correct interpreter::" -msgstr "" - -#: c-api/init.rst:1106 -msgid "Cautions about fork()" -msgstr "" - -#: c-api/init.rst:1108 -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:1114 -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:1129 -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:1143 -msgid "Cautions regarding runtime finalization" -msgstr "" - -#: c-api/init.rst:1145 -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*: :c:func:`Py_IsFinalizing` " -"and :func:`sys.is_finalizing` return true. At this point, only the " -"*finalization thread* that initiated finalization (typically the main " -"thread) is allowed to acquire the :term:`GIL`." -msgstr "" - -#: c-api/init.rst:1153 -msgid "" -"If any thread, other than the finalization thread, attempts to attach " -"a :term:`thread state` during finalization, either explicitly or implicitly, " -"the thread enters **a permanently blocked state** where it remains until the " -"program exits. In most cases this is harmless, but this can result in " -"deadlock if a later stage of finalization attempts to acquire a lock owned " -"by the blocked thread, or otherwise waits on the blocked thread." -msgstr "" - -#: c-api/init.rst:1160 -msgid "" -"Gross? Yes. This prevents random crashes and/or unexpectedly skipped C++ " -"finalizations further up the call stack when such threads were forcibly " -"exited here in CPython 3.13 and earlier. The CPython runtime :term:`thread " -"state` C APIs have never had any error reporting or handling expectations " -"at :term:`thread state` attachment time that would've allowed for graceful " -"exit from this situation. Changing that would require new stable C APIs and " -"rewriting the majority of C code in the CPython ecosystem to use those with " -"error handling." -msgstr "" - -#: c-api/init.rst:1170 -#, fuzzy -msgid "High-level API" -msgstr "Bibliothèques de haut-niveau" - -#: c-api/init.rst:1172 -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:1177 -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:1182 -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:1189 -msgid "" -":pep:`684` introduced the possibility of a :ref:`per-interpreter GIL `. See :c:func:`Py_NewInterpreterFromConfig`." -msgstr "" - -#: c-api/init.rst:1196 -msgid "" -"This data structure represents the state of a single thread. The only " -"public data member is:" -msgstr "" - -#: c-api/init.rst:1201 -msgid "This thread's interpreter state." -msgstr "" - -#: c-api/init.rst:1212 -msgid "Deprecated function which does nothing." -msgstr "" - -#: c-api/init.rst:1214 -msgid "" -"In Python 3.6 and older, this function created the GIL if it didn't exist." -msgstr "" - -#: c-api/init.rst:1216 -msgid "The function now does nothing." -msgstr "" - -#: c-api/init.rst:1219 -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:1223 -msgid "" -"This function cannot be called before :c:func:`Py_Initialize()` anymore." -msgstr "" - -#: c-api/init.rst:1233 -msgid "" -"Detach the :term:`attached thread state` and return it. The thread will have " -"no :term:`thread state` upon returning." -msgstr "" - -#: c-api/init.rst:1239 -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/init.rst:1631 -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/init.rst:1333 c-api/init.rst:1641 -msgid "" -"Hangs the current thread, rather than terminating it, if called while the " -"interpreter is finalizing." -msgstr "" - -#: c-api/init.rst:1255 -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/init.rst:1260 -msgid "See also :c:func:`PyThreadState_GetUnchecked`." -msgstr "" - -#: c-api/init.rst:1264 -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:1268 -msgid "" -"In Python 3.5 to 3.12, the function was private and known as " -"``_PyThreadState_UncheckedGet()``." -msgstr "" - -#: c-api/init.rst:1275 -msgid "" -"Set the :term:`attached thread state` to *tstate*, and return " -"the :term:`thread state` that was attached prior to calling." -msgstr "" - -#: c-api/init.rst:1278 -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/init.rst:1282 -#, fuzzy -msgid ":c:func:`PyEval_ReleaseThread`" -msgstr ":c:func:`PyMem_RawCalloc`," - -#: c-api/init.rst:1285 -msgid "" -"Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " -"if the runtime is finalizing." -msgstr "" - -#: c-api/init.rst:1289 -msgid "" -"The following functions use thread-local storage, and are not compatible " -"with sub-interpreters:" -msgstr "" - -#: c-api/init.rst:1294 -msgid "" -"The type of the value returned by :c:func:`PyGILState_Ensure` and passed " -"to :c:func:`PyGILState_Release`." -msgstr "" - -#: c-api/init.rst:1299 -msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." -msgstr "" - -#: c-api/init.rst:1303 -msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." -msgstr "" - -#: c-api/init.rst:1307 -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/init.rst:1317 -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/init.rst:1324 -msgid "" -"When the function returns, there will be an :term:`attached thread state` " -"and the thread will be able to call arbitrary Python code. Failure is a " -"fatal error." -msgstr "" - -#: c-api/init.rst:1328 -msgid "" -"Calling this function when the runtime is finalizing is unsafe. Doing so " -"will either hang the thread until the program ends, or fully crash the " -"interpreter in rare cases. Refer to :ref:`cautions-regarding-runtime-" -"finalization` for more details." -msgstr "" - -#: c-api/init.rst:1339 -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:1344 -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:1349 -msgid "" -"Get the :term:`attached 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:1355 -msgid "" -"This function may return non-``NULL`` even when the :term:`thread state` is " -"detached. Prefer :c:func:`PyThreadState_Get` " -"or :c:func:`PyThreadState_GetUnchecked` for most cases." -msgstr "" - -#: c-api/init.rst:1360 -#, fuzzy -msgid ":c:func:`PyThreadState_Get`" -msgstr ":c:func:`PyMem_RawCalloc`," - -#: c-api/init.rst:1364 -msgid "" -"Return ``1`` if the current thread is holding the :term:`GIL` and ``0`` " -"otherwise. This function can be called from any thread at any time. Only if " -"it has had its :term:`thread state ` initialized " -"via :c:func:`PyGILState_Ensure` 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 :term:`GIL` is " -"locked can allow the caller to perform sensitive actions or otherwise behave " -"differently." -msgstr "" - -#: c-api/init.rst:1374 -msgid "" -"If the current Python process has ever created a subinterpreter, this " -"function will *always* return ``1``. " -"Prefer :c:func:`PyThreadState_GetUnchecked` for most cases." -msgstr "" - -#: c-api/init.rst:1381 -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:1387 -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:1395 -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:1403 -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:1409 -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:1415 -#, fuzzy -msgid "Low-level API" -msgstr "Bibliothèques de bas-niveau" - -#: c-api/init.rst:1417 -msgid "" -"All of the following functions must be called after :c:func:`Py_Initialize`." -msgstr "" - -#: c-api/init.rst:1419 -msgid "" -":c:func:`Py_Initialize()` now initializes the :term:`GIL` and sets " -"an :term:`attached thread state`." -msgstr "" - -#: c-api/init.rst:1426 -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/init.rst:1430 -msgid "" -"Raises an :ref:`auditing event ` " -"``cpython.PyInterpreterState_New`` with no arguments." -msgstr "" - -#: c-api/init.rst:1435 -msgid "" -"Reset all information in an interpreter state object. There must be " -"an :term:`attached thread state` for the interpreter." -msgstr "" - -#: c-api/init.rst:1438 -msgid "" -"Raises an :ref:`auditing event ` " -"``cpython.PyInterpreterState_Clear`` with no arguments." -msgstr "" - -#: c-api/init.rst:1443 -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/init.rst:1450 -msgid "" -"Create a new thread state object belonging to the given interpreter object. " -"An :term:`attached thread state` is not needed." -msgstr "" - -#: c-api/init.rst:1455 -msgid "" -"Reset all information in a :term:`thread state` object. *tstate* must " -"be :term:`attached `" -msgstr "" - -#: c-api/init.rst:1458 -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:1462 -msgid "The :c:member:`!PyThreadState.on_delete` callback was removed." -msgstr "" - -#: c-api/init.rst:1468 -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/init.rst:1476 -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/init.rst:1479 -msgid "" -"No :term:`thread state` will be :term:`attached ` " -"upon returning." -msgstr "" - -#: c-api/init.rst:1484 -msgid "Get the current frame of the Python thread state *tstate*." -msgstr "" - -#: c-api/init.rst:1486 -msgid "" -"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " -"executing." -msgstr "" - -#: c-api/init.rst:1489 -msgid "See also :c:func:`PyEval_GetFrame`." -msgstr "" - -#: c-api/init.rst:1500 c-api/init.rst:1509 -msgid "" -"*tstate* must not be ``NULL``, and must be :term:`attached `." -msgstr "" - -#: c-api/init.rst:1498 -msgid "" -"Get the unique :term:`thread state` identifier of the Python thread state " -"*tstate*." -msgstr "" - -#: c-api/init.rst:1507 -msgid "Get the interpreter of the Python thread state *tstate*." -msgstr "" - -#: c-api/init.rst:1516 -msgid "Suspend tracing and profiling in the Python thread state *tstate*." -msgstr "" - -#: c-api/init.rst:1518 -msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." -msgstr "" - -#: c-api/init.rst:1525 -msgid "" -"Resume tracing and profiling in the Python thread state *tstate* suspended " -"by the :c:func:`PyThreadState_EnterTracing` function." -msgstr "" - -#: c-api/init.rst:1528 -msgid "" -"See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." -msgstr "" - -#: c-api/init.rst:1536 -msgid "Get the current interpreter." -msgstr "" - -#: c-api/init.rst:1538 -msgid "" -"Issue a fatal error if there no :term:`attached thread state`. It cannot " -"return NULL." -msgstr "" - -#: c-api/init.rst:1546 -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:2145 c-api/init.rst:2171 c-api/init.rst:2178 -msgid "The caller must have an :term:`attached thread state`." -msgstr "" - -#: c-api/init.rst:1556 -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:1560 -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:1563 -msgid "" -"The returned dictionary is borrowed from the interpreter and is valid until " -"interpreter shutdown." -msgstr "" - -#: c-api/init.rst:1571 -msgid "Type of a frame evaluation function." -msgstr "" - -#: c-api/init.rst:1573 -msgid "" -"The *throwflag* parameter is used by the ``throw()`` method of generators: " -"if non-zero, handle the current exception." -msgstr "" - -#: c-api/init.rst:1576 -msgid "The function now takes a *tstate* parameter." -msgstr "" - -#: c-api/init.rst:1579 -msgid "" -"The *frame* parameter changed from ``PyFrameObject*`` to " -"``_PyInterpreterFrame*``." -msgstr "" - -#: c-api/init.rst:1584 -msgid "Get the frame evaluation function." -msgstr "" - -#: c-api/init.rst:1594 -msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." -msgstr "" - -#: c-api/init.rst:1592 -msgid "Set the frame evaluation function." -msgstr "" - -#: c-api/init.rst:1601 -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/init.rst:1611 -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 an :term:`attached thread state`. 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:1619 -msgid "" -"The type of the *id* parameter changed from :c:expr:`long` " -"to :c:expr:`unsigned long`." -msgstr "" - -#: c-api/init.rst:1625 -msgid "" -":term:`Attach ` *tstate* to the current thread, which " -"must not be ``NULL`` or already :term:`attached `." -msgstr "" - -#: c-api/init.rst:1628 -msgid "" -"The calling thread must not already have an :term:`attached thread state`." -msgstr "" - -#: c-api/init.rst:1636 -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:1645 -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:1651 -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/init.rst:1656 -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:1663 -msgid "Sub-interpreter support" -msgstr "" - -#: c-api/init.rst:1665 -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:1670 -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:1677 -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:1683 -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:1689 -msgid "Structure fields:" -msgstr "" - -#: c-api/init.rst:1693 -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:1697 -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:1705 -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:1709 -msgid "" -"Note that the :mod:`subprocess` module still works when fork is disallowed." -msgstr "" - -#: c-api/init.rst:1714 -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:1719 -msgid "" -"Note that the :mod:`subprocess` module still works when exec is disallowed." -msgstr "" - -#: c-api/init.rst:1724 -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:1730 -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:1737 -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:1744 -msgid "" -"This must be ``1`` (non-zero) " -"if :c:member:`~PyInterpreterConfig.use_main_obmalloc` is ``0``." -msgstr "" - -#: c-api/init.rst:1749 -msgid "" -"This determines the operation of the GIL for the sub-interpreter. It may be " -"one of the following:" -msgstr "" - -#: c-api/init.rst:1756 -msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." -msgstr "" - -#: c-api/init.rst:1760 -msgid "Use (share) the main interpreter's GIL." -msgstr "" - -#: c-api/init.rst:1764 -msgid "Use the sub-interpreter's own GIL." -msgstr "" - -#: c-api/init.rst:1766 -msgid "" -"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` " -"then :c:member:`PyInterpreterConfig.use_main_obmalloc` must be ``0``." -msgstr "" - -#: c-api/init.rst:1780 -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:1790 -msgid "" -"The given *config* controls the options with which the interpreter is " -"initialized." -msgstr "" - -#: c-api/init.rst:1793 -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/init.rst:1802 -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/init.rst:1813 -msgid "" -"Sub-interpreters are most effective when isolated from each other, with " -"certain functionality restricted::" -msgstr "" - -#: c-api/init.rst:1831 -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:1840 -msgid "Extension modules are shared between (sub-)interpreters as follows:" -msgstr "" - -#: c-api/init.rst:1842 -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:1848 -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:1859 -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:1879 -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:1891 -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/init.rst:1896 -msgid "" -":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " -"explicitly destroyed at that point." -msgstr "" - -#: c-api/init.rst:1903 -msgid "A Per-Interpreter GIL" -msgstr "" - -#: c-api/init.rst:1905 -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/init.rst:1915 -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:1926 -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:1931 -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:1942 -msgid "Bugs and caveats" -msgstr "" - -#: c-api/init.rst:1944 -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:1954 -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:1960 -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:1971 -msgid "Asynchronous Notifications" -msgstr "" - -#: c-api/init.rst:1973 -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:1980 -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:1984 -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:1989 -msgid "on a :term:`bytecode` boundary;" -msgstr "" - -#: c-api/init.rst:1990 -msgid "" -"with the main thread holding an :term:`attached thread state` (*func* can " -"therefore use the full C API)." -msgstr "" - -#: c-api/init.rst:1993 -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/init.rst:1998 -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/init.rst:2003 -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:2012 -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:2018 -msgid "" -"This function now always schedules *func* to be run in the main interpreter." -msgstr "" - -#: c-api/init.rst:2025 -msgid "Profiling and Tracing" -msgstr "" - -#: c-api/init.rst:2030 -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:2034 -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:2044 -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:2053 -msgid "Value of *what*" -msgstr "" - -#: c-api/init.rst:2053 -msgid "Meaning of *arg*" -msgstr "" - -#: c-api/init.rst:2055 -#, fuzzy -msgid ":c:data:`PyTrace_CALL`" -msgstr ":const:`PyTrace_CALL`" - -#: c-api/init.rst:2060 c-api/init.rst:2071 -msgid "Always :c:data:`Py_None`." -msgstr "" - -#: c-api/init.rst:2057 -#, fuzzy -msgid ":c:data:`PyTrace_EXCEPTION`" -msgstr ":const:`PyTrace_EXCEPTION`" - -#: c-api/init.rst:2057 -msgid "Exception information as returned by :func:`sys.exc_info`." -msgstr "" - -#: c-api/init.rst:2060 -#, fuzzy -msgid ":c:data:`PyTrace_LINE`" -msgstr ":const:`PyTrace_LINE`" - -#: c-api/init.rst:2062 -#, fuzzy -msgid ":c:data:`PyTrace_RETURN`" -msgstr ":const:`PyTrace_RETURN`" - -#: c-api/init.rst:2062 -msgid "" -"Value being returned to the caller, or ``NULL`` if caused by an exception." -msgstr "" - -#: c-api/init.rst:2065 -#, fuzzy -msgid ":c:data:`PyTrace_C_CALL`" -msgstr ":const:`PyTrace_C_CALL`" - -#: c-api/init.rst:2067 c-api/init.rst:2069 -msgid "Function object being called." -msgstr "" - -#: c-api/init.rst:2067 -#, fuzzy -msgid ":c:data:`PyTrace_C_EXCEPTION`" -msgstr ":const:`PyTrace_C_EXCEPTION`" - -#: c-api/init.rst:2069 -#, fuzzy -msgid ":c:data:`PyTrace_C_RETURN`" -msgstr ":const:`PyTrace_C_RETURN`" - -#: c-api/init.rst:2071 -#, fuzzy -msgid ":c:data:`PyTrace_OPCODE`" -msgstr ":const:`PyTrace_OPCODE`" - -#: c-api/init.rst:2076 -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:2085 -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:2096 -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:2104 -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:2110 -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:2116 -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:2122 -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a C function has returned." -msgstr "" - -#: c-api/init.rst:2128 -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:2136 -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:2143 -msgid "See also the :func:`sys.setprofile` function." -msgstr "" - -#: c-api/init.rst:2149 -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:2154 -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:2162 -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:2169 -msgid "See also the :func:`sys.settrace` function." -msgstr "" - -#: c-api/init.rst:2175 -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:2180 -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:2186 -msgid "Reference tracing" -msgstr "" - -#: c-api/init.rst:2192 -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:2202 -msgid "" -"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " -"a Python object has been created." -msgstr "" - -#: c-api/init.rst:2207 -msgid "" -"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " -"a Python object has been destroyed." -msgstr "" - -#: c-api/init.rst:2212 -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:2218 -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. A :term:`thread state` will be " -"active every time the tracer function is called." -msgstr "" - -#: c-api/init.rst:2234 -msgid "" -"There must be an :term:`attached thread state` when calling this function." -msgstr "" - -#: c-api/init.rst:2229 -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:2241 -msgid "Advanced Debugger Support" -msgstr "Support avancé du débogueur" - -#: c-api/init.rst:2246 -msgid "" -"These functions are only intended to be used by advanced debugging tools." -msgstr "" - -#: c-api/init.rst:2251 -msgid "" -"Return the interpreter state object at the head of the list of all such " -"objects." -msgstr "" - -#: c-api/init.rst:2256 -msgid "Return the main interpreter state object." -msgstr "" - -#: c-api/init.rst:2261 -msgid "" -"Return the next interpreter state object after *interp* from the list of all " -"such objects." -msgstr "" - -#: c-api/init.rst:2267 -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:2273 -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:2280 -msgid "Thread Local Storage Support" -msgstr "" - -#: c-api/init.rst:2284 -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:2291 -msgid "" -"A :term:`thread state` does *not* need to be :term:`attached ` when calling these functions; they suppl their own locking." -msgstr "" - -#: c-api/init.rst:2294 -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:2298 -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:2306 -msgid "Thread Specific Storage (TSS) API" -msgstr "" - -#: c-api/init.rst:2308 -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:2314 -msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" -msgstr "" - -#: c-api/init.rst:2319 -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:2324 -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:2330 -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:2335 -msgid "Dynamic Allocation" -msgstr "" - -#: c-api/init.rst:2337 -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:2344 -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:2351 -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:2357 -msgid "" -"A freed key becomes a dangling pointer. You should reset the key to ``NULL``." -msgstr "" - -#: c-api/init.rst:2362 -msgid "Methods" -msgstr "Méthodes" - -#: c-api/init.rst:2364 -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:2372 -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:2378 -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:2387 -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:2396 -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:2403 -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:2411 -msgid "Thread Local Storage (TLS) API" -msgstr "" - -#: c-api/init.rst:2413 -msgid "" -"This API is superseded by :ref:`Thread Specific Storage (TSS) API `." -msgstr "" - -#: c-api/init.rst:2418 -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:2423 -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:2434 -msgid "Synchronization Primitives" -msgstr "Primitives de synchronisation" - -#: c-api/init.rst:2436 -msgid "The C-API provides a basic mutual exclusion lock." -msgstr "" - -#: c-api/init.rst:2440 -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:2445 -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:2451 -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:2459 -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/init.rst:2467 -msgid "" -"Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " -"issue a fatal error." -msgstr "" - -#: c-api/init.rst:2474 -msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise." -msgstr "" - -#: c-api/init.rst:2478 -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/init.rst:2487 -msgid "Python Critical Section API" -msgstr "" - -#: c-api/init.rst:2489 -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:2494 -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/init.rst:2501 -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/init.rst:2509 -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/init.rst:2515 -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:2522 -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:2528 -msgid "Example usage::" -msgstr "Exemple d'utilisation ::" - -#: c-api/init.rst:2539 -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:2547 -msgid "" -"Acquires the per-object lock for the object *op* and begins a critical " -"section." -msgstr "" - -#: c-api/init.rst:2564 c-api/init.rst:2596 c-api/init.rst:2627 -msgid "In the free-threaded build, this macro expands to::" -msgstr "" - -#: c-api/init.rst:2602 -msgid "In the default build, this macro expands to ``{``." -msgstr "" - -#: c-api/init.rst:2562 -msgid "Locks the mutex *m* and begins a critical section." -msgstr "" - -#: c-api/init.rst:2570 -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/init.rst:2619 -msgid "On the default build, this macro expands to ``{``." -msgstr "" - -#: c-api/init.rst:2579 -msgid "Ends the critical section and releases the per-object lock." -msgstr "" - -#: c-api/init.rst:2632 -msgid "In the default build, this macro expands to ``}``." -msgstr "" - -#: c-api/init.rst:2592 -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:2608 -msgid "Locks the mutexes *m1* and *m2* and begins a critical section." -msgstr "" - -#: c-api/init.rst:2616 -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/init.rst:2625 -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 cdaaf1e865..19c82af8cb 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: 2025-10-17 09:58+0200\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" @@ -99,7 +99,7 @@ msgid "Set *\\*err_msg* to ``NULL`` and return ``0`` otherwise." msgstr "" #: c-api/init_config.rst:105 -msgid "An error message is an UTF-8 encoded string." +msgid "An error message is a UTF-8 encoded string." msgstr "" #: c-api/init_config.rst:107 @@ -919,13 +919,13 @@ msgstr "" #: c-api/init_config.rst:547 msgid "" -"Public: Can by get by :c:func:`PyConfig_Get` and set " +"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 by get by :c:func:`PyConfig_Get`, but cannot be set " +"Read-only: Can be retrieved by :c:func:`PyConfig_Get`, but cannot be set " "by :c:func:`PyConfig_Set`." msgstr "" @@ -1086,7 +1086,7 @@ msgstr "" msgid "*index* must be greater than or equal to ``0``." msgstr "" -#: c-api/init_config.rst:751 c-api/init_config.rst:1177 +#: c-api/init_config.rst:751 c-api/init_config.rst:1175 msgid "Structure fields:" msgstr "" @@ -1298,7 +1298,7 @@ msgstr "" msgid "See the :term:`locale encoding`." msgstr "" -#: c-api/init_config.rst:962 c-api/init_config.rst:1333 +#: c-api/init_config.rst:962 c-api/init_config.rst:1336 msgid "Default: ``1`` in Python config, ``0`` in isolated config." msgstr "" @@ -1325,7 +1325,7 @@ msgid "" ":ref:`Python Development Mode `: see :c:member:`PyConfig.dev_mode`." msgstr "" -#: c-api/init_config.rst:1342 c-api/init_config.rst:1892 +#: c-api/init_config.rst:1345 c-api/init_config.rst:1895 msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" @@ -1333,7 +1333,7 @@ msgstr "" msgid "Isolated mode: see :c:member:`PyConfig.isolated`." msgstr "" -#: c-api/init_config.rst:1569 +#: c-api/init_config.rst:1572 msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." msgstr "" @@ -1359,16 +1359,16 @@ msgid "" "variable value." msgstr "" -#: c-api/init_config.rst:1583 +#: 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:1281 c-api/init_config.rst:1355 -#: c-api/init_config.rst:1505 c-api/init_config.rst:1586 -#: c-api/init_config.rst:1660 c-api/init_config.rst:1774 -#: c-api/init_config.rst:1857 c-api/init_config.rst:2018 +#: 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 "" @@ -1386,7 +1386,7 @@ msgid "" "See :c:member:`PyConfig.use_environment`." msgstr "" -#: c-api/init_config.rst:1933 +#: c-api/init_config.rst:1936 msgid "Default: ``1`` in Python config and ``0`` in isolated config." msgstr "" @@ -1400,73 +1400,70 @@ msgid "" "the :envvar:`PYTHONUTF8` environment variable." msgstr "" -#: c-api/init_config.rst:978 -msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``." -msgstr "" - -#: c-api/init_config.rst:980 -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:986 +#: c-api/init_config.rst:984 msgid "Preinitialize Python with PyPreConfig" msgstr "" -#: c-api/init_config.rst:988 +#: c-api/init_config.rst:986 msgid "The preinitialization of Python:" msgstr "" -#: c-api/init_config.rst:990 +#: c-api/init_config.rst:988 msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" msgstr "" -#: c-api/init_config.rst:991 +#: c-api/init_config.rst:989 msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" msgstr "" -#: c-api/init_config.rst:992 +#: c-api/init_config.rst:990 msgid "" "Set the :ref:`Python UTF-8 Mode ` " "(:c:member:`PyPreConfig.utf8_mode`)" msgstr "" -#: c-api/init_config.rst:995 +#: c-api/init_config.rst:993 msgid "" "The current preconfiguration (``PyPreConfig`` type) is stored in " "``_PyRuntime.preconfig``." msgstr "" -#: c-api/init_config.rst:998 +#: c-api/init_config.rst:996 msgid "Functions to preinitialize Python:" msgstr "" -#: c-api/init_config.rst:1008 c-api/init_config.rst:1017 +#: c-api/init_config.rst:1006 c-api/init_config.rst:1015 msgid "Preinitialize Python from *preconfig* preconfiguration." msgstr "" -#: c-api/init_config.rst:1013 c-api/init_config.rst:1022 +#: c-api/init_config.rst:1011 c-api/init_config.rst:1020 msgid "*preconfig* must not be ``NULL``." msgstr "" -#: c-api/init_config.rst:1010 +#: 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." msgstr "" -#: c-api/init_config.rst:1019 +#: 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." msgstr "" -#: c-api/init_config.rst:2041 +#: 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`." msgstr "" -#: c-api/init_config.rst:1027 +#: c-api/init_config.rst:1025 msgid "" "For :ref:`Python Configuration ` " "(:c:func:`PyPreConfig_InitPythonConfig`), if Python is initialized with " @@ -1476,7 +1473,7 @@ msgid "" "enables the :ref:`Python UTF-8 Mode `." msgstr "" -#: c-api/init_config.rst:1034 +#: 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 " @@ -1484,7 +1481,7 @@ msgid "" "if :c:member:`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." msgstr "" -#: c-api/init_config.rst:1039 +#: 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 " @@ -1492,89 +1489,89 @@ msgid "" "not be called before the Python preinitialization." msgstr "" -#: c-api/init_config.rst:1044 +#: 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:1066 +#: c-api/init_config.rst:1064 msgid "PyConfig" msgstr "" -#: c-api/init_config.rst:1070 +#: c-api/init_config.rst:1068 msgid "Structure containing most parameters to configure Python." msgstr "" -#: c-api/init_config.rst:1072 +#: 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:1077 +#: c-api/init_config.rst:1075 msgid "Structure methods:" msgstr "" -#: c-api/init_config.rst:1081 +#: c-api/init_config.rst:1079 msgid "" "Initialize configuration with the :ref:`Python Configuration `." msgstr "" -#: c-api/init_config.rst:1086 +#: c-api/init_config.rst:1084 msgid "" "Initialize configuration with the :ref:`Isolated Configuration `." msgstr "" -#: c-api/init_config.rst:1091 +#: c-api/init_config.rst:1089 msgid "Copy the wide character string *str* into ``*config_str``." msgstr "" -#: c-api/init_config.rst:1100 c-api/init_config.rst:1115 -#: c-api/init_config.rst:1138 +#: 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:1097 +#: 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:1104 +#: 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:1111 +#: 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`." msgstr "" -#: c-api/init_config.rst:1119 +#: c-api/init_config.rst:1117 msgid "Set the list of wide strings *list* to *length* and *items*." msgstr "" -#: c-api/init_config.rst:1125 +#: c-api/init_config.rst:1123 msgid "Read all Python configuration." msgstr "" -#: c-api/init_config.rst:1127 +#: c-api/init_config.rst:1125 msgid "Fields which are already initialized are left unchanged." msgstr "" -#: c-api/init_config.rst:1129 +#: 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:1689 +#: 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 " @@ -1583,7 +1580,7 @@ msgid "" "application options as Python options." msgstr "" -#: c-api/init_config.rst:1140 +#: 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 " @@ -1591,43 +1588,43 @@ msgid "" "equals ``1``." msgstr "" -#: c-api/init_config.rst:1146 +#: 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:1154 +#: c-api/init_config.rst:1152 msgid "Release configuration memory." msgstr "" -#: c-api/init_config.rst:1156 +#: 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 " +"(: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:1162 +#: c-api/init_config.rst:1160 msgid ":c:member:`PyConfig.dev_mode`" msgstr "" -#: c-api/init_config.rst:1163 +#: c-api/init_config.rst:1161 msgid ":c:member:`PyConfig.isolated`" msgstr "" -#: c-api/init_config.rst:1164 +#: c-api/init_config.rst:1162 msgid ":c:member:`PyConfig.parse_argv`" msgstr "" -#: c-api/init_config.rst:1165 +#: c-api/init_config.rst:1163 msgid ":c:member:`PyConfig.use_environment`" msgstr "" -#: c-api/init_config.rst:1167 +#: 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 " @@ -1635,13 +1632,13 @@ msgid "" "(if :c:member:`~PyConfig.parse_argv` is non-zero)." msgstr "" -#: c-api/init_config.rst:1172 +#: 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:1185 +#: 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 " @@ -1652,7 +1649,7 @@ msgid "" "string." msgstr "" -#: c-api/init_config.rst:1193 +#: 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 " @@ -1660,434 +1657,436 @@ msgid "" "from :c:member:`~PyConfig.argv`." msgstr "" -#: c-api/init_config.rst:1198 +#: 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:1228 c-api/init_config.rst:1252 -#: c-api/init_config.rst:1372 c-api/init_config.rst:1474 -#: c-api/init_config.rst:1731 c-api/init_config.rst:1765 -#: c-api/init_config.rst:1795 c-api/init_config.rst:1817 -#: c-api/init_config.rst:1920 +#: 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:1203 +#: c-api/init_config.rst:1201 msgid "See also the :c:member:`~PyConfig.orig_argv` member." msgstr "" -#: c-api/init_config.rst:1207 +#: c-api/init_config.rst:1205 msgid "" "If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path " "to :data:`sys.path` at startup:" msgstr "" -#: c-api/init_config.rst:1210 +#: 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:1212 +#: 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:1214 +#: 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:1217 +#: c-api/init_config.rst:1215 msgid "" "Set to ``1`` by the :option:`-P` command line option and " "the :envvar:`PYTHONSAFEPATH` environment variable." msgstr "" -#: c-api/init_config.rst:1220 +#: c-api/init_config.rst:1218 msgid "Default: ``0`` in Python config, ``1`` in isolated config." msgstr "" -#: c-api/init_config.rst:1226 +#: c-api/init_config.rst:1224 msgid ":data:`sys.base_exec_prefix`." msgstr "" -#: c-api/init_config.rst:1244 c-api/init_config.rst:1374 -#: c-api/init_config.rst:1647 c-api/init_config.rst:1733 +#: 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:1232 +#: c-api/init_config.rst:1230 msgid "See also :c:member:`PyConfig.exec_prefix`." msgstr "" -#: c-api/init_config.rst:1236 +#: c-api/init_config.rst:1234 msgid "Python base executable: :data:`sys._base_executable`." msgstr "" -#: c-api/init_config.rst:1238 +#: c-api/init_config.rst:1236 msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." msgstr "" -#: c-api/init_config.rst:1240 +#: c-api/init_config.rst:1238 msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." msgstr "" -#: c-api/init_config.rst:1246 +#: c-api/init_config.rst:1244 msgid "See also :c:member:`PyConfig.executable`." msgstr "" -#: c-api/init_config.rst:1250 +#: c-api/init_config.rst:1248 msgid ":data:`sys.base_prefix`." msgstr "" -#: c-api/init_config.rst:1256 +#: c-api/init_config.rst:1254 msgid "See also :c:member:`PyConfig.prefix`." msgstr "" -#: c-api/init_config.rst:1260 +#: 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:1263 +#: c-api/init_config.rst:1261 msgid "" "Set to ``0`` by the :option:`-u` command line option and " "the :envvar:`PYTHONUNBUFFERED` environment variable." msgstr "" -#: c-api/init_config.rst:1266 +#: c-api/init_config.rst:1264 msgid "stdin is always opened in buffered mode." msgstr "" -#: c-api/init_config.rst:1301 c-api/init_config.rst:2003 -msgid "Default: ``1``." -msgstr "" - -#: c-api/init_config.rst:1272 +#: 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`." msgstr "" -#: c-api/init_config.rst:1276 +#: 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:1279 +#: c-api/init_config.rst:1277 msgid "Incremented by the :option:`-b` command line option." msgstr "" -#: c-api/init_config.rst:1285 +#: 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." msgstr "" -#: c-api/init_config.rst:1294 +#: 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:1298 +#: 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:1307 +#: 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." msgstr "" -#: c-api/init_config.rst:1310 +#: c-api/init_config.rst:1313 msgid "Valid values:" msgstr "" -#: c-api/init_config.rst:1312 +#: 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:1314 +#: c-api/init_config.rst:1317 msgid "``L\"never\"``: Assume that hash-based pycs always are valid." msgstr "" -#: c-api/init_config.rst:1315 +#: 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:1318 +#: c-api/init_config.rst:1321 msgid "Default: ``L\"default\"``." msgstr "" -#: c-api/init_config.rst:1320 +#: c-api/init_config.rst:1323 msgid "See also :pep:`552` \"Deterministic pycs\"." msgstr "" -#: c-api/init_config.rst:1324 +#: c-api/init_config.rst:1327 msgid "If non-zero, configure C standard streams:" msgstr "" -#: c-api/init_config.rst:1326 +#: 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:1328 +#: 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:1330 +#: 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:1337 +#: c-api/init_config.rst:1340 msgid "If non-zero, enable the :ref:`Python Development Mode `." msgstr "" -#: c-api/init_config.rst:1339 +#: c-api/init_config.rst:1342 msgid "" "Set to ``1`` by the :option:`-X dev <-X>` option and " "the :envvar:`PYTHONDEVMODE` environment variable." msgstr "" -#: c-api/init_config.rst:1346 +#: c-api/init_config.rst:1349 msgid "Dump Python references?" msgstr "" -#: c-api/init_config.rst:1348 +#: 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:1350 +#: c-api/init_config.rst:1353 msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." msgstr "" -#: c-api/init_config.rst:1352 +#: 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:1359 +#: c-api/init_config.rst:1362 msgid "Filename where to dump Python references." msgstr "" -#: c-api/init_config.rst:1361 +#: c-api/init_config.rst:1364 msgid "Set by the :envvar:`PYTHONDUMPREFSFILE` environment variable." msgstr "" -#: c-api/init_config.rst:1369 +#: 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:1376 +#: c-api/init_config.rst:1379 msgid "See also :c:member:`PyConfig.base_exec_prefix`." msgstr "" -#: c-api/init_config.rst:1380 +#: c-api/init_config.rst:1383 msgid "" "The absolute path of the executable binary for the Python " "interpreter: :data:`sys.executable`." msgstr "" -#: c-api/init_config.rst:1387 +#: c-api/init_config.rst:1390 msgid "See also :c:member:`PyConfig.base_executable`." msgstr "" -#: c-api/init_config.rst:1391 +#: c-api/init_config.rst:1394 msgid "Enable faulthandler?" msgstr "" -#: c-api/init_config.rst:1393 +#: c-api/init_config.rst:1396 msgid "If non-zero, call :func:`faulthandler.enable` at startup." msgstr "" -#: c-api/init_config.rst:1395 +#: c-api/init_config.rst:1398 msgid "" "Set to ``1`` by :option:`-X faulthandler <-X>` and " "the :envvar:`PYTHONFAULTHANDLER` environment variable." msgstr "" -#: c-api/init_config.rst:1402 +#: c-api/init_config.rst:1405 msgid "" ":term:`Filesystem encoding `: :func:`sys.getfilesystemencoding`." msgstr "" -#: c-api/init_config.rst:1405 +#: c-api/init_config.rst:1408 msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." msgstr "" -#: c-api/init_config.rst:1407 +#: 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." msgstr "" -#: c-api/init_config.rst:1411 +#: c-api/init_config.rst:1414 msgid "Default encoding on other platforms:" msgstr "" -#: c-api/init_config.rst:1413 +#: c-api/init_config.rst:1416 msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: c-api/init_config.rst:1414 +#: 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:1417 +#: c-api/init_config.rst:1420 msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." msgstr "" -#: c-api/init_config.rst:1418 +#: c-api/init_config.rst:1421 msgid "" "Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." msgstr "" -#: c-api/init_config.rst:1421 +#: 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:1424 +#: c-api/init_config.rst:1427 msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." msgstr "" -#: c-api/init_config.rst:1428 +#: c-api/init_config.rst:1431 msgid "" ":term:`Filesystem error handler `: :func:`sys.getfilesystemencodeerrors`." msgstr "" -#: c-api/init_config.rst:1431 +#: 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." msgstr "" -#: c-api/init_config.rst:1435 +#: c-api/init_config.rst:1438 msgid "On other platforms: use ``\"surrogateescape\"`` by default." msgstr "" -#: c-api/init_config.rst:1437 +#: c-api/init_config.rst:1440 msgid "Supported error handlers:" msgstr "" -#: c-api/init_config.rst:1439 +#: c-api/init_config.rst:1442 msgid "``\"strict\"``" msgstr "" -#: c-api/init_config.rst:1440 +#: c-api/init_config.rst:1443 msgid "``\"surrogateescape\"``" msgstr "" -#: c-api/init_config.rst:1441 +#: c-api/init_config.rst:1444 msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" msgstr "" -#: c-api/init_config.rst:1443 +#: c-api/init_config.rst:1446 msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." msgstr "" -#: c-api/init_config.rst:1447 +#: c-api/init_config.rst:1450 msgid "If non-zero, use frozen modules." msgstr "" -#: c-api/init_config.rst:1449 +#: c-api/init_config.rst:1452 msgid "Set by the :envvar:`PYTHON_FROZEN_MODULES` environment variable." msgstr "" -#: c-api/init_config.rst:1451 +#: 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:1457 +#: c-api/init_config.rst:1460 msgid "Randomized hash function seed." msgstr "" -#: c-api/init_config.rst:1459 +#: 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:1462 +#: c-api/init_config.rst:1465 msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." msgstr "" -#: c-api/init_config.rst:1464 +#: 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:1469 +#: 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:1472 +#: c-api/init_config.rst:1475 msgid "Set by the :envvar:`PYTHONHOME` environment variable." msgstr "" -#: c-api/init_config.rst:1612 c-api/init_config.rst:1721 -#: c-api/init_config.rst:1752 +#: 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:1480 +#: 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:1484 +#: c-api/init_config.rst:1487 msgid "" "Set by the :option:`-X importtime <-X>` option and " "the :envvar:`PYTHONPROFILEIMPORTTIME` environment variable." msgstr "" -#: c-api/init_config.rst:1491 +#: c-api/init_config.rst:1494 msgid "Added support for ``import_time = 2``" msgstr "" -#: c-api/init_config.rst:1495 +#: c-api/init_config.rst:1498 msgid "Enter interactive mode after executing a script or a command." msgstr "" -#: c-api/init_config.rst:1497 +#: 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 " @@ -2095,29 +2094,29 @@ msgid "" "a terminal." msgstr "" -#: c-api/init_config.rst:1502 +#: 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." msgstr "" -#: c-api/init_config.rst:1509 +#: c-api/init_config.rst:1512 msgid "Install Python signal handlers?" msgstr "" -#: c-api/init_config.rst:1695 c-api/init_config.rst:1955 +#: 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:1515 +#: c-api/init_config.rst:1518 msgid "If greater than ``0``, enable the interactive mode (REPL)." msgstr "" -#: c-api/init_config.rst:1517 +#: c-api/init_config.rst:1520 msgid "Incremented by the :option:`-i` command line option." msgstr "" -#: c-api/init_config.rst:1523 +#: 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 " @@ -2128,19 +2127,19 @@ msgid "" "produce an error." msgstr "" -#: c-api/init_config.rst:1531 +#: 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:1534 +#: c-api/init_config.rst:1537 msgid "" "Default: ``-1`` in Python mode. 4300 " "(:data:`sys.int_info.default_max_str_digits`) in isolated mode." msgstr "" -#: c-api/init_config.rst:1541 +#: 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 " @@ -2148,104 +2147,104 @@ msgid "" "and :func:`multiprocessing.cpu_count`." msgstr "" -#: c-api/init_config.rst:1545 +#: 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." msgstr "" -#: c-api/init_config.rst:1909 +#: c-api/init_config.rst:1912 msgid "Default: ``-1``." msgstr "" -#: c-api/init_config.rst:1554 +#: c-api/init_config.rst:1557 msgid "If greater than ``0``, enable isolated mode:" msgstr "" -#: c-api/init_config.rst:1556 +#: 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:1560 +#: 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:1562 +#: 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:1564 +#: 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:1567 +#: c-api/init_config.rst:1570 msgid "Set to ``1`` by the :option:`-I` command line option." msgstr "" -#: c-api/init_config.rst:1571 +#: c-api/init_config.rst:1574 msgid "" "See also the :ref:`Isolated Configuration ` " "and :c:member:`PyPreConfig.isolated`." msgstr "" -#: c-api/init_config.rst:1576 +#: 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`." msgstr "" -#: c-api/init_config.rst:1580 +#: 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:1588 +#: 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:1592 +#: 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:1595 +#: c-api/init_config.rst:1598 msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." msgstr "" -#: c-api/init_config.rst:1597 +#: 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:1604 +#: c-api/init_config.rst:1607 msgid "Platform library directory name: :data:`sys.platlibdir`." msgstr "" -#: c-api/init_config.rst:1606 +#: c-api/init_config.rst:1609 msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." msgstr "" -#: c-api/init_config.rst:1608 +#: 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)." msgstr "" -#: c-api/init_config.rst:1616 +#: 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 " @@ -2253,21 +2252,21 @@ msgid "" "and virtual environments." msgstr "" -#: c-api/init_config.rst:1625 +#: c-api/init_config.rst:1628 msgid "" "Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` " "(:data:`os.pathsep`)." msgstr "" -#: c-api/init_config.rst:1628 +#: c-api/init_config.rst:1631 msgid "Set by the :envvar:`PYTHONPATH` environment variable." msgstr "" -#: c-api/init_config.rst:1637 +#: c-api/init_config.rst:1640 msgid "Module search paths: :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:1639 +#: c-api/init_config.rst:1642 msgid "" "If :c:member:`~PyConfig.module_search_paths_set` is equal to " "``0``, :c:func:`Py_InitializeFromConfig` will " @@ -2275,41 +2274,41 @@ msgid "" "sets :c:member:`~PyConfig.module_search_paths_set` to ``1``." msgstr "" -#: c-api/init_config.rst:1644 +#: 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:1651 +#: c-api/init_config.rst:1654 msgid "Compilation optimization level:" msgstr "" -#: c-api/init_config.rst:1653 +#: c-api/init_config.rst:1656 msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." msgstr "" -#: c-api/init_config.rst:1654 +#: c-api/init_config.rst:1657 msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." msgstr "" -#: c-api/init_config.rst:1655 +#: c-api/init_config.rst:1658 msgid "``2``: Level 1, strip docstrings." msgstr "" -#: c-api/init_config.rst:1657 +#: c-api/init_config.rst:1660 msgid "" "Incremented by the :option:`-O` command line option. Set to " "the :envvar:`PYTHONOPTIMIZE` environment variable value." msgstr "" -#: c-api/init_config.rst:1664 +#: 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:1667 +#: 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 " @@ -2319,440 +2318,440 @@ msgid "" "non-zero)." msgstr "" -#: c-api/init_config.rst:1674 +#: c-api/init_config.rst:1677 msgid "" "See also the :c:member:`~PyConfig.argv` member and " "the :c:func:`Py_GetArgcArgv` function." msgstr "" -#: c-api/init_config.rst:1990 c-api/init_config.rst:2009 +#: c-api/init_config.rst:1993 c-api/init_config.rst:2012 msgid "Default: empty list." msgstr "" -#: c-api/init_config.rst:1683 +#: c-api/init_config.rst:1686 msgid "Parse command line arguments?" msgstr "" -#: c-api/init_config.rst:1685 +#: 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:1697 +#: 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``." msgstr "" -#: c-api/init_config.rst:1703 +#: 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:1706 +#: c-api/init_config.rst:1709 msgid "" "Incremented by the :option:`-d` command line option. Set to " "the :envvar:`PYTHONDEBUG` environment variable value." msgstr "" -#: c-api/init_config.rst:1814 +#: 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:1716 +#: 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:1723 +#: c-api/init_config.rst:1726 msgid "Now also applies on Windows." msgstr "" -#: c-api/init_config.rst:1728 +#: 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:1735 +#: c-api/init_config.rst:1738 msgid "See also :c:member:`PyConfig.base_prefix`." msgstr "" -#: c-api/init_config.rst:1739 +#: 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:1742 +#: c-api/init_config.rst:1745 msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." msgstr "" -#: c-api/init_config.rst:1743 +#: c-api/init_config.rst:1746 msgid "" "If the ``WITH_NEXT_FRAMEWORK`` macro is defined, " "use :envvar:`__PYVENV_LAUNCHER__` environment variable if set." msgstr "" -#: c-api/init_config.rst:1745 +#: 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:1747 +#: 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:1756 +#: c-api/init_config.rst:1759 msgid "" "Directory where cached ``.pyc`` files are " "written: :data:`sys.pycache_prefix`." msgstr "" -#: c-api/init_config.rst:1759 +#: 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:1763 +#: c-api/init_config.rst:1766 msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." msgstr "" -#: c-api/init_config.rst:1769 +#: 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:1772 +#: c-api/init_config.rst:1775 msgid "Incremented by the :option:`-q` command line option." msgstr "" -#: c-api/init_config.rst:1778 +#: c-api/init_config.rst:1781 msgid "Value of the :option:`-c` command line option." msgstr "" -#: c-api/init_config.rst:1801 +#: c-api/init_config.rst:1804 msgid "Used by :c:func:`Py_RunMain`." msgstr "" -#: c-api/init_config.rst:1786 +#: 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." msgstr "" -#: c-api/init_config.rst:1790 +#: 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:1793 +#: c-api/init_config.rst:1796 msgid "See also the :c:member:`PyConfig.skip_source_first_line` option." msgstr "" -#: c-api/init_config.rst:1799 +#: c-api/init_config.rst:1802 msgid "Value of the :option:`-m` command line option." msgstr "" -#: c-api/init_config.rst:1807 +#: 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:1810 +#: 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:1821 +#: c-api/init_config.rst:1824 msgid "" "Show total reference count at exit (excluding :term:`immortal` objects)?" msgstr "" -#: c-api/init_config.rst:1823 +#: c-api/init_config.rst:1826 msgid "Set to ``1`` by :option:`-X showrefcount <-X>` command line option." msgstr "" -#: c-api/init_config.rst:1825 +#: 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:1832 +#: c-api/init_config.rst:1835 msgid "Import the :mod:`site` module at startup?" msgstr "" -#: c-api/init_config.rst:1834 +#: 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:1837 +#: 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:1840 +#: c-api/init_config.rst:1843 msgid "Set to ``0`` by the :option:`-S` command line option." msgstr "" -#: c-api/init_config.rst:1842 +#: c-api/init_config.rst:1845 msgid "" ":data:`sys.flags.no_site ` is set to the inverted value " "of :c:member:`~PyConfig.site_import`." msgstr "" -#: c-api/init_config.rst:1849 +#: 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:1852 +#: 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:1855 +#: c-api/init_config.rst:1858 msgid "Set to ``1`` by the :option:`-x` command line option." msgstr "" -#: c-api/init_config.rst:1862 +#: 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 " "``\"backslashreplace\"`` error handler)." msgstr "" -#: c-api/init_config.rst:1866 +#: c-api/init_config.rst:1869 msgid "" "Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." msgstr "" -#: c-api/init_config.rst:1869 +#: c-api/init_config.rst:1872 msgid "Default encoding:" msgstr "" -#: c-api/init_config.rst:1871 +#: c-api/init_config.rst:1874 msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: c-api/init_config.rst:1872 +#: c-api/init_config.rst:1875 msgid "Otherwise, use the :term:`locale encoding`." msgstr "" -#: c-api/init_config.rst:1874 +#: c-api/init_config.rst:1877 msgid "Default error handler:" msgstr "" -#: c-api/init_config.rst:1876 +#: c-api/init_config.rst:1879 msgid "On Windows: use ``\"surrogateescape\"``." msgstr "" -#: c-api/init_config.rst:1877 +#: 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:1879 +#: c-api/init_config.rst:1882 msgid "``\"strict\"`` otherwise." msgstr "" -#: c-api/init_config.rst:1881 +#: c-api/init_config.rst:1884 msgid "See also :c:member:`PyConfig.legacy_windows_stdio`." msgstr "" -#: c-api/init_config.rst:1885 +#: c-api/init_config.rst:1888 msgid "Enable tracemalloc?" msgstr "" -#: c-api/init_config.rst:1887 +#: c-api/init_config.rst:1890 msgid "If non-zero, call :func:`tracemalloc.start` at startup." msgstr "" -#: c-api/init_config.rst:1889 +#: c-api/init_config.rst:1892 msgid "" "Set by :option:`-X tracemalloc=N <-X>` command line option and by " "the :envvar:`PYTHONTRACEMALLOC` environment variable." msgstr "" -#: c-api/init_config.rst:1896 +#: c-api/init_config.rst:1899 msgid "Enable the Linux ``perf`` profiler support?" msgstr "" -#: c-api/init_config.rst:1898 +#: c-api/init_config.rst:1901 msgid "If equals to ``1``, enable support for the Linux ``perf`` profiler." msgstr "" -#: c-api/init_config.rst:1900 +#: c-api/init_config.rst:1903 msgid "" "If equals to ``2``, enable support for the Linux ``perf`` profiler with " "DWARF JIT support." msgstr "" -#: c-api/init_config.rst:1903 +#: c-api/init_config.rst:1906 msgid "" "Set to ``1`` by :option:`-X perf <-X>` command-line option and " "the :envvar:`PYTHONPERFSUPPORT` environment variable." msgstr "" -#: c-api/init_config.rst:1906 +#: 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:1912 +#: c-api/init_config.rst:1915 msgid "See :ref:`perf_profiling` for more information." msgstr "" -#: c-api/init_config.rst:1918 +#: c-api/init_config.rst:1921 msgid "Directory of the Python standard library." msgstr "" -#: c-api/init_config.rst:1926 +#: c-api/init_config.rst:1929 msgid "Use :ref:`environment variables `?" msgstr "" -#: c-api/init_config.rst:1928 +#: c-api/init_config.rst:1931 msgid "" "If equals to zero, ignore the :ref:`environment variables `." msgstr "" -#: c-api/init_config.rst:1931 +#: c-api/init_config.rst:1934 msgid "Set to ``0`` by the :option:`-E` environment variable." msgstr "" -#: c-api/init_config.rst:1937 +#: 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:1940 +#: c-api/init_config.rst:1943 msgid "Only available on macOS 10.12 and later, and on iOS." msgstr "" -#: c-api/init_config.rst:1942 +#: 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:1949 +#: 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:1951 +#: 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:1953 +#: c-api/init_config.rst:1956 msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." msgstr "" -#: c-api/init_config.rst:1959 +#: 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:1963 +#: 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:1967 +#: c-api/init_config.rst:1970 msgid "Incremented by the :option:`-v` command line option." msgstr "" -#: c-api/init_config.rst:1969 +#: c-api/init_config.rst:1972 msgid "Set by the :envvar:`PYTHONVERBOSE` environment variable value." msgstr "" -#: c-api/init_config.rst:1975 +#: 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:1978 +#: 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:1983 +#: 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." msgstr "" -#: c-api/init_config.rst:1986 +#: 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 " "(``,``)." msgstr "" -#: c-api/init_config.rst:1994 +#: 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:1997 +#: c-api/init_config.rst:2000 msgid "" "Set to ``0`` by the :option:`-B` command line option and " "the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable." msgstr "" -#: c-api/init_config.rst:2000 +#: c-api/init_config.rst:2003 msgid "" ":data:`sys.dont_write_bytecode` is initialized to the inverted value " "of :c:member:`~PyConfig.write_bytecode`." msgstr "" -#: c-api/init_config.rst:2007 +#: c-api/init_config.rst:2010 msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." msgstr "" -#: c-api/init_config.rst:2013 +#: c-api/init_config.rst:2016 msgid "If non-zero, write performance statistics at Python exit." msgstr "" -#: c-api/init_config.rst:2015 +#: 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:2020 +#: 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 " @@ -2760,27 +2759,27 @@ msgid "" "from :c:member:`~PyConfig.argv`." msgstr "" -#: c-api/init_config.rst:2025 +#: 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:2030 +#: c-api/init_config.rst:2033 msgid "The ``show_alloc_count`` field has been removed." msgstr "" -#: c-api/init_config.rst:2036 +#: c-api/init_config.rst:2039 msgid "Initialization with PyConfig" msgstr "" -#: c-api/init_config.rst:2038 +#: 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:2044 +#: 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 " @@ -2790,17 +2789,17 @@ msgid "" "initialization." msgstr "" -#: c-api/init_config.rst:2051 +#: c-api/init_config.rst:2054 msgid "" "The current configuration (``PyConfig`` type) is stored in " "``PyInterpreterState.config``." msgstr "" -#: c-api/init_config.rst:2054 +#: c-api/init_config.rst:2057 msgid "Example setting the program name::" msgstr "" -#: c-api/init_config.rst:2082 +#: 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 " @@ -2809,11 +2808,11 @@ msgid "" "called will be left unchanged by initialization::" msgstr "" -#: c-api/init_config.rst:2145 +#: c-api/init_config.rst:2148 msgid "Isolated Configuration" msgstr "" -#: c-api/init_config.rst:2147 +#: c-api/init_config.rst:2150 msgid "" ":c:func:`PyPreConfig_InitIsolatedConfig` " "and :c:func:`PyConfig_InitIsolatedConfig` functions create a configuration " @@ -2821,7 +2820,7 @@ msgid "" "application." msgstr "" -#: c-api/init_config.rst:2152 +#: 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) " @@ -2829,31 +2828,31 @@ msgid "" "LC_CTYPE locale are left unchanged. Signal handlers are not installed." msgstr "" -#: c-api/init_config.rst:2157 +#: 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:2165 +#: c-api/init_config.rst:2168 msgid "Python Configuration" msgstr "" -#: c-api/init_config.rst:2167 +#: 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." msgstr "" -#: c-api/init_config.rst:2171 +#: 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:2174 +#: 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 " @@ -2861,92 +2860,92 @@ msgid "" "variables." msgstr "" -#: c-api/init_config.rst:2183 +#: c-api/init_config.rst:2186 msgid "Python Path Configuration" msgstr "" -#: c-api/init_config.rst:2185 +#: c-api/init_config.rst:2188 msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" msgstr "" -#: c-api/init_config.rst:2187 +#: c-api/init_config.rst:2190 msgid "Path configuration inputs:" msgstr "" -#: c-api/init_config.rst:2189 +#: c-api/init_config.rst:2192 msgid ":c:member:`PyConfig.home`" msgstr "" -#: c-api/init_config.rst:2190 +#: c-api/init_config.rst:2193 msgid ":c:member:`PyConfig.platlibdir`" msgstr "" -#: c-api/init_config.rst:2191 +#: c-api/init_config.rst:2194 msgid ":c:member:`PyConfig.pathconfig_warnings`" msgstr "" -#: c-api/init_config.rst:2192 +#: c-api/init_config.rst:2195 msgid ":c:member:`PyConfig.program_name`" msgstr "" -#: c-api/init_config.rst:2193 +#: c-api/init_config.rst:2196 msgid ":c:member:`PyConfig.pythonpath_env`" msgstr "" -#: c-api/init_config.rst:2194 +#: c-api/init_config.rst:2197 msgid "current working directory: to get absolute paths" msgstr "" -#: c-api/init_config.rst:2195 +#: c-api/init_config.rst:2198 msgid "" "``PATH`` environment variable to get the program full path " "(from :c:member:`PyConfig.program_name`)" msgstr "" -#: c-api/init_config.rst:2197 +#: c-api/init_config.rst:2200 msgid "``__PYVENV_LAUNCHER__`` environment variable" msgstr "" -#: c-api/init_config.rst:2198 +#: 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:2202 +#: c-api/init_config.rst:2205 msgid "Path configuration output fields:" msgstr "" -#: c-api/init_config.rst:2204 +#: c-api/init_config.rst:2207 msgid ":c:member:`PyConfig.base_exec_prefix`" msgstr "" -#: c-api/init_config.rst:2205 +#: c-api/init_config.rst:2208 msgid ":c:member:`PyConfig.base_executable`" msgstr "" -#: c-api/init_config.rst:2206 +#: c-api/init_config.rst:2209 msgid ":c:member:`PyConfig.base_prefix`" msgstr "" -#: c-api/init_config.rst:2207 +#: c-api/init_config.rst:2210 msgid ":c:member:`PyConfig.exec_prefix`" msgstr "" -#: c-api/init_config.rst:2208 +#: c-api/init_config.rst:2211 msgid ":c:member:`PyConfig.executable`" msgstr "" -#: c-api/init_config.rst:2209 +#: 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:2211 +#: c-api/init_config.rst:2214 msgid ":c:member:`PyConfig.prefix`" msgstr "" -#: c-api/init_config.rst:2213 +#: 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. " @@ -2955,7 +2954,7 @@ msgid "" "and :c:member:`~PyConfig.module_search_paths_set` is set to ``1``." msgstr "" -#: c-api/init_config.rst:2219 +#: 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 " @@ -2965,14 +2964,14 @@ msgid "" "modification." msgstr "" -#: c-api/init_config.rst:2226 +#: 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:2229 +#: 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 " @@ -2980,38 +2979,38 @@ msgid "" "and :c:member:`~PyConfig.exec_prefix` respectively." msgstr "" -#: c-api/init_config.rst:2233 +#: 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:2235 +#: 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`." msgstr "" -#: c-api/init_config.rst:2238 +#: c-api/init_config.rst:2241 msgid "If :c:member:`~PyConfig.isolated` is zero:" msgstr "" -#: c-api/init_config.rst:2240 +#: 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:2242 +#: 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:2244 +#: c-api/init_config.rst:2247 msgid "Otherwise, prepend an empty string to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:2246 +#: 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. " @@ -3020,43 +3019,47 @@ msgid "" "package directory to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:2252 +#: c-api/init_config.rst:2255 msgid "The following configuration files are used by the path configuration:" msgstr "" -#: c-api/init_config.rst:2254 +#: c-api/init_config.rst:2257 msgid "``pyvenv.cfg``" msgstr "" -#: c-api/init_config.rst:2255 +#: c-api/init_config.rst:2258 msgid "``._pth`` file (ex: ``python._pth``)" msgstr "" -#: c-api/init_config.rst:2256 +#: c-api/init_config.rst:2259 msgid "``pybuilddir.txt`` (Unix only)" msgstr "" -#: c-api/init_config.rst:2258 +#: c-api/init_config.rst:2261 msgid "If a ``._pth`` file is present:" msgstr "" -#: c-api/init_config.rst:2260 +#: c-api/init_config.rst:2263 msgid "Set :c:member:`~PyConfig.isolated` to ``1``." msgstr "" -#: c-api/init_config.rst:2261 +#: c-api/init_config.rst:2264 msgid "Set :c:member:`~PyConfig.use_environment` to ``0``." msgstr "" -#: c-api/init_config.rst:2262 +#: c-api/init_config.rst:2265 msgid "Set :c:member:`~PyConfig.site_import` to ``0``." msgstr "" -#: c-api/init_config.rst:2263 +#: 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:2265 +#: c-api/init_config.rst:2269 msgid "" "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 " @@ -3067,47 +3070,147 @@ msgid "" "more information." msgstr "" -#: c-api/init_config.rst:2273 +#: 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:2278 +#: 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:2284 +#: 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:2294 msgid "Py_GetArgcArgv()" msgstr "" -#: c-api/init_config.rst:2288 +#: c-api/init_config.rst:2298 msgid "Get the original command line arguments, before Python modified them." msgstr "" -#: c-api/init_config.rst:2290 +#: c-api/init_config.rst:2300 msgid "See also :c:member:`PyConfig.orig_argv` member." msgstr "" -#: c-api/init_config.rst:2293 -msgid "Delaying main module execution" +#: c-api/init_config.rst:2304 +msgid "Multi-Phase Initialization Private Provisional API" msgstr "" -#: c-api/init_config.rst:2295 +#: c-api/init_config.rst:2306 msgid "" -"In some embedding use cases, it may be desirable to separate interpreter " -"initialization from the execution of the main module." +"This section is a private provisional API introducing multi-phase " +"initialization, the core feature of :pep:`432`:" msgstr "" -#: c-api/init_config.rst:2298 +#: c-api/init_config.rst:2309 +msgid "\"Core\" initialization phase, \"bare minimum Python\":" +msgstr "" + +#: c-api/init_config.rst:2311 +msgid "Builtin types;" +msgstr "" + +#: c-api/init_config.rst:2312 +msgid "Builtin exceptions;" +msgstr "" + +#: c-api/init_config.rst:2313 +msgid "Builtin and frozen modules;" +msgstr "" + +#: 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:2317 +msgid "\"Main\" initialization phase, Python is fully initialized:" +msgstr "" + +#: c-api/init_config.rst:2319 +msgid "Install and configure :mod:`importlib`;" +msgstr "" + +#: c-api/init_config.rst:2320 +msgid "Apply the :ref:`Path Configuration `;" +msgstr "" + +#: c-api/init_config.rst:2321 +msgid "Install signal handlers;" +msgstr "" + +#: c-api/init_config.rst:2322 +msgid "" +"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` " +"and :data:`sys.path`);" +msgstr "" + +#: c-api/init_config.rst:2324 +msgid "" +"Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" +msgstr "" + +#: c-api/init_config.rst:2325 +msgid "Import the :mod:`site` module;" +msgstr "" + +#: c-api/init_config.rst:2326 +msgid "etc." +msgstr "" + +#: c-api/init_config.rst:2328 +msgid "Private provisional API:" +msgstr "" + +#: c-api/init_config.rst:2332 +msgid "" +"If set to ``0``, :c:func:`Py_InitializeFromConfig` stops at the \"Core\" " +"initialization phase." +msgstr "" + +#: c-api/init_config.rst:2337 +msgid "" +"Move to the \"Main\" initialization phase, finish the Python initialization." +msgstr "" + +#: 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 " +"applied during the \"Main\" phase. It may allow to customize Python in " +"Python to override or tune the :ref:`Path Configuration `, " +"maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." +msgstr "" + +#: 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: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 " +"private and provisional: the API can be modified or even be removed anytime " +"until a proper public API is designed." +msgstr "" + +#: c-api/init_config.rst:2354 msgid "" -"This separation can be achieved by setting ``PyConfig.run_command`` to the " -"empty string during initialization (to prevent the interpreter from dropping " -"into the interactive prompt), and then subsequently executing the desired " -"main module code using ``__main__.__dict__`` as the global namespace." +"Example running Python code between \"Core\" and \"Main\" initialization " +"phases::" msgstr "" #, fuzzy diff --git a/c-api/interp-lifecycle.po b/c-api/interp-lifecycle.po new file mode 100644 index 0000000000..54a95e3a3b --- /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 aab641ea3a..b34e223109 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: 2025-10-17 09:58+0200\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" @@ -93,7 +93,7 @@ msgid "" "```` (if available)." msgstr "" -#: c-api/intro.rst:70 +#: 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 " @@ -159,11 +159,90 @@ msgid "" "result, there is no need to do anything special to use the API from C++." msgstr "" -#: c-api/intro.rst:111 +#: c-api/intro.rst:113 +msgid "System includes" +msgstr "" + +#: c-api/intro.rst:115 +msgid "" +":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:120 +msgid "````" +msgstr "" + +#: 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 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 +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:113 +#: c-api/intro.rst:153 msgid "" "Several useful macros are defined in the Python header files. Many are " "defined closer to where they are useful (for " @@ -172,161 +251,531 @@ msgid "" "listing." msgstr "" -#: c-api/intro.rst:122 +#: c-api/intro.rst:161 +msgid "" +"If this macro is defined, then the current system is able to start threads." +msgstr "" + +#: c-api/intro.rst:163 +msgid "" +"Currently, all systems supported by CPython (per :pep:`11`), with the " +"exception of some WebAssembly platforms, support starting threads." +msgstr "" + +#: c-api/intro.rst:170 +msgid "" +"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:175 +msgid "Docstring macros" +msgstr "" + +#: c-api/intro.rst:179 +msgid "" +"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:197 +msgid "" +"Expands to the given input string, or an empty string if docstrings are " +"disabled (:option:`--without-doc-strings`)." +msgstr "" + +#: 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:221 +msgid "General utility macros" +msgstr "" + +#: c-api/intro.rst:223 +msgid "The following macros are for common tasks not specific to Python." +msgstr "" + +#: c-api/intro.rst:227 +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; }``." +msgstr "" + +#: 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: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:242 +msgid "Numeric utilities" +msgstr "" + +#: c-api/intro.rst:246 #, fuzzy msgid "Return the absolute value of ``x``." msgstr "Renvoie la valeur absolue de *x*." -#: c-api/intro.rst:128 +#: c-api/intro.rst:248 +msgid "" +"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: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:265 +msgid "" +"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: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 " +"possible values are covered in ``case`` statements. Use this in places " +"where you might be tempted to put an ``assert(0)`` or ``abort()`` call." +msgstr "" + +#: 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: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 to a function that never " +"returns but that is not declared ``_Noreturn``." +msgstr "" + +#: 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 " +"or if a system call returns a value out of the expected range. In this " +"case, it's better to report the error to the caller. If the error cannot be " +"reported to caller, :c:func:`Py_FatalError` can be used." +msgstr "" + +#: c-api/intro.rst:333 +msgid "" +"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:380 +msgid "" +"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: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 "" +"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:409 +msgid "" +"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:418 +msgid "" +"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: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:131 +#: 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:135 +#: 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:139 +#: 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:142 +#: c-api/intro.rst:443 msgid "It must be specified before the function return type. Usage::" msgstr "" -#: c-api/intro.rst:150 +#: c-api/intro.rst:451 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``." +"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:155 +#: c-api/intro.rst:455 msgid "" -"Use this for deprecated declarations. The macro must be placed before the " -"symbol name." +"Corresponds to the ``noinline`` attribute/specification on GCC and MSVC." msgstr "" -#: c-api/intro.rst:244 c-api/intro.rst:262 -msgid "Example::" -msgstr "Exemple ::" +#: 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:162 +#: c-api/intro.rst:472 msgid "MSVC support was added." msgstr "" -#: c-api/intro.rst:167 +#: c-api/intro.rst:477 msgid "" -"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " -"command line (see :c:member:`PyConfig.use_environment`)." +"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:172 -msgid "Return the maximum value between ``x`` and ``y``." +#: c-api/intro.rst:483 +msgid "" +"Equivalent to :c:macro:`Py_LOCAL` but additionally requests the function be " +"inlined." msgstr "" -#: c-api/intro.rst:178 -msgid "Return the size of a structure (``type``) ``member`` in bytes." +#: 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:184 -msgid "Return the minimum value between ``x`` and ``y``." +#: c-api/intro.rst:491 +msgid "" +"On compatible versions of GCC/Clang, it expands to " +"``__attribute__((visibility(\"hidden\")))``." msgstr "" -#: c-api/intro.rst:190 +#: c-api/intro.rst:496 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`)." +"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:194 -msgid "Usage::" -msgstr "Utilisation ::" +#: 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:202 +#: c-api/intro.rst:512 msgid "" -"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." +"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:209 +#: c-api/intro.rst:520 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 " -"possible values are covered in ``case`` statements. Use this in places " -"where you might be tempted to put an ``assert(0)`` or ``abort()`` call." +"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:214 +#: c-api/intro.rst:529 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." +"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:218 +#: c-api/intro.rst:534 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`." +"On some GCC-like compilers, specify alignment to *num* bytes. This does " +"nothing on other compilers." msgstr "" -#: c-api/intro.rst:221 +#: c-api/intro.rst:537 +msgid "Use the standard ``alignas`` specifier rather than this macro." +msgstr "" + +#: c-api/intro.rst:543 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 " -"or if a system call returns a value out of the expected range. In this " -"case, it's better to report the error to the caller. If the error cannot be " -"reported to caller, :c:func:`Py_FatalError` can be used." +"The :c:func:`printf` formatting modifier for :c:type:`size_t`. Use ``\"z\"`` " +"directly instead." msgstr "" -#: c-api/intro.rst:231 +#: c-api/intro.rst:551 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; }``." +"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:238 +#: c-api/intro.rst:557 +msgid "Consider using the C99 standard suffixes ``LL`` and ``LLU`` directly." +msgstr "" + +#: c-api/intro.rst:567 msgid "" -"Creates a variable with name ``name`` that can be used in docstrings. If " -"Python is built without docstrings, the value will be empty." +"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:241 +#: c-api/intro.rst:579 msgid "" -"Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python " -"without docstrings, as specified in :pep:`7`." +"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:256 +#: 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 "" -"Creates a docstring for the given input string or an empty string if " -"docstrings are disabled." +"Defined if ``wchar_t`` can hold a Unicode character (UCS-4). Use " +"``sizeof(wchar_t) >= 4`` instead" msgstr "" -#: c-api/intro.rst:259 +#: c-api/intro.rst:614 +msgid "This is an alias to the C99-standard ``va_copy`` function." +msgstr "" + +#: c-api/intro.rst:616 msgid "" -"Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python " -"without docstrings, as specified in :pep:`7`." +"Historically, this would use a compiler-specific method to copy a " +"``va_list``." msgstr "" -#: c-api/intro.rst:274 +#: 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:278 +#: 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 " @@ -341,7 +790,7 @@ msgid "" "objects." msgstr "" -#: c-api/intro.rst:289 +#: 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 " @@ -352,11 +801,11 @@ msgid "" "a Python list." msgstr "" -#: c-api/intro.rst:300 +#: c-api/intro.rst:653 msgid "Reference Counts" msgstr "Compteurs de références" -#: c-api/intro.rst:302 +#: 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,7 +820,7 @@ msgid "" "that.\")" msgstr "" -#: c-api/intro.rst:319 +#: 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. " @@ -390,7 +839,7 @@ msgid "" "reference count increment is a simple operation." msgstr "" -#: c-api/intro.rst:335 +#: 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,7 +857,7 @@ msgid "" "reference to every argument for the duration of the call." msgstr "" -#: c-api/intro.rst:351 +#: 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 " @@ -419,7 +868,7 @@ msgid "" "a :c:func:`Py_DECREF`, so almost any operation is potentially dangerous." msgstr "" -#: c-api/intro.rst:359 +#: 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:370 +#: c-api/intro.rst:723 msgid "Reference Count Details" msgstr "" -#: c-api/intro.rst:372 +#: 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 " @@ -450,7 +899,7 @@ msgid "" "a :term:`borrowed reference`." msgstr "" -#: c-api/intro.rst:385 +#: 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,7 +908,7 @@ msgid "" "reference, and you are not responsible for it any longer." msgstr "" -#: c-api/intro.rst:395 +#: 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 " @@ -471,7 +920,7 @@ msgid "" "this is shown below)::" msgstr "" -#: c-api/intro.rst:410 +#: 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,7 +928,7 @@ msgid "" "another reference before calling the reference-stealing function." msgstr "" -#: c-api/intro.rst:415 +#: 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 " @@ -487,13 +936,13 @@ msgid "" "use :c:func:`PyTuple_SetItem` for tuples that you are creating yourself." msgstr "" -#: c-api/intro.rst:420 +#: 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`." msgstr "" -#: c-api/intro.rst:423 +#: 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 " @@ -503,7 +952,7 @@ msgid "" "the error checking)::" msgstr "" -#: c-api/intro.rst:434 +#: 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 " @@ -514,7 +963,7 @@ msgid "" "sequence) to a given item::" msgstr "" -#: c-api/intro.rst:464 +#: 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 " @@ -527,7 +976,7 @@ msgid "" "becomes the owner of the reference)." msgstr "" -#: c-api/intro.rst:473 +#: 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 " @@ -538,18 +987,18 @@ msgid "" "the same arguments), you do own a reference to the returned object." msgstr "" -#: c-api/intro.rst:485 +#: 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:549 +#: c-api/intro.rst:902 msgid "Types" msgstr "" -#: c-api/intro.rst:551 +#: 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 " @@ -560,7 +1009,7 @@ msgid "" "be discussed together with the functions that use them." msgstr "" -#: c-api/intro.rst:561 +#: 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 " @@ -568,11 +1017,11 @@ msgid "" "positive value of type :c:type:`Py_ssize_t`." msgstr "" -#: c-api/intro.rst:570 +#: c-api/intro.rst:923 msgid "Exceptions" msgstr "Exceptions" -#: c-api/intro.rst:572 +#: 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 " @@ -581,7 +1030,7 @@ msgid "" "stack traceback." msgstr "" -#: c-api/intro.rst:580 +#: 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 " @@ -596,7 +1045,7 @@ msgid "" "explicitly documented." msgstr "" -#: c-api/intro.rst:595 +#: 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 " @@ -609,7 +1058,7 @@ msgid "" "and :c:func:`PyErr_Clear` clears the exception state." msgstr "" -#: c-api/intro.rst:605 +#: 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 " @@ -622,7 +1071,7 @@ msgid "" "which takes care of transferring it to ``sys.exc_info()`` and friends." msgstr "" -#: c-api/intro.rst:617 +#: 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 " @@ -636,7 +1085,7 @@ msgid "" "that are referenced by the stack frames in the traceback." msgstr "" -#: c-api/intro.rst:628 +#: 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 " @@ -647,7 +1096,7 @@ msgid "" "of the error." msgstr "" -#: c-api/intro.rst:637 +#: 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 " @@ -656,11 +1105,11 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: c-api/intro.rst:652 +#: c-api/intro.rst:1005 msgid "Here is the corresponding C code, in all its glory::" msgstr "" -#: c-api/intro.rst:704 +#: 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` " @@ -673,11 +1122,11 @@ msgid "" "only set to success after the final call made is successful." msgstr "" -#: c-api/intro.rst:718 +#: c-api/intro.rst:1071 msgid "Embedding Python" msgstr "Embarquer Python" -#: c-api/intro.rst:720 +#: 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 " @@ -685,7 +1134,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" -#: c-api/intro.rst:733 +#: 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 " @@ -693,7 +1142,7 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" -#: c-api/intro.rst:738 +#: 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 " @@ -702,7 +1151,7 @@ msgid "" "Initialization Configuration `." msgstr "" -#: c-api/intro.rst:743 +#: 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 " @@ -714,7 +1163,7 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" -#: c-api/intro.rst:752 +#: 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/" @@ -725,20 +1174,16 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" -#: c-api/intro.rst:766 +#: 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 standard path." msgstr "" -#: c-api/intro.rst:777 +#: 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 " @@ -752,18 +1197,18 @@ msgid "" "extension modules currently cannot be released." msgstr "" -#: c-api/intro.rst:791 +#: c-api/intro.rst:1135 msgid "Debugging Builds" msgstr "" -#: c-api/intro.rst:793 +#: 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:797 +#: 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. " @@ -773,24 +1218,36 @@ msgid "" "section." msgstr "" -#: c-api/intro.rst:805 +#: 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:813 +#: 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:816 +#: 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 " @@ -800,55 +1257,55 @@ msgid "" "interactive mode this happens after every statement run by the interpreter.)" msgstr "" -#: c-api/intro.rst:823 +#: 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:830 +#: c-api/intro.rst:1177 msgid "Recommended third party tools" msgstr "Les outils tiers recommandés" -#: c-api/intro.rst:832 +#: 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:835 +#: c-api/intro.rst:1182 msgid "`Cython `_" msgstr "" -#: c-api/intro.rst:836 +#: c-api/intro.rst:1183 msgid "`cffi `_" msgstr "" -#: c-api/intro.rst:837 +#: c-api/intro.rst:1184 msgid "`HPy `_" msgstr "" -#: c-api/intro.rst:838 +#: c-api/intro.rst:1185 msgid "`nanobind `_ (C++)" msgstr "" -#: c-api/intro.rst:839 +#: c-api/intro.rst:1186 msgid "`Numba `_" msgstr "" -#: c-api/intro.rst:840 +#: c-api/intro.rst:1187 msgid "`pybind11 `_ (C++)" msgstr "" -#: c-api/intro.rst:841 +#: c-api/intro.rst:1188 msgid "`PyO3 `_ (Rust)" msgstr "" -#: c-api/intro.rst:842 +#: c-api/intro.rst:1189 msgid "`SWIG `_" msgstr "" -#: c-api/intro.rst:844 +#: 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 " @@ -859,7 +1316,7 @@ msgid "" "sources." msgstr "" -#: c-api/intro.rst:851 +#: 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 " @@ -867,7 +1324,7 @@ msgid "" "outdated." msgstr "" -#: c-api/intro.rst:858 +#: c-api/intro.rst:1205 msgid "" "`Python Packaging User Guide: Binary Extensions `_" @@ -875,7 +1332,7 @@ msgstr "" "`Guide d'utilisation de l'empaquetage Python : Extensions binaires `_" -#: c-api/intro.rst:859 +#: 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 " diff --git a/c-api/iter.po b/c-api/iter.po index 3ffcbef3e3..2dc924aa0c 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: 2025-10-17 09:58+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" @@ -87,7 +87,7 @@ msgstr "" #: 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 "" diff --git a/c-api/iterator.po b/c-api/iterator.po index 9e09252cfd..839b932ca7 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: 2025-10-17 09:58+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" @@ -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 index 00f4147b58..67b4967eb6 100644 --- a/c-api/lifecycle.po +++ b/c-api/lifecycle.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -349,7 +348,7 @@ msgid "" "change in the future." msgstr "" -#: c-api/lifecycle.rst:262 +#: 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`). " @@ -359,6 +358,6 @@ msgid "" "continue normally." msgstr "" -#: c-api/lifecycle.rst:271 +#: 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 b445d36976..57a678ac73 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: 2025-10-17 09:58+0200\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" @@ -85,37 +85,44 @@ 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>`." 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 " @@ -123,21 +130,29 @@ msgid "" "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. " @@ -145,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 " @@ -154,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 a01283b894..100fac7ef4 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: 2025-10-17 09:58+0200\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,7 +72,7 @@ msgstr "" #: c-api/long.rst:45 msgid "" "CPython 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 " +"and ``1024``. When you create an int in that range you actually just get " "back a reference to the existing object." msgstr "" @@ -100,16 +100,16 @@ msgid "" "``NULL`` on failure." msgstr "" -#: c-api/long.rst:77 +#: c-api/long.rst:76 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." +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " +"long`, or ``NULL`` on failure." msgstr "" -#: c-api/long.rst:86 +#: c-api/long.rst:83 msgid "" -"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " -"long`, or ``NULL`` on failure." +"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 @@ -187,49 +187,55 @@ msgid "" "most-significant bit is not a sign bit. Flags other than endian are ignored." msgstr "" -#: c-api/long.rst:206 +#: 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:174 +#: c-api/long.rst:185 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for " "a :c:expr:`long`." msgstr "" -#: c-api/long.rst:215 c-api/long.rst:256 c-api/long.rst:279 +#: 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:217 c-api/long.rst:260 c-api/long.rst:364 +#: 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:220 c-api/long.rst:263 c-api/long.rst:367 +#: 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:189 +#: 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." -msgstr "" - -#: c-api/long.rst:193 -msgid "The function is soft deprecated." +"Exactly equivalent to the preferred ``PyLong_AsLong``. In particular, it can " +"fail with :exc:`OverflowError` or another exception." msgstr "" -#: c-api/long.rst:198 +#: 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`." msgstr "" -#: c-api/long.rst:210 +#: 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``, " @@ -238,20 +244,20 @@ msgid "" "usual." msgstr "" -#: c-api/long.rst:247 +#: 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:233 +#: c-api/long.rst:242 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for " "a :c:expr:`long long`." msgstr "" -#: c-api/long.rst:251 +#: 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``, " @@ -260,78 +266,78 @@ msgid "" "usual." msgstr "" -#: c-api/long.rst:273 +#: 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:276 +#: 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`." msgstr "" -#: c-api/long.rst:288 +#: 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:291 +#: c-api/long.rst:300 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for " "a :c:expr:`unsigned long`." msgstr "" -#: c-api/long.rst:294 +#: c-api/long.rst:303 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:304 +#: 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:307 +#: c-api/long.rst:316 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for " "a :c:type:`size_t`." msgstr "" -#: c-api/long.rst:310 +#: c-api/long.rst:319 msgid "" "Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:319 +#: 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:322 +#: 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`." msgstr "" -#: c-api/long.rst:325 +#: 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:328 +#: c-api/long.rst:337 msgid "" "A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." msgstr "" -#: c-api/long.rst:334 +#: 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 " @@ -339,19 +345,19 @@ msgid "" "a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:338 +#: 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:341 +#: c-api/long.rst:350 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:353 +#: 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 " @@ -359,73 +365,73 @@ msgid "" "a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:358 +#: 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:361 +#: 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:374 +#: 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:397 +#: 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:402 +#: c-api/long.rst:411 msgid "If the *obj* value is out of range, raise an :exc:`OverflowError`." msgstr "" -#: c-api/long.rst:404 +#: 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:407 +#: c-api/long.rst:416 msgid "*value* must not be ``NULL``." msgstr "" -#: c-api/long.rst:394 +#: 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:401 +#: c-api/long.rst:410 msgid "If *obj* is negative, raise a :exc:`ValueError`." msgstr "" -#: c-api/long.rst:414 +#: 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:417 +#: c-api/long.rst:426 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for " "a :c:expr:`double`." msgstr "" -#: c-api/long.rst:420 +#: c-api/long.rst:429 msgid "" "Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:425 +#: 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 " @@ -433,33 +439,34 @@ msgid "" "with :c:func:`PyLong_FromVoidPtr`." msgstr "" -#: c-api/long.rst:430 +#: c-api/long.rst:439 msgid "" "Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:435 +#: 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:439 +#: 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:443 +#: 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:448 +#: c-api/long.rst:457 msgid "" "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 " @@ -467,106 +474,106 @@ msgid "" "downcast." msgstr "" -#: c-api/long.rst:455 +#: 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:458 +#: c-api/long.rst:467 msgid "``0`` will never be returned." msgstr "" -#: c-api/long.rst:460 +#: c-api/long.rst:469 msgid "Values are always copied as two's-complement." msgstr "" -#: c-api/long.rst:462 +#: c-api/long.rst:471 msgid "Usage example::" msgstr "" -#: c-api/long.rst:478 +#: 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:485 +#: 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:488 +#: 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:519 +#: 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:524 +#: c-api/long.rst:533 msgid "" "Currently, ``-1`` corresponds to ``Py_ASNATIVEBYTES_NATIVE_ENDIAN | " "Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." msgstr "" -#: c-api/long.rst:530 +#: c-api/long.rst:539 msgid "Flag" msgstr "Option" -#: c-api/long.rst:530 +#: c-api/long.rst:539 msgid "Value" msgstr "Valeur" -#: c-api/long.rst:532 +#: c-api/long.rst:541 msgid "``-1``" msgstr "" -#: c-api/long.rst:533 +#: c-api/long.rst:542 msgid "``0``" msgstr "``0``" -#: c-api/long.rst:534 +#: c-api/long.rst:543 msgid "``1``" msgstr "``1``" -#: c-api/long.rst:535 +#: c-api/long.rst:544 msgid "``3``" msgstr "``3``" -#: c-api/long.rst:536 +#: c-api/long.rst:545 msgid "``4``" msgstr "``4``" -#: c-api/long.rst:537 +#: c-api/long.rst:546 msgid "``8``" msgstr "``8``" -#: c-api/long.rst:538 +#: c-api/long.rst:547 msgid "``16``" msgstr "" -#: c-api/long.rst:541 +#: 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:544 +#: 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:548 +#: 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 " @@ -576,7 +583,7 @@ msgid "" "requested." msgstr "" -#: c-api/long.rst:555 +#: 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 " @@ -584,7 +591,7 @@ msgid "" "of whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified." msgstr "" -#: c-api/long.rst:560 +#: 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 " @@ -594,7 +601,7 @@ msgid "" "raise :exc:`TypeError`." msgstr "" -#: c-api/long.rst:569 +#: 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 " @@ -602,71 +609,82 @@ msgid "" "buffer and set all its bits. This matches typical C cast behavior." msgstr "" -#: c-api/long.rst:580 +#: 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:582 +#: 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:585 +#: 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:593 +#: c-api/long.rst:613 msgid "Check if the integer object *obj* is positive (``obj > 0``)." msgstr "" -#: c-api/long.rst:595 +#: 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:604 +#: c-api/long.rst:624 msgid "Check if the integer object *obj* is negative (``obj < 0``)." msgstr "" -#: c-api/long.rst:606 +#: 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:615 +#: c-api/long.rst:635 msgid "Check if the integer object *obj* is zero." msgstr "" -#: c-api/long.rst:617 +#: 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:626 +#: 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:630 +#: c-api/long.rst:650 msgid "On failure, return ``NULL`` with an exception set." msgstr "" -#: c-api/long.rst:637 +#: c-api/long.rst:657 msgid "Return 1 if *op* is compact, 0 otherwise." msgstr "" -#: c-api/long.rst:639 +#: 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 " @@ -675,93 +693,93 @@ msgid "" "or :c:func:`PyLong_AsNativeBytes`." msgstr "" -#: c-api/long.rst:645 +#: c-api/long.rst:665 msgid "The speedup is expected to be negligible for most users." msgstr "" -#: c-api/long.rst:647 +#: 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:655 +#: 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:658 +#: c-api/long.rst:678 msgid "Otherwise, the return value is undefined." msgstr "" -#: c-api/long.rst:664 +#: c-api/long.rst:684 msgid "Export API" msgstr "" -#: c-api/long.rst:670 +#: 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:673 +#: 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:677 +#: c-api/long.rst:697 msgid "" "See also :data:`sys.int_info` which exposes similar information in Python." msgstr "" -#: c-api/long.rst:681 +#: 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:686 +#: 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:691 +#: c-api/long.rst:711 msgid "Digits order:" msgstr "" -#: c-api/long.rst:693 +#: c-api/long.rst:713 msgid "``1`` for most significant digit first" msgstr "" -#: c-api/long.rst:694 +#: c-api/long.rst:714 msgid "``-1`` for least significant digit first" msgstr "" -#: c-api/long.rst:698 +#: c-api/long.rst:718 msgid "Digit endianness:" msgstr "" -#: c-api/long.rst:700 +#: c-api/long.rst:720 msgid "``1`` for most significant byte first (big endian)" msgstr "" -#: c-api/long.rst:701 +#: c-api/long.rst:721 msgid "``-1`` for least significant byte first (little endian)" msgstr "" -#: c-api/long.rst:706 +#: c-api/long.rst:726 msgid "Get the native layout of Python :class:`int` objects." msgstr "" -#: c-api/long.rst:708 -msgid "See the :c:struct:`PyLongLayout` structure." +#: c-api/long.rst:728 +msgid "See the :c:type:`PyLongLayout` structure." msgstr "" -#: c-api/long.rst:710 +#: 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. " @@ -769,128 +787,128 @@ msgid "" "it can be cached." msgstr "" -#: c-api/long.rst:718 +#: c-api/long.rst:738 msgid "Export of a Python :class:`int` object." msgstr "" -#: c-api/long.rst:720 +#: c-api/long.rst:740 msgid "There are two cases:" msgstr "" -#: c-api/long.rst:722 +#: c-api/long.rst:742 msgid "" "If :c:member:`digits` is ``NULL``, only use the :c:member:`value` member." msgstr "" -#: c-api/long.rst:723 +#: 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:728 +#: 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:733 +#: 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:738 +#: 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:743 +#: c-api/long.rst:763 msgid "Read-only array of unsigned digits. Can be ``NULL``." msgstr "" -#: c-api/long.rst:748 +#: c-api/long.rst:768 msgid "Export a Python :class:`int` object." msgstr "" -#: c-api/long.rst:750 +#: c-api/long.rst:770 msgid "" -"*export_long* must point to a :c:struct:`PyLongExport` structure allocated " -"by the caller. It must not be ``NULL``." +"*export_long* must point to a :c:type:`PyLongExport` structure allocated by " +"the caller. It must not be ``NULL``." msgstr "" -#: c-api/long.rst:753 +#: 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:756 +#: 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:760 +#: 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:766 +#: c-api/long.rst:786 msgid "Release the export *export_long* created by :c:func:`PyLong_Export`." msgstr "" -#: c-api/long.rst:769 +#: c-api/long.rst:789 msgid "" "Calling :c:func:`PyLong_FreeExport` is optional if *export_long->digits* is " "``NULL``." msgstr "" -#: c-api/long.rst:774 +#: c-api/long.rst:794 msgid "PyLongWriter API" msgstr "" -#: c-api/long.rst:776 +#: c-api/long.rst:796 msgid "The :c:type:`PyLongWriter` API can be used to import an integer." msgstr "" -#: c-api/long.rst:782 +#: c-api/long.rst:802 msgid "A Python :class:`int` writer instance." msgstr "" -#: c-api/long.rst:784 +#: 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:790 +#: c-api/long.rst:810 msgid "Create a :c:type:`PyLongWriter`." msgstr "" -#: c-api/long.rst:792 +#: 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:795 +#: c-api/long.rst:815 msgid "*negative* is ``1`` if the number is negative, or ``0`` otherwise." msgstr "" -#: c-api/long.rst:797 +#: 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:800 +#: c-api/long.rst:820 msgid "*digits* must not be NULL." msgstr "" -#: c-api/long.rst:802 +#: 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 " @@ -898,49 +916,82 @@ msgid "" "by :c:func:`PyLong_GetNativeLayout`." msgstr "" -#: c-api/long.rst:807 +#: c-api/long.rst:827 msgid "" "Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``] (where " -"the :c:struct:`~PyLongLayout.bits_per_digit` is the number of bits per " -"digit). Any unused most significant digits must be set to ``0``." +"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:812 +#: 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:818 +#: c-api/long.rst:838 msgid "" "Finish a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`." msgstr "" -#: c-api/long.rst:820 +#: 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:823 +#: 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:835 +#: c-api/long.rst:855 msgid "The writer instance and the *digits* array are invalid after the call." msgstr "" -#: c-api/long.rst:831 +#: c-api/long.rst:851 msgid "" "Discard a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`." msgstr "" -#: c-api/long.rst:833 +#: 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 0a29fdbe26..d923ada9fb 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: 2025-10-17 09:58+0200\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" @@ -132,8 +132,8 @@ 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, " +"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 "" @@ -151,9 +151,9 @@ 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, " +"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 "" diff --git a/c-api/marshal.po b/c-api/marshal.po index 6c3e52fe06..2569a040ec 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: 2025-10-17 09:58+0200\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" @@ -109,7 +109,7 @@ msgid "" "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 "" diff --git a/c-api/memory.po b/c-api/memory.po index 6af1a0a28e..dde4029d26 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: 2025-10-17 09:58+0200\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,7 +55,7 @@ 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 " @@ -68,14 +68,14 @@ msgid "" "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 " @@ -93,41 +93,41 @@ 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 " @@ -136,7 +136,7 @@ msgid "" "memoryinterface>`." 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 " @@ -144,14 +144,14 @@ msgid "" "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 " @@ -159,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`." 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, 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` " @@ -189,60 +189,60 @@ msgid "" "requesting zero bytes." msgstr "" -#: c-api/memory.rst:224 c-api/memory.rst:333 +#: 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:234 c-api/memory.rst:343 +#: 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:247 c-api/memory.rst:356 +#: 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`." 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` " @@ -250,71 +250,79 @@ msgid "" "been called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:268 c-api/memory.rst:377 +#: 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:314 +#: 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:329 +#: c-api/memory.rst:357 msgid "" "There must be an :term:`attached thread state` when using these functions." msgstr "" -#: c-api/memory.rst:220 +#: c-api/memory.rst:219 msgid "" "The default allocator is now pymalloc instead of system :c:func:`malloc`." msgstr "" -#: c-api/memory.rst:227 +#: 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:238 +#: 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:250 +#: 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:254 +#: 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`." msgstr "" -#: c-api/memory.rst:257 +#: 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:263 +#: 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` " @@ -322,20 +330,20 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:270 +#: 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:276 +#: 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:283 +#: 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:288 +#: 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:294 +#: c-api/memory.rst:298 msgid "Same as :c:func:`PyMem_Free`." msgstr "" -#: c-api/memory.rst:296 -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." +#: c-api/memory.rst:302 +msgid "Deprecated aliases" msgstr "" -#: c-api/memory.rst:301 -msgid "``PyMem_MALLOC(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:302 -msgid "``PyMem_NEW(type, size)``" +#: c-api/memory.rst:311 +msgid "Deprecated alias" msgstr "" -#: c-api/memory.rst:303 -msgid "``PyMem_REALLOC(ptr, size)``" +#: c-api/memory.rst:312 +msgid "Corresponding function or macro" msgstr "" -#: c-api/memory.rst:304 -msgid "``PyMem_RESIZE(ptr, type, size)``" -msgstr "" +#: 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:305 -msgid "``PyMem_FREE(ptr)``" +#: c-api/memory.rst:324 c-api/memory.rst:509 +msgid ":c:func:`PyMem_Free`" msgstr "" -#: c-api/memory.rst:306 -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:312 +#: c-api/memory.rst:338 msgid "Object allocators" msgstr "" -#: c-api/memory.rst:319 +#: 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,47 +422,49 @@ msgid "" "Memory Allocators ` section." msgstr "" -#: c-api/memory.rst:324 +#: c-api/memory.rst:350 msgid "" "The :ref:`default object allocator ` uses " -"the :ref:`pymalloc memory allocator `." +"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:336 +#: 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:347 +#: 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:359 +#: 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:363 +#: 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`." msgstr "" -#: c-api/memory.rst:366 +#: 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:372 +#: 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` " @@ -445,325 +472,338 @@ msgid "" "been called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:379 +#: 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:382 +#: 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:387 +#: 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:486 +#: c-api/memory.rst:515 msgid ":c:func:`PyObject_Malloc`" msgstr "" -#: c-api/memory.rst:487 +#: c-api/memory.rst:516 msgid ":c:func:`PyObject_Realloc`" msgstr "" -#: c-api/memory.rst:488 +#: c-api/memory.rst:517 msgid ":c:func:`PyObject_Calloc`" msgstr "" -#: c-api/memory.rst:392 +#: c-api/memory.rst:420 msgid ":c:macro:`PyObject_New`" msgstr "" -#: c-api/memory.rst:393 +#: c-api/memory.rst:421 msgid ":c:macro:`PyObject_NewVar`" msgstr "" -#: c-api/memory.rst:394 +#: c-api/memory.rst:422 #, fuzzy msgid ":c:func:`PyType_GenericAlloc`" msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:395 +#: c-api/memory.rst:423 msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" -#: c-api/memory.rst:401 +#: c-api/memory.rst:429 msgid "Default Memory Allocators" msgstr "" -#: c-api/memory.rst:403 +#: c-api/memory.rst:431 msgid "Default memory allocators:" msgstr "" -#: c-api/memory.rst:406 +#: c-api/memory.rst:434 msgid "Configuration" msgstr "Configuration" -#: c-api/memory.rst:406 +#: c-api/memory.rst:434 msgid "Name" msgstr "Nom" -#: c-api/memory.rst:406 +#: c-api/memory.rst:434 msgid "PyMem_RawMalloc" msgstr "" -#: c-api/memory.rst:406 +#: c-api/memory.rst:434 msgid "PyMem_Malloc" msgstr "" -#: c-api/memory.rst:406 +#: c-api/memory.rst:434 msgid "PyObject_Malloc" msgstr "" -#: c-api/memory.rst:408 +#: c-api/memory.rst:436 msgid "Release build" msgstr "" -#: c-api/memory.rst:408 +#: c-api/memory.rst:436 msgid "``\"pymalloc\"``" msgstr "" -#: c-api/memory.rst:410 +#: c-api/memory.rst:438 msgid "``malloc``" msgstr "" -#: c-api/memory.rst:408 +#: c-api/memory.rst:436 msgid "``pymalloc``" msgstr "" -#: c-api/memory.rst:409 +#: c-api/memory.rst:437 msgid "Debug build" msgstr "" -#: c-api/memory.rst:409 +#: c-api/memory.rst:437 msgid "``\"pymalloc_debug\"``" msgstr "" -#: c-api/memory.rst:411 +#: c-api/memory.rst:439 msgid "``malloc`` + debug" msgstr "" -#: c-api/memory.rst:409 +#: c-api/memory.rst:437 msgid "``pymalloc`` + debug" msgstr "" -#: c-api/memory.rst:410 +#: c-api/memory.rst:438 msgid "Release build, without pymalloc" msgstr "" -#: c-api/memory.rst:410 +#: c-api/memory.rst:438 msgid "``\"malloc\"``" msgstr "" -#: c-api/memory.rst:411 +#: c-api/memory.rst:439 msgid "Debug build, without pymalloc" msgstr "" -#: c-api/memory.rst:411 +#: c-api/memory.rst:439 msgid "``\"malloc_debug\"``" msgstr "" -#: c-api/memory.rst:414 +#: 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:416 +#: c-api/memory.rst:446 msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: c-api/memory.rst:417 +#: 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`." msgstr "" -#: c-api/memory.rst:419 +#: c-api/memory.rst:449 msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:420 -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:422 +#: c-api/memory.rst:451 msgid "" "\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." msgstr "" -#: c-api/memory.rst:424 +#: c-api/memory.rst:453 msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" -#: c-api/memory.rst:429 +#: c-api/memory.rst:458 msgid "Customize Memory Allocators" msgstr "" -#: c-api/memory.rst:435 +#: 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:690 +#: c-api/memory.rst:723 msgid "Field" msgstr "Champ" -#: c-api/memory.rst:690 +#: c-api/memory.rst:723 msgid "Meaning" msgstr "Signification" -#: c-api/memory.rst:692 +#: c-api/memory.rst:725 msgid "``void *ctx``" msgstr "``void *ctx``" -#: c-api/memory.rst:692 +#: c-api/memory.rst:725 msgid "user context passed as first argument" msgstr "" -#: c-api/memory.rst:443 +#: 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:443 +#: c-api/memory.rst:472 msgid "allocate a memory block" msgstr "" -#: c-api/memory.rst:445 +#: c-api/memory.rst:474 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "" -#: c-api/memory.rst:445 +#: c-api/memory.rst:474 msgid "allocate a memory block initialized with zeros" msgstr "" -#: c-api/memory.rst:448 +#: c-api/memory.rst:477 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "" -#: c-api/memory.rst:448 +#: c-api/memory.rst:477 msgid "allocate or resize a memory block" msgstr "" -#: c-api/memory.rst:450 +#: c-api/memory.rst:479 msgid "``void free(void *ctx, void *ptr)``" msgstr "``void free(void *ctx, void *ptr)``" -#: c-api/memory.rst:450 +#: c-api/memory.rst:479 msgid "free a memory block" msgstr "" -#: c-api/memory.rst:453 +#: c-api/memory.rst:482 msgid "" "The :c:type:`!PyMemAllocator` structure was renamed " "to :c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" -#: c-api/memory.rst:460 +#: c-api/memory.rst:489 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: c-api/memory.rst:475 c-api/memory.rst:484 +#: c-api/memory.rst:504 c-api/memory.rst:513 #, fuzzy msgid "Functions:" msgstr "Fonctions :" -#: c-api/memory.rst:468 +#: c-api/memory.rst:497 #, fuzzy msgid ":c:func:`PyMem_RawMalloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:469 +#: c-api/memory.rst:498 #, fuzzy msgid ":c:func:`PyMem_RawRealloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:470 +#: c-api/memory.rst:499 #, fuzzy msgid ":c:func:`PyMem_RawCalloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:471 +#: c-api/memory.rst:500 msgid ":c:func:`PyMem_RawFree`" msgstr "" -#: c-api/memory.rst:477 +#: c-api/memory.rst:506 #, fuzzy msgid ":c:func:`PyMem_Malloc`," msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:478 -#, fuzzy -msgid ":c:func:`PyMem_Realloc`" -msgstr ":c:func:`PyMem_Calloc`," - -#: c-api/memory.rst:479 +#: c-api/memory.rst:508 #, fuzzy msgid ":c:func:`PyMem_Calloc`" msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:480 -msgid ":c:func:`PyMem_Free`" -msgstr "" - -#: c-api/memory.rst:489 +#: c-api/memory.rst:518 msgid ":c:func:`PyObject_Free`" msgstr "" -#: c-api/memory.rst:493 +#: c-api/memory.rst:522 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:498 +#: c-api/memory.rst:527 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:500 +#: 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:503 +#: c-api/memory.rst:532 msgid "" "For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" "safe: a :term:`thread state` is not :term:`attached ` " "when the allocator is called." msgstr "" -#: c-api/memory.rst:507 +#: 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 :term:`GIL`." msgstr "" -#: c-api/memory.rst:511 +#: 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:515 +#: c-api/memory.rst:544 msgid "" "See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " "with PyPreConfig `." msgstr "" -#: c-api/memory.rst:520 +#: c-api/memory.rst:549 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" msgstr "" -#: c-api/memory.rst:522 +#: 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 " @@ -774,7 +814,7 @@ msgid "" "information." msgstr "" -#: c-api/memory.rst:530 +#: c-api/memory.rst:559 msgid "" "If called after Python has finish initializing " "(after :c:func:`Py_InitializeFromConfig` has been called) the allocator " @@ -782,21 +822,21 @@ msgid "" "some other arbitrary one is **not supported**." msgstr "" -#: c-api/memory.rst:535 +#: c-api/memory.rst:564 msgid "All allocators must be thread-safe." msgstr "" -#: c-api/memory.rst:541 +#: c-api/memory.rst:570 msgid "" "Setup :ref:`debug hooks in the Python memory allocators ` " "to detect memory errors." msgstr "" -#: c-api/memory.rst:548 +#: c-api/memory.rst:577 msgid "Debug hooks on the Python memory allocators" msgstr "" -#: c-api/memory.rst:550 +#: 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 " @@ -804,19 +844,19 @@ msgid "" "allocators to detect memory errors." msgstr "" -#: c-api/memory.rst:555 +#: 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:558 +#: 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:561 +#: 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 " @@ -826,25 +866,25 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" -#: c-api/memory.rst:568 +#: c-api/memory.rst:597 msgid "Runtime checks:" msgstr "" -#: c-api/memory.rst:570 +#: 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:572 +#: c-api/memory.rst:601 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: c-api/memory.rst:573 +#: c-api/memory.rst:602 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: c-api/memory.rst:574 +#: c-api/memory.rst:603 msgid "" "Check that there is an :term:`attached thread state` when allocator " "functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " @@ -852,7 +892,7 @@ msgid "" "called." msgstr "" -#: c-api/memory.rst:579 +#: 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 " @@ -860,7 +900,7 @@ msgid "" "memory block was traced." msgstr "" -#: c-api/memory.rst:584 +#: 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 " @@ -870,49 +910,49 @@ msgid "" "from a Python slice):" msgstr "" -#: c-api/memory.rst:590 +#: c-api/memory.rst:619 msgid "``p[-2*S:-S]``" msgstr "" -#: c-api/memory.rst:591 +#: 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:593 +#: c-api/memory.rst:622 msgid "``p[-S]``" msgstr "" -#: c-api/memory.rst:594 +#: c-api/memory.rst:623 msgid "API identifier (ASCII character):" msgstr "" -#: c-api/memory.rst:596 +#: c-api/memory.rst:625 msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" -#: c-api/memory.rst:597 +#: c-api/memory.rst:626 msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" -#: c-api/memory.rst:598 +#: c-api/memory.rst:627 msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: c-api/memory.rst:600 +#: c-api/memory.rst:629 msgid "``p[-S+1:0]``" msgstr "" -#: c-api/memory.rst:601 +#: c-api/memory.rst:630 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: c-api/memory.rst:603 +#: c-api/memory.rst:632 msgid "``p[0:N]``" msgstr "" -#: c-api/memory.rst:604 +#: 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 " @@ -923,25 +963,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: c-api/memory.rst:612 +#: c-api/memory.rst:641 msgid "``p[N:N+S]``" msgstr "" -#: c-api/memory.rst:613 +#: c-api/memory.rst:642 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: c-api/memory.rst:615 +#: c-api/memory.rst:644 msgid "``p[N+S:N+2*S]``" msgstr "" -#: c-api/memory.rst:616 +#: 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:619 +#: 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 " @@ -951,7 +991,7 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" -#: c-api/memory.rst:626 +#: 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, " @@ -964,7 +1004,7 @@ msgid "" "getting used)." msgstr "" -#: c-api/memory.rst:635 +#: 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 " @@ -974,7 +1014,7 @@ msgid "" "and :c:macro:`PYMEM_DOMAIN_MEM` domains are called." msgstr "" -#: c-api/memory.rst:643 +#: c-api/memory.rst:672 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -982,43 +1022,48 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" -#: c-api/memory.rst:653 +#: c-api/memory.rst:682 msgid "The pymalloc allocator" msgstr "" -#: c-api/memory.rst:655 +#: 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:661 +#: 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." msgstr "" -#: c-api/memory.rst:665 +#: c-api/memory.rst:698 msgid "The arena allocator uses the following functions:" msgstr "" -#: c-api/memory.rst:667 +#: c-api/memory.rst:700 msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," msgstr "" -#: c-api/memory.rst:668 +#: c-api/memory.rst:701 msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," msgstr "" -#: c-api/memory.rst:669 +#: c-api/memory.rst:702 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: c-api/memory.rst:671 +#: 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 " @@ -1026,104 +1071,131 @@ msgid "" "``PYTHONMALLOC=malloc``)." msgstr "" -#: c-api/memory.rst:675 +#: 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:680 +#: c-api/memory.rst:713 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: c-api/memory.rst:686 +#: c-api/memory.rst:719 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: c-api/memory.rst:694 +#: 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:694 +#: c-api/memory.rst:727 msgid "allocate an arena of size bytes" msgstr "" -#: c-api/memory.rst:696 +#: 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:696 +#: c-api/memory.rst:729 msgid "free an arena" msgstr "" -#: c-api/memory.rst:701 +#: c-api/memory.rst:734 msgid "Get the arena allocator." msgstr "" -#: c-api/memory.rst:705 +#: c-api/memory.rst:738 msgid "Set the arena allocator." msgstr "" -#: c-api/memory.rst:710 +#: c-api/memory.rst:743 msgid "The mimalloc allocator" msgstr "" -#: c-api/memory.rst:714 +#: 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:719 +#: 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:725 +#: c-api/memory.rst:776 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: c-api/memory.rst:727 +#: 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:730 +#: c-api/memory.rst:781 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: c-api/memory.rst:734 +#: 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:737 +#: c-api/memory.rst:788 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: c-api/memory.rst:743 +#: c-api/memory.rst:794 msgid "Examples" msgstr "Exemples" -#: c-api/memory.rst:745 +#: 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:758 +#: c-api/memory.rst:809 msgid "The same code using the type-oriented function set::" msgstr "" -#: c-api/memory.rst:770 +#: 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 " @@ -1133,7 +1205,7 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: c-api/memory.rst:785 +#: 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 " @@ -1141,7 +1213,7 @@ msgid "" "and :c:func:`PyObject_Free`." msgstr "" -#: c-api/memory.rst:789 +#: 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 9ad7876ca3..6c5e840048 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: 2025-10-17 09:58+0200\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,7 +115,7 @@ 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 " diff --git a/c-api/module.po b/c-api/module.po index 31932a744b..2305d9b957 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: 2025-10-17 09:58+0200\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,25 +18,25 @@ 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." 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:`!" @@ -46,23 +46,23 @@ msgid "" "a :attr:`~module.__file__` attribute." msgstr "" -#: c-api/module.rst:416 c-api/module.rst:443 +#: 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 " @@ -70,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__`." 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'``." @@ -92,18 +98,25 @@ 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 " @@ -111,210 +124,221 @@ msgid "" "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 "" -":c:func:`PyModule_GetFilename` raises :exc:`UnicodeEncodeError` on " -"unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead." +"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:133 -msgid "Module definitions" +#: 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:135 -msgid "" -"The functions in the previous section work on any module object, including " -"modules imported from Python code." +#: c-api/module.rst:140 +msgid "Module definition" msgstr "" -#: c-api/module.rst:138 +#: c-api/module.rst:142 msgid "" -"Modules defined using the C API typically use a *module " -"definition*, :c:type:`PyModuleDef` -- a statically allocated, constant " -"“description\" of how a module should be created." +"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:142 +#: c-api/module.rst:149 msgid "" -"The definition is usually used to define an extension's “main” module object " -"(see :ref:`extension-modules` for details). It is also used to :ref:`create " -"extension modules dynamically `." +"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:147 +#: c-api/module.rst:154 msgid "" -"Unlike :c:func:`PyModule_New`, the definition allows management of *module " -"state* -- a piece of memory that is allocated and cleared together with the " -"module object. Unlike the module's Python attributes, Python code cannot " -"replace or delete data stored in module state." +"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:155 +#: c-api/module.rst:159 msgid "" -"The module definition struct, which holds all information needed to create a " -"module object. 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." +"Unless specified otherwise, the same slot ID may not be repeated in an array " +"of slots." msgstr "" -#: c-api/module.rst:163 -msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`." +#: c-api/module.rst:164 +msgid "Metadata slots" msgstr "" -#: c-api/module.rst:167 -msgid "Name for the new module." +#: 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 "" -"Docstring for the module; usually a docstring variable created " -"with :c:macro:`PyDoc_STRVAR` is used." +"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:176 +#: c-api/module.rst:179 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." +"Use :c:member:`PyModuleDef.m_name` instead to support previous versions." msgstr "" -#: c-api/module.rst:180 +#: c-api/module.rst:183 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." +":c:type:`Slot ID ` for the docstring of the new module, as a " +"NUL-terminated UTF8-encoded ``const char *``." msgstr "" -#: c-api/module.rst:184 -msgid "" -"Setting it 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." +#: c-api/module.rst:186 +msgid "Usually it is set to a variable created with :c:macro:`PyDoc_STRVAR`." msgstr "" -#: c-api/module.rst:188 -msgid "" -"Setting ``m_size`` to ``-1`` means that the module does not support sub-" -"interpreters, because it has global state. Negative ``m_size`` is only " -"allowed when using :ref:`legacy single-phase initialization ` or when :ref:`creating modules dynamically `." +#: c-api/module.rst:190 +msgid "Use :c:member:`PyModuleDef.m_doc` instead to support previous versions." msgstr "" #: c-api/module.rst:194 -msgid "See :PEP:`3121` for more details." +msgid "Feature slots" msgstr "" #: c-api/module.rst:198 msgid "" -"A pointer to a table of module-level functions, described " -"by :c:type:`PyMethodDef` values. Can be ``NULL`` if no functions are " -"present." +":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:203 +#: c-api/module.rst:202 msgid "" -"An array of slot definitions for multi-phase initialization, terminated by a " -"``{0, NULL}`` entry. When using legacy single-phase initialization, " -"*m_slots* must be ``NULL``." +"A suitable :c:struct:`!PyABIInfo` variable can be defined using " +"the :c:macro:`PyABIInfo_VAR` macro, as in:" msgstr "" -#: c-api/module.rst:209 +#: c-api/module.rst:214 msgid "" -"Prior to version 3.5, this member was always set to ``NULL``, and was " -"defined as:" +"When creating a module, Python checks the value of this slot " +"using :c:func:`PyABIInfo_Check`." msgstr "" -#: c-api/module.rst:216 +#: c-api/module.rst:217 msgid "" -"A traversal function to call during GC traversal of the module object, or " -"``NULL`` if not needed." +"This slot is required, except for modules created " +"from :c:struct:`PyModuleDef`." msgstr "" -#: c-api/module.rst:234 c-api/module.rst:255 +#: 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 "" -"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``." +"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:247 c-api/module.rst:262 -msgid "No longer called before the module state is allocated." +#: 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:231 +#: c-api/module.rst:244 msgid "" -"A clear function to call during GC clearing of the module object, or " -"``NULL`` if not needed." +"This slot determines whether or not importing this module in a " +"subinterpreter will fail." msgstr "" -#: c-api/module.rst:241 +#: c-api/module.rst:247 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." +"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " +"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." msgstr "" -#: c-api/module.rst:252 +#: c-api/module.rst:260 msgid "" -"A function to call during deallocation of the module object, or ``NULL`` if " -"not needed." +"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 "Module slots" +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:273 -msgid "A slot ID, chosen from the available values explained below." +#: 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:277 -msgid "Value of the slot, whose meaning depends on the slot ID." +#: 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:281 -msgid "The available slot types are:" +#: c-api/module.rst:291 +msgid "The function will be called with:" msgstr "" -#: c-api/module.rst:285 +#: c-api/module.rst:293 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:" +"*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:292 +#: c-api/module.rst:296 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``." +"*def*: ``NULL``, or the module definition if the module is created from one." msgstr "" -#: c-api/module.rst:297 +#: c-api/module.rst:298 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." +"The function should return a new module object, or set an error and return " +"``NULL``." msgstr "" #: c-api/module.rst:301 msgid "" -"Multiple ``Py_mod_create`` slots may not be specified in one module " -"definition." +"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:304 +#: 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 " @@ -323,110 +347,583 @@ msgid "" "through symlinks, all while sharing a single module definition." msgstr "" -#: c-api/module.rst:310 +#: c-api/module.rst:311 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``." +"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:319 +#: c-api/module.rst:317 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:" +":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 "" -"If multiple ``Py_mod_exec`` slots are specified, they are processed in the " -"order they appear in the *m_slots* array." +"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 "Specifies one of the following values:" +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:339 -msgid "The module does not support being imported in subinterpreters." +#: 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:343 +#: c-api/module.rst:376 msgid "" -"The module supports being imported in subinterpreters, but only when they " -"share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" +"Use :c:member:`PyModuleDef.m_methods` instead to support previous versions." msgstr "" -#: c-api/module.rst:349 +#: c-api/module.rst:381 +msgid "Module state" +msgstr "" + +#: c-api/module.rst:383 msgid "" -"The module supports being imported in subinterpreters, even when they have " -"their own GIL. (See :ref:`isolating-extensions-howto`.)" +"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:353 +#: c-api/module.rst:388 msgid "" -"This slot determines whether or not importing this module in a " -"subinterpreter will fail." +"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:356 +#: c-api/module.rst:391 msgid "" -"Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one " -"module definition." +"Unlike the module's Python attributes, Python code cannot replace or delete " +"data stored in module state." msgstr "" -#: c-api/module.rst:359 +#: c-api/module.rst:394 msgid "" -"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " -"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." +"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:372 +#: c-api/module.rst:399 msgid "" -"The module depends on the presence of the global interpreter lock (GIL), and " -"may access global state without synchronization." +"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:377 -msgid "The module is safe to run without an active GIL." +#: c-api/module.rst:403 +msgid "To retrieve the state from a given module, use the following functions:" msgstr "" -#: c-api/module.rst:379 +#: c-api/module.rst:407 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." +"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:384 +#: c-api/module.rst:411 msgid "" -"Multiple ``Py_mod_gil`` slots may not be specified in one module definition." +"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:386 +#: c-api/module.rst:418 msgid "" -"If ``Py_mod_gil`` is not specified, the import machinery defaults to " -"``Py_MOD_GIL_USED``." +"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:431 +msgid "Slots for defining module state" +msgstr "" + +#: c-api/module.rst:433 +msgid "" +"The following :c:member:`slot IDs ` are available for " +"defining the module state." +msgstr "" + +#: c-api/module.rst:438 +msgid "" +":c:member:`Slot ID ` for the size of the module state, in " +"bytes." +msgstr "" + +#: c-api/module.rst:441 +msgid "" +"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." +msgstr "" + +#: c-api/module.rst:445 +msgid "See :PEP:`3121` for more details." +msgstr "" + +#: c-api/module.rst:447 +msgid "" +"Use :c:func:`PyModule_GetStateSize` to retrieve the size of a given module." +msgstr "" + +#: c-api/module.rst:474 +msgid "" +"Use :c:member:`PyModuleDef.m_size` instead to support previous versions." +msgstr "" + +#: c-api/module.rst:455 +msgid "" +":c:member:`Slot ID ` for a traversal function to call during " +"GC traversal of the module object." +msgstr "" + +#: c-api/module.rst:458 +msgid "" +"The signature of the function, and meanings of the arguments, is similar as " +"for :c:member:`PyTypeObject.tp_traverse`:" +msgstr "" + +#: 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 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:478 +msgid "" +":c:member:`Slot ID ` for a clear function to call during GC " +"clearing of the module object." +msgstr "" + +#: c-api/module.rst:509 +msgid "The signature of the function is:" +msgstr "" + +#: 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 the :c:macro:`Py_mod_state_free` function is " +"called directly." +msgstr "" + +#: c-api/module.rst:502 +msgid "" +"Use :c:member:`PyModuleDef.m_clear` instead to support previous versions." +msgstr "" + +#: 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:524 +msgid "" +"Use :c:member:`PyModuleDef.m_free` instead to support previous versions." msgstr "" -#: c-api/module.rst:395 +#: c-api/module.rst:530 +msgid "Module token" +msgstr "" + +#: c-api/module.rst:532 +msgid "" +"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:553 +msgid "" +"A module's token -- and the *your_token* value to use in the above code -- " +"is:" +msgstr "" + +#: c-api/module.rst:555 +msgid "" +"For modules created with :c:type:`PyModuleDef`: the address of " +"that :c:type:`PyModuleDef`;" +msgstr "" + +#: 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 "" +"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:565 +msgid ":c:member:`Slot ID ` for the module token." +msgstr "" + +#: c-api/module.rst:567 +msgid "" +"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:570 +msgid "" +"The pointer outlives the class, so it's not reused for something else while " +"the class exists." +msgstr "" + +#: c-api/module.rst:572 +msgid "" +"It \"belongs\" to the extension module where the class lives, so it will not " +"clash with other extensions." +msgstr "" + +#: c-api/module.rst:574 +msgid "" +"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:578 +msgid "" +"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: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:593 +msgid "See also :c:func:`PyType_GetModuleByToken`." +msgstr "" + +#: c-api/module.rst:599 msgid "Creating extension modules dynamically" msgstr "" -#: c-api/module.rst:397 +#: c-api/module.rst:601 +msgid "" +"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: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: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: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:618 +msgid "" +"On success, return the new module. On error, return ``NULL`` with an " +"exception set." +msgstr "" + +#: c-api/module.rst:621 +msgid "" +"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: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 "" +"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:649 +msgid "" +"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:655 +msgid "" +"This way of defining modules is still available and there are no plans to " +"remove it." +msgstr "" + +#: c-api/module.rst:660 +msgid "" +"The module definition struct, which holds information needed to create a " +"module object." +msgstr "" + +#: c-api/module.rst:663 +msgid "" +"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:668 +msgid "" +"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: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 "" +"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:695 +msgid "Corresponds to the :c:macro:`Py_mod_name` slot." +msgstr "" + +#: 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:704 +msgid "" +"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:707 +msgid "" +"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:715 +msgid "" +"Corresponds to the :c:macro:`Py_mod_methods` slot. Setting this to NULL is " +"equivalent to omitting the slot." +msgstr "" + +#: c-api/module.rst:720 msgid "" -"The following functions may be used to create a module outside of an " -"extension's :ref:`initialization function `. They are " -"also used in :ref:`single-phase initialization `." +"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:404 +#: c-api/module.rst:724 +msgid "" +"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:732 +msgid "" +"Prior to version 3.5, this member was always set to ``NULL``, and was " +"defined as:" +msgstr "" + +#: c-api/module.rst:741 +msgid "Older structure defining additional slots of a module." +msgstr "" + +#: c-api/module.rst:743 +msgid "" +"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:747 +msgid "" +"Each :c:type:`!PyModuleDef_Slot` structure ``modslot`` is interpreted as the " +"following :c:type:`PySlot` structure::" +msgstr "" + +#: c-api/module.rst:756 +msgid "" +"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:762 +msgid "Corresponds to :c:member:`PySlot.sl_id`." +msgstr "" + +#: c-api/module.rst:766 +msgid "Corresponds to :c:member:`PySlot.sl_ptr`." +msgstr "" + +#: c-api/module.rst:774 +msgid "" +"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:778 +msgid "" +"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 " @@ -434,26 +931,26 @@ msgid "" "using the :ref:`limited API `." msgstr "" -#: c-api/module.rst:412 +#: 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:418 +#: 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:424 +#: 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:429 +#: 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 " @@ -461,7 +958,11 @@ msgid "" "api>`." msgstr "" -#: c-api/module.rst:438 +#: c-api/module.rst:865 +msgid "Prefer :c:func:`PyModule_FromSlotsAndSpec` in new code." +msgstr "" + +#: 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 " @@ -469,84 +970,94 @@ msgid "" "emitted." msgstr "" -#: c-api/module.rst:445 +#: 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:451 +#: 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:458 +#: c-api/module.rst:869 msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "" -#: c-api/module.rst:464 -msgid "The C API version. Defined for backwards compatibility." +#: c-api/module.rst:875 +msgid "" +"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:882 +msgid "" +"The C API version, as an integer (``1013``) and string (``\"1013\"``), " +"respectively. Defined for backwards compatibility." msgstr "" -#: c-api/module.rst:473 +#: 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:471 -msgid "Defined as ``3`` for backwards compatibility." +#: c-api/module.rst:891 +msgid "" +"Defined as ``3`` and ``\"3\"``, respectively, for backwards compatibility." msgstr "" -#: c-api/module.rst:478 +#: c-api/module.rst:900 msgid "Support functions" msgstr "" -#: c-api/module.rst:480 +#: c-api/module.rst:902 msgid "" -"The following functions are provided to help initialize a module state. They " -"are intended for a module's execution slots (:c:data:`Py_mod_exec`), the " +"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:488 +#: 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:491 +#: c-api/module.rst:912 msgid "" "On success, return ``0``. On error, raise an exception and return ``-1``." msgstr "" -#: c-api/module.rst:544 c-api/module.rst:571 +#: c-api/module.rst:965 c-api/module.rst:992 msgid "Example usage::" msgstr "Exemple d'utilisation ::" -#: c-api/module.rst:507 +#: 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:511 +#: c-api/module.rst:932 msgid "" "The example can also be written without checking explicitly if *obj* is " "``NULL``::" msgstr "" -#: c-api/module.rst:523 +#: 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:526 +#: 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*. " @@ -556,7 +1067,7 @@ msgid "" "may be used internally to create a key object." msgstr "" -#: c-api/module.rst:539 +#: 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 " @@ -564,49 +1075,45 @@ msgid "" "variable." msgstr "" -#: c-api/module.rst:555 +#: 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:558 +#: 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:565 +#: 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:568 +#: 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:586 -msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`." -msgstr "" - -#: c-api/module.rst:591 +#: 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:595 +#: 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." msgstr "" -#: c-api/module.rst:601 +#: 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 " @@ -614,14 +1121,14 @@ msgid "" "on success." msgstr "" -#: c-api/module.rst:606 +#: 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." msgstr "" -#: c-api/module.rst:613 +#: 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 " @@ -629,11 +1136,11 @@ msgid "" "with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:621 +#: c-api/module.rst:1040 msgid "Add a string constant to *module*." msgstr "" -#: c-api/module.rst:625 +#: 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 " @@ -641,7 +1148,7 @@ msgid "" "``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:635 +#: 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 " @@ -650,7 +1157,7 @@ msgid "" "first parameter, making them similar to instance methods on Python classes)." msgstr "" -#: c-api/module.rst:641 +#: 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`, " @@ -659,7 +1166,13 @@ msgid "" "that case they should call this function directly." msgstr "" -#: c-api/module.rst:652 +#: 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 " @@ -667,7 +1180,11 @@ msgid "" "``PyModule_FromDefAndSpec``)." msgstr "" -#: c-api/module.rst:661 +#: 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`. " @@ -679,11 +1196,11 @@ msgid "" "exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:675 +#: c-api/module.rst:1100 msgid "Module lookup (single-phase initialization)" msgstr "" -#: c-api/module.rst:677 +#: c-api/module.rst:1102 msgid "" "The legacy :ref:`single-phase initialization ` " "initialization scheme creates singleton modules that can be looked up in the " @@ -691,14 +1208,14 @@ msgid "" "retrieved later with only a reference to the module definition." msgstr "" -#: c-api/module.rst:682 +#: 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:687 +#: 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 " @@ -707,18 +1224,18 @@ msgid "" "to the interpreter state yet, it returns ``NULL``." msgstr "" -#: c-api/module.rst:694 +#: 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`." msgstr "" -#: c-api/module.rst:697 +#: c-api/module.rst:1122 msgid "Only effective on modules created using single-phase initialization." msgstr "" -#: c-api/module.rst:699 +#: c-api/module.rst:1124 msgid "" "Python calls ``PyState_AddModule`` automatically after importing a module " "that uses :ref:`single-phase initialization `, " @@ -730,21 +1247,21 @@ msgid "" "state updates)." msgstr "" -#: c-api/module.rst:708 +#: 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:722 +#: 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 03463d3b3d..f937d9df06 100644 --- a/c-api/monitoring.po +++ b/c-api/monitoring.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -166,7 +166,7 @@ msgstr "" #: 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 "" #: c-api/monitoring.rst:143 @@ -295,7 +295,3 @@ msgid "" "Return true if the event corresponding to the event ID *ev* is a :ref:`local " "event `." msgstr "" - -#: c-api/monitoring.rst:210 -msgid "This function is :term:`soft deprecated`." -msgstr "" diff --git a/c-api/object.po b/c-api/object.po index 58a9b88904..51d4dbccb5 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: 2025-10-17 09:58+0200\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" @@ -168,7 +168,7 @@ msgstr "" 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 " +"these functions use the :func:`str` of the object instead of " "the :func:`repr`." msgstr "" @@ -187,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. " @@ -197,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. " @@ -214,7 +256,7 @@ 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__` " @@ -227,14 +269,14 @@ msgstr "" "méthode :meth:`__getitem__` seront supprimées. Pour obtenir le rapport " "d'erreur, utilisez plutôt :c:func:`PyObject_GetItem()`." -#: c-api/object.rst:122 +#: 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*`." msgstr "" -#: c-api/object.rst:128 +#: c-api/object.rst:157 #, fuzzy msgid "" "Exceptions that occur when this calls :meth:`~object.__getattr__` " @@ -248,7 +290,7 @@ msgstr "" "méthode :meth:`__getitem__` seront supprimées. Pour obtenir le rapport " "d'erreur, utilisez plutôt :c:func:`PyObject_GetItem()`." -#: c-api/object.rst:138 +#: c-api/object.rst:167 #, fuzzy msgid "" "Retrieve an attribute named *attr_name* from object *o*. Returns the " @@ -259,32 +301,32 @@ 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:142 +#: 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." msgstr "" -#: c-api/object.rst:148 +#: 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*`." msgstr "" -#: c-api/object.rst:152 +#: 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." msgstr "" -#: c-api/object.rst:158 +#: c-api/object.rst:187 msgid "" "Variant of :c:func:`PyObject_GetAttr` which doesn't " "raise :exc:`AttributeError` if the attribute is not found." msgstr "" -#: c-api/object.rst:161 +#: 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 " @@ -294,14 +336,14 @@ msgid "" "``NULL``." msgstr "" -#: c-api/object.rst:173 +#: 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:181 +#: 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 " @@ -319,7 +361,7 @@ msgstr "" "les attributs d'instance, contrairement aux autres descripteurs. Sinon, " "une :exc:`AttributeError` est levée." -#: c-api/object.rst:191 +#: 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 " @@ -330,7 +372,7 @@ msgstr "" "``0`` en cas de succès. Ceci est équivalent à l'instruction Python " "``o.attr_name = v``." -#: c-api/object.rst:196 +#: c-api/object.rst:225 #, fuzzy msgid "" "If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated " @@ -340,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:203 +#: 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*`." msgstr "" -#: c-api/object.rst:207 +#: c-api/object.rst:243 #, fuzzy msgid "" "If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated " @@ -356,7 +409,7 @@ 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:210 +#: 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*. " @@ -366,7 +419,7 @@ msgid "" "may be used internally to create a key object." msgstr "" -#: c-api/object.rst:220 +#: 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 " @@ -387,7 +440,7 @@ msgstr "" "``0`` est renvoyé, sinon une :exc:`AttributeError` est levée et ``-1`` est " "renvoyé." -#: c-api/object.rst:232 +#: 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``." @@ -396,14 +449,14 @@ msgstr "" "cas d'échec. Ceci est l'équivalent de l'expression Python ``del " "o.attr_name``." -#: c-api/object.rst:238 +#: 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*`." msgstr "" -#: c-api/object.rst:242 +#: 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*. " @@ -413,7 +466,7 @@ msgid "" "may be used internally to create a key object for lookup." msgstr "" -#: c-api/object.rst:253 +#: c-api/object.rst:297 msgid "" "A generic implementation for the getter of a ``__dict__`` descriptor. It " "creates the dictionary if necessary." @@ -421,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:256 +#: 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 " @@ -430,11 +483,11 @@ msgid "" "the object." msgstr "" -#: c-api/object.rst:262 +#: c-api/object.rst:306 msgid "On failure, returns ``NULL`` with an exception set." msgstr "" -#: c-api/object.rst:269 +#: 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." @@ -442,20 +495,20 @@ 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:277 +#: 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:280 +#: 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:287 +#: c-api/object.rst:331 #, fuzzy msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " @@ -474,14 +527,14 @@ msgstr "" "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:297 +#: 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:302 +#: c-api/object.rst:346 #, fuzzy msgid "" "If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " @@ -490,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:307 +#: 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:310 +#: 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:318 +#: c-api/object.rst:362 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -517,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:346 +#: 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." @@ -525,7 +582,7 @@ 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:330 +#: 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 " @@ -540,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:341 +#: c-api/object.rst:389 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -554,7 +611,7 @@ msgstr "" "par la fonction native :func:`str`, et, par conséquent, par la " "fonction :func:`print`." -#: c-api/object.rst:355 +#: c-api/object.rst:405 #, fuzzy msgid "" "Compute a bytes representation of object *o*. ``NULL`` is returned on " @@ -569,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:364 +#: 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``." @@ -577,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:386 +#: 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``, " @@ -587,7 +649,7 @@ msgstr "" "*cls*. Le résultat sera ``1`` quand au moins une des vérifications renvoie " "``1``, sinon ce sera ``0``." -#: c-api/object.rst:371 +#: c-api/object.rst:423 #, fuzzy msgid "" "If *cls* has a :meth:`~type.__subclasscheck__` method, it will be called to " @@ -600,7 +662,7 @@ msgstr "" "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:376 +#: c-api/object.rst:428 #, fuzzy msgid "" "Normally only class objects, i.e. instances of :class:`type` or a derived " @@ -612,7 +674,7 @@ msgstr "" "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:383 +#: 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." @@ -621,7 +683,7 @@ msgstr "" "classe de *cls*, ou ``0`` sinon. En cas d'erreur, renvoie ``-1`` et " "initialise une exception." -#: c-api/object.rst:390 +#: c-api/object.rst:442 #, fuzzy msgid "" "If *cls* has a :meth:`~type.__instancecheck__` method, it will be called to " @@ -633,7 +695,7 @@ msgstr "" "Sinon, *inst* est une instance *cls* si sa classe est une sous-classe de " "*cls*." -#: c-api/object.rst:394 +#: c-api/object.rst:446 #, fuzzy msgid "" "An instance *inst* can override what is considered its class by having " @@ -642,7 +704,7 @@ msgstr "" "Une instance *inst* peut surcharger ce qui est considéré comme sa classe en " "ayant un attribut :attr:`__class__`." -#: c-api/object.rst:397 +#: c-api/object.rst:449 #, fuzzy msgid "" "An object *cls* can override if it is considered a class, and what its base " @@ -653,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:406 +#: 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:409 +#: 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:416 +#: 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 " @@ -673,21 +735,21 @@ msgid "" "that it is not hashable." msgstr "" -#: c-api/object.rst:424 +#: 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:431 +#: 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:440 +#: 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 " @@ -698,13 +760,13 @@ msgid "" "when a new :term:`strong reference` is needed." msgstr "" -#: c-api/object.rst:452 +#: 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:461 +#: 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, " @@ -712,7 +774,7 @@ msgid "" "``len(o)``." msgstr "" -#: c-api/object.rst:468 +#: 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 " @@ -721,7 +783,7 @@ msgid "" "defaultvalue)``." msgstr "" -#: c-api/object.rst:478 +#: c-api/object.rst:530 #, fuzzy msgid "" "Return element of *o* corresponding to the object *key* or ``NULL`` on " @@ -731,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:484 +#: c-api/object.rst:536 #, fuzzy msgid "" "Map the object *key* to the value *v*. Raise an exception and return ``-1`` " @@ -743,7 +805,7 @@ msgstr "" "``0`` en cas de succès. Ceci est équivalent à l'instruction Python " "``o.attr_name = v``." -#: c-api/object.rst:492 +#: c-api/object.rst:544 #, fuzzy msgid "" "Remove the mapping for the object *key* from the object *o*. Return ``-1`` " @@ -753,14 +815,14 @@ msgstr "" "Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " "``del o[key]``." -#: c-api/object.rst:498 +#: 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:505 +#: 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 " @@ -770,7 +832,7 @@ msgid "" "but :c:func:`PyErr_Occurred` will return false." msgstr "" -#: c-api/object.rst:514 +#: 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 " @@ -778,14 +840,14 @@ msgid "" "object cannot be iterated." msgstr "" -#: c-api/object.rst:522 +#: c-api/object.rst:574 msgid "" "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:528 +#: 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 " @@ -794,80 +856,80 @@ msgid "" "returns ``NULL`` if the object cannot be iterated." msgstr "" -#: c-api/object.rst:538 +#: c-api/object.rst:590 msgid "Get a pointer to subclass-specific data reserved for *cls*." msgstr "" -#: c-api/object.rst:540 +#: 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:544 +#: 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:550 +#: 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:553 +#: 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`)." msgstr "" -#: c-api/object.rst:556 +#: 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." msgstr "" -#: c-api/object.rst:560 +#: c-api/object.rst:612 msgid "On error, set an exception and return a negative value." msgstr "" -#: c-api/object.rst:566 +#: c-api/object.rst:618 msgid "" "Get a pointer to per-item data for a class " "with :c:macro:`Py_TPFLAGS_ITEMS_AT_END`." msgstr "" -#: c-api/object.rst:569 +#: 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:577 +#: c-api/object.rst:629 msgid "Visit the managed dictionary of *obj*." msgstr "" -#: c-api/object.rst:579 +#: 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:586 +#: c-api/object.rst:638 msgid "Clear the managed dictionary of *obj*." msgstr "" -#: c-api/object.rst:588 +#: 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:595 +#: c-api/object.rst:647 msgid "" "Enable `deferred reference counting `_ on *obj*, if supported by the runtime. In " @@ -878,7 +940,7 @@ msgid "" "no longer has any references to it." msgstr "" -#: c-api/object.rst:602 +#: 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 " @@ -887,7 +949,7 @@ msgid "" "cannot fail." msgstr "" -#: c-api/object.rst:607 +#: 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 " @@ -895,14 +957,14 @@ msgid "" "and :c:func:`PyObject_GC_IsTracked`)." msgstr "" -#: c-api/object.rst:612 +#: 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:620 +#: 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 " @@ -910,7 +972,7 @@ msgid "" "if *obj* is a unique temporary object." msgstr "" -#: c-api/object.rst:626 +#: 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 " @@ -922,61 +984,61 @@ msgid "" "function argument uniquely referenced." msgstr "" -#: c-api/object.rst:635 +#: 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:640 +#: 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:646 +#: c-api/object.rst:698 msgid "See also the function :c:func:`Py_REFCNT`." msgstr "" -#: c-api/object.rst:652 +#: 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:657 +#: 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:664 +#: 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:668 +#: 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 threading` " -"build." +"or this function may spuriously return ``0`` in the :term:`free-threaded " +"build`." msgstr "" -#: c-api/object.rst:672 +#: 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 threading` build::" +"it behaves atomically in the :term:`free-threaded build`::" msgstr "" -#: c-api/object.rst:681 +#: 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:684 +#: 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 " @@ -984,37 +1046,61 @@ msgid "" "a :py:class:`~weakref.WeakValueDictionary` for a specific type:" msgstr "" -#: c-api/object.rst:738 +#: 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:745 +#: c-api/object.rst:797 msgid "Determine if *op* only has one reference." msgstr "" -#: c-api/object.rst:747 +#: 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:750 +#: 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." +"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:755 +#: 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" diff --git a/c-api/perfmaps.po b/c-api/perfmaps.po index 6c6036bd43..9ae79d12ca 100644 --- a/c-api/perfmaps.po +++ b/c-api/perfmaps.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -20,29 +20,30 @@ 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 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 " @@ -52,30 +53,99 @@ msgid "" "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 0000000000..f6f9efc713 --- /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 0000000000..f691e037f0 --- /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 d38de0638a..68b3c8b6e5 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: 2025-10-17 09:58+0200\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" @@ -49,7 +49,7 @@ msgstr "" #: c-api/refcounting.rst:28 msgid "" -"On :term:`free threaded ` builds of Python, returning 1 " +"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." diff --git a/c-api/sentinel.po b/c-api/sentinel.po new file mode 100644 index 0000000000..91e53cb3b7 --- /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 ef1186a970..5b0c24f06e 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: 2025-10-17 09:58+0200\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" @@ -126,25 +126,23 @@ msgid "Alias for :c:func:`PySequence_Contains`." msgstr "" #: c-api/sequence.rst:112 -msgid "" -"The function is :term:`soft deprecated` and should no longer be used to " -"write new code." +msgid "The function should no longer be used to write new code." msgstr "" -#: c-api/sequence.rst:119 +#: 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:125 +#: 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:134 +#: 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 " @@ -152,7 +150,7 @@ msgid "" "contents. This is equivalent to the Python expression ``tuple(o)``." msgstr "" -#: c-api/sequence.rst:142 +#: 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 " @@ -160,20 +158,20 @@ msgid "" "``NULL`` on failure." msgstr "" -#: c-api/sequence.rst:147 +#: 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:151 +#: 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:157 +#: 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 " @@ -182,27 +180,27 @@ msgid "" "is a list or tuple." msgstr "" -#: c-api/sequence.rst:166 +#: 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." msgstr "" -#: c-api/sequence.rst:172 +#: 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:175 +#: 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:182 +#: 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 " diff --git a/c-api/set.po b/c-api/set.po index bfab6359a7..c1bf0c7c5a 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: 2025-10-17 09:58+0200\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 "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 " @@ -29,7 +29,7 @@ msgid "" "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 " @@ -41,7 +41,7 @@ msgid "" "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 " @@ -50,7 +50,7 @@ msgstr "" "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 " @@ -59,49 +59,49 @@ msgstr "" "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 " @@ -110,7 +110,14 @@ 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. " @@ -118,24 +125,24 @@ msgid "" "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." 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." 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 " @@ -145,7 +152,14 @@ msgid "" "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 " @@ -156,24 +170,23 @@ msgid "" "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` " @@ -181,13 +194,42 @@ 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." 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" #~ msgstr "objet" diff --git a/c-api/slots.po b/c-api/slots.po new file mode 100644 index 0000000000..c0a9658e4a --- /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 4707fe8551..96886e6ac0 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: 2025-10-17 09:58+0200\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 @@ -106,180 +107,262 @@ msgid "" "spend extra effort adjusting to changes." msgstr "" -#: c-api/stable.rst:57 -msgid "Stable Application Binary Interface" +#: c-api/stable.rst:58 +#, fuzzy +msgid "Stable Application Binary Interfaces" msgstr "ABI stable" -#: c-api/stable.rst:59 +#: c-api/stable.rst:60 +msgid "" +"Python's :dfn:`Stable ABI` allows extensions to be compatible with multiple " +"versions of Python, without recompilation." +msgstr "" + +#: c-api/stable.rst:65 #, fuzzy 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." +"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 "" "(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:66 -#, fuzzy -msgid "Limited C API" -msgstr "Inconvénients de l’API restreinte" - #: c-api/stable.rst:68 -#, 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 `." +msgid "There are two Stable ABIs:" 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 `." -#: c-api/stable.rst:75 +#: c-api/stable.rst:70 msgid "" -"Define this macro before including ``Python.h`` to opt in to only use the " -"Limited API, and to select the Limited API version." +"``abi3``, introduced in Python 3.2, is compatible with **non**-:term:`free-" +"threaded ` builds of CPython." 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:78 -#, fuzzy +#: c-api/stable.rst:73 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." +"``abi3t``, introduced in Python 3.15, is compatible with :term:`free-" +"threaded ` builds of CPython. It has stricter API " +"limitations than ``abi3``." 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:84 -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." +#: c-api/stable.rst:79 +msgid "``abi3t`` was added in :pep:`803`" 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:88 +#: c-api/stable.rst:81 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)." +"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 "" -"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:95 -msgid "Stable ABI" -msgstr "ABI stable" -#: c-api/stable.rst:97 +#: c-api/stable.rst:86 msgid "" -"To enable this, Python provides a *Stable ABI*: a set of symbols that will " -"remain ABI-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:102 +#: c-api/stable.rst:91 msgid "" -"The 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. See Python's Backwards Compatibility Policy (:pep:`387`) for " -"details." +"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 "" -#: c-api/stable.rst:108 +#: c-api/stable.rst:95 #, 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." - -#: c-api/stable.rst:112 -msgid "" -"On Windows, extensions that use the Stable ABI should be linked against " +"On Windows, extensions that use a Stable ABI should be linked against " "``python3.dll`` rather than a version-specific library such as " -"``python39.dll``." +"``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:116 +#: 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 "" + +#: c-api/stable.rst:107 +msgid "" +"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 "" -"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:123 +#: c-api/stable.rst:115 +#, fuzzy 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." +"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:129 -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:131 +#: 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:134 +#: 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:139 +#: 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 " @@ -287,49 +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:144 +#: 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:153 -msgid "Limited API Caveats" -msgstr "Inconvénients de l’API restreinte" -#: c-api/stable.rst:155 +#: 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:160 +#: 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 " @@ -339,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:167 -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:170 +#: 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:173 +#: 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 " @@ -370,13 +435,14 @@ msgstr "" "peuvent être exposées aux utilisateurs pour des raisons techniques, ou par " "erreur." -#: c-api/stable.rst:178 +#: 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 " @@ -384,16 +450,16 @@ 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:188 +#: c-api/stable.rst:265 msgid "Platform Considerations" msgstr "Considérations relatives aux plateformes" -#: c-api/stable.rst:190 +#: 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 " +"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 " @@ -402,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:195 +#: 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 " @@ -415,13 +483,309 @@ msgstr "" "Windows et macOS de ``python.org`` et de la plupart des distributions " "tierces." -#: c-api/stable.rst:205 +#: 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:208 +#: 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 8eedc1587a..27829a13f5 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: 2025-10-17 09:58+0200\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" @@ -56,50 +56,90 @@ msgid "" "as :c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." msgstr "" -#: c-api/structures.rst:38 +#: 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:42 +#: 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:47 +#: 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:54 +#: 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:58 +#: 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:64 +#: 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:67 +#: c-api/structures.rst:100 msgid "Do not use this field directly; use :c:macro:`Py_SIZE` instead." msgstr "" -#: c-api/structures.rst:69 +#: 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, " @@ -107,140 +147,140 @@ msgid "" "using :c:macro:`Py_SET_SIZE`." msgstr "" -#: c-api/structures.rst:74 +#: 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:81 +#: 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:86 +#: c-api/structures.rst:119 msgid "See documentation of :c:type:`PyObject` above." msgstr "" -#: c-api/structures.rst:91 +#: 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:97 +#: c-api/structures.rst:130 msgid "See documentation of :c:type:`PyVarObject` above." msgstr "" -#: c-api/structures.rst:102 +#: 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:107 +#: 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:114 +#: 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:122 +#: 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:130 +#: 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:138 +#: c-api/structures.rst:171 msgid "Get the type of the Python object *o*." msgstr "" -#: c-api/structures.rst:140 +#: 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:143 +#: 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:150 +#: 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:158 +#: 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:161 +#: 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:165 +#: c-api/structures.rst:198 msgid "" "Note that assigning an incompatible type can lead to undefined behavior." msgstr "" -#: c-api/structures.rst:167 +#: 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:177 +#: c-api/structures.rst:210 msgid "Get the :c:member:`~PyVarObject.ob_size` field of *o*." msgstr "" -#: c-api/structures.rst:179 +#: 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:186 +#: c-api/structures.rst:219 msgid "Set the :c:member:`~PyVarObject.ob_size` field of *o* to *size*." msgstr "" -#: c-api/structures.rst:193 +#: 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::" msgstr "" -#: c-api/structures.rst:202 +#: 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::" msgstr "" -#: c-api/structures.rst:211 +#: c-api/structures.rst:244 msgid "Implementing functions and methods" msgstr "" -#: c-api/structures.rst:215 +#: 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 " @@ -250,60 +290,64 @@ msgid "" "reference." msgstr "" -#: c-api/structures.rst:222 +#: c-api/structures.rst:255 msgid "The function signature is::" msgstr "" -#: c-api/structures.rst:229 +#: 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:240 +#: 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:250 +#: 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:261 +#: 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:276 +#: 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:281 +#: c-api/structures.rst:314 msgid "Name of the method." msgstr "" -#: c-api/structures.rst:285 +#: 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:289 +#: c-api/structures.rst:324 msgid "Flags bits indicating how the call should be constructed." msgstr "" -#: c-api/structures.rst:293 +#: c-api/structures.rst:328 msgid "Points to the contents of the docstring." msgstr "" -#: c-api/structures.rst:295 +#: 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 " @@ -313,18 +357,18 @@ msgid "" "implementation uses the specific C type of the *self* object." msgstr "" -#: c-api/structures.rst:303 +#: 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:308 +#: c-api/structures.rst:343 msgid "There are these calling conventions:" msgstr "" -#: c-api/structures.rst:312 +#: 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*` " @@ -335,7 +379,7 @@ msgid "" "or :c:func:`PyArg_UnpackTuple`." msgstr "" -#: c-api/structures.rst:322 +#: c-api/structures.rst:357 msgid "" "Can only be used in certain combinations with other " "flags: :ref:`METH_VARARGS | METH_KEYWORDS `." msgstr "" -#: c-api/structures.rst:330 +#: c-api/structures.rst:365 msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" msgstr "" -#: c-api/structures.rst:331 +#: 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 " @@ -357,7 +401,7 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" -#: c-api/structures.rst:340 +#: 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 " @@ -366,15 +410,15 @@ msgid "" "the array)." msgstr "" -#: c-api/structures.rst:350 +#: c-api/structures.rst:385 msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." msgstr "" -#: c-api/structures.rst:355 +#: c-api/structures.rst:390 msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: c-api/structures.rst:356 +#: c-api/structures.rst:391 msgid "" "Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, " "with methods of type :c:type:`PyCFunctionFastWithKeywords`. Keyword " @@ -386,17 +430,17 @@ msgid "" "the positional arguments." msgstr "" -#: c-api/structures.rst:371 +#: 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:377 +#: c-api/structures.rst:412 msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: c-api/structures.rst:378 +#: c-api/structures.rst:413 msgid "" "Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that " @@ -404,14 +448,14 @@ msgid "" "``Py_TYPE(self)``." msgstr "" -#: c-api/structures.rst:383 +#: 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:392 +#: 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 " @@ -420,13 +464,13 @@ msgid "" "the second parameter will be ``NULL``." msgstr "" -#: c-api/structures.rst:398 +#: 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." msgstr "" -#: c-api/structures.rst:404 +#: 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` " @@ -435,35 +479,35 @@ msgid "" "single argument." msgstr "" -#: c-api/structures.rst:410 +#: 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:420 +#: 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:430 +#: 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:434 +#: 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:440 +#: 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 " @@ -476,20 +520,38 @@ msgid "" "more than wrapper object calls." msgstr "" -#: c-api/structures.rst:452 +#: 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: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:456 +#: 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:460 +#: 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 " @@ -497,71 +559,151 @@ msgid "" "can be set to :const:`None` or ``NULL``." msgstr "" -#: c-api/structures.rst:466 +#: c-api/structures.rst:520 msgid ":attr:`function.__module__`" msgstr "" -#: c-api/structures.rst:468 +#: 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:477 +#: 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:482 +#: c-api/structures.rst:554 msgid "Equivalent to ``PyCMethod_New(ml, self, NULL, NULL)``." msgstr "" -#: c-api/structures.rst:486 +#: 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:490 +#: 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:495 +#: c-api/structures.rst:623 msgid "Its fields are, in order:" msgstr "" -#: c-api/structures.rst:499 +#: 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:502 +#: c-api/structures.rst:630 msgid "The string should be static, no copy is made of it." msgstr "" -#: c-api/structures.rst:506 +#: 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:511 +#: 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:515 +#: c-api/structures.rst:643 msgid "" "Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR." msgstr "" -#: c-api/structures.rst:519 +#: 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:523 +#: 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-" @@ -570,7 +712,7 @@ msgid "" "legacy :c:macro:`T_OBJECT`) members can be deleted." msgstr "" -#: c-api/structures.rst:532 +#: 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 " @@ -580,11 +722,11 @@ msgid "" "``Py_READONLY | Py_RELATIVE_OFFSET``. For example::" msgstr "" -#: c-api/structures.rst:545 +#: c-api/structures.rst:673 msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)" msgstr "" -#: c-api/structures.rst:547 +#: c-api/structures.rst:675 msgid "" "The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` " "and :c:member:`~PyTypeObject.tp_weaklistoffset` can be defined similarly " @@ -593,86 +735,80 @@ msgid "" "and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead." msgstr "" -#: c-api/structures.rst:555 +#: c-api/structures.rst:683 msgid "" "``PyMemberDef`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: c-api/structures.rst:560 +#: c-api/structures.rst:688 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` is now allowed for " "``\"__vectorcalloffset__\"``, ``\"__dictoffset__\"`` and " "``\"__weaklistoffset__\"``." msgstr "" -#: c-api/structures.rst:566 +#: 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:572 +#: c-api/structures.rst:700 msgid "" "``PyMember_GetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: c-api/structures.rst:577 +#: 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:583 +#: c-api/structures.rst:711 msgid "" "``PyMember_SetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: c-api/structures.rst:589 +#: c-api/structures.rst:717 msgid "Member flags" msgstr "" -#: c-api/structures.rst:591 +#: c-api/structures.rst:719 msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:" msgstr "" -#: c-api/structures.rst:595 +#: c-api/structures.rst:723 msgid "Not writable." msgstr "" -#: c-api/structures.rst:599 +#: c-api/structures.rst:727 msgid "" "Emit an ``object.__getattr__`` :ref:`audit event ` before " "reading." msgstr "" -#: c-api/structures.rst:604 +#: 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:608 -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:613 +#: 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:625 +#: 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 " @@ -681,7 +817,7 @@ msgid "" "nothing." msgstr "" -#: c-api/structures.rst:636 +#: 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 " @@ -690,11 +826,11 @@ msgid "" "names." msgstr "" -#: c-api/structures.rst:645 +#: c-api/structures.rst:771 msgid "Member types" msgstr "" -#: c-api/structures.rst:647 +#: 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 " @@ -703,149 +839,149 @@ msgid "" "exception such as :exc:`TypeError` or :exc:`ValueError` is raised." msgstr "" -#: c-api/structures.rst:655 +#: 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`." msgstr "" -#: c-api/structures.rst:659 +#: c-api/structures.rst:785 msgid "Macro name" msgstr "" -#: c-api/structures.rst:659 +#: c-api/structures.rst:785 msgid "C type" msgstr "Type C" -#: c-api/structures.rst:659 +#: c-api/structures.rst:785 msgid "Python type" msgstr "Type Python" -#: c-api/structures.rst:661 +#: c-api/structures.rst:787 msgid ":c:expr:`char`" msgstr "" -#: c-api/structures.rst:662 c-api/structures.rst:664 c-api/structures.rst:666 -#: c-api/structures.rst:668 c-api/structures.rst:670 c-api/structures.rst:671 +#: 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:662 +#: c-api/structures.rst:788 msgid ":c:expr:`short`" msgstr "" -#: c-api/structures.rst:663 +#: c-api/structures.rst:789 msgid ":c:expr:`int`" msgstr "" -#: c-api/structures.rst:664 +#: c-api/structures.rst:790 msgid ":c:expr:`long`" msgstr "" -#: c-api/structures.rst:665 +#: c-api/structures.rst:791 msgid ":c:expr:`long long`" msgstr "" -#: c-api/structures.rst:666 +#: c-api/structures.rst:792 #, fuzzy msgid ":c:expr:`unsigned char`" msgstr "``unsigned char``" -#: c-api/structures.rst:667 +#: c-api/structures.rst:793 #, fuzzy msgid ":c:expr:`unsigned int`" msgstr "``unsigned int``" -#: c-api/structures.rst:668 +#: c-api/structures.rst:794 #, fuzzy msgid ":c:expr:`unsigned short`" msgstr "``unsigned short``" -#: c-api/structures.rst:669 +#: c-api/structures.rst:795 #, fuzzy msgid ":c:expr:`unsigned long`" msgstr "``unsigned long``" -#: c-api/structures.rst:670 +#: c-api/structures.rst:796 #, fuzzy msgid ":c:expr:`unsigned long long`" msgstr "``unsigned long long``" -#: c-api/structures.rst:671 +#: c-api/structures.rst:797 msgid ":c:expr:`Py_ssize_t`" msgstr "" -#: c-api/structures.rst:672 +#: c-api/structures.rst:798 msgid ":c:expr:`float`" msgstr "" -#: c-api/structures.rst:673 +#: c-api/structures.rst:799 msgid ":py:class:`float`" msgstr "" -#: c-api/structures.rst:673 +#: c-api/structures.rst:799 msgid ":c:expr:`double`" msgstr "" -#: c-api/structures.rst:674 +#: c-api/structures.rst:800 msgid ":c:expr:`char` (written as 0 or 1)" msgstr "" -#: c-api/structures.rst:674 +#: c-api/structures.rst:800 msgid ":py:class:`bool`" msgstr "" -#: c-api/structures.rst:676 +#: c-api/structures.rst:802 msgid ":c:expr:`const char *` (*)" msgstr "" -#: c-api/structures.rst:677 +#: c-api/structures.rst:803 msgid ":py:class:`str` (RO)" msgstr "" -#: c-api/structures.rst:677 +#: c-api/structures.rst:803 msgid ":c:expr:`const char[]` (*)" msgstr "" -#: c-api/structures.rst:678 +#: c-api/structures.rst:804 msgid ":c:expr:`char` (0-127)" msgstr "" -#: c-api/structures.rst:678 +#: c-api/structures.rst:804 msgid ":py:class:`str` (**)" msgstr "" -#: c-api/structures.rst:679 +#: c-api/structures.rst:805 #, fuzzy msgid ":c:expr:`PyObject *`" msgstr "PyObject \\*" -#: c-api/structures.rst:679 +#: c-api/structures.rst:805 msgid ":py:class:`object` (D)" msgstr "" -#: c-api/structures.rst:682 +#: 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:687 +#: c-api/structures.rst:813 msgid "(**): String of length 1. Only ASCII is accepted." msgstr "" -#: c-api/structures.rst:689 +#: c-api/structures.rst:815 msgid "(RO): Implies :c:macro:`Py_READONLY`." msgstr "" -#: c-api/structures.rst:691 +#: 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:717 +#: 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 " @@ -853,69 +989,69 @@ msgid "" "with the following deprecated types:" msgstr "" -#: c-api/structures.rst:725 +#: 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:731 +#: c-api/structures.rst:857 msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`." msgstr "" -#: c-api/structures.rst:734 +#: c-api/structures.rst:860 msgid "Defining Getters and Setters" msgstr "" -#: c-api/structures.rst:738 +#: 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:743 +#: c-api/structures.rst:869 msgid "attribute name" msgstr "" -#: c-api/structures.rst:747 +#: c-api/structures.rst:873 msgid "C function to get the attribute." msgstr "" -#: c-api/structures.rst:751 +#: 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:756 +#: c-api/structures.rst:882 msgid "optional docstring" msgstr "" -#: c-api/structures.rst:760 +#: c-api/structures.rst:886 msgid "" "Optional user data pointer, providing additional data for getter and setter." msgstr "" -#: c-api/structures.rst:764 +#: 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:767 +#: 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:772 +#: 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:775 +#: 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 0000000000..b87cdb96a6 --- /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 0000000000..e47ff55bac --- /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 984a79fb10..d4a5834503 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: 2025-10-17 09:58+0200\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" @@ -132,20 +132,45 @@ msgid "" 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 `." 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." 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,7 +180,7 @@ 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``, " @@ -163,50 +188,50 @@ msgid "" "``*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`." 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." 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;" 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 " @@ -214,85 +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:221 +#: 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:224 +#: 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:227 +#: c-api/sys.rst:245 msgid "" "On success, return the new file pointer. On error, set an exception and " "return ``NULL``." msgstr "" -#: c-api/sys.rst:230 +#: 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:233 +#: c-api/sys.rst:251 msgid "The file descriptor is created non-inheritable (:pep:`446`)." msgstr "" -#: c-api/sys.rst:235 +#: c-api/sys.rst:253 msgid "The caller must have an :term:`attached thread state`." msgstr "" -#: c-api/sys.rst:242 +#: c-api/sys.rst:260 msgid "Close a file that was opened by :c:func:`Py_fopen`." msgstr "" -#: c-api/sys.rst:244 +#: 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:255 +#: c-api/sys.rst:273 msgid "System Functions" msgstr "" -#: c-api/sys.rst:257 +#: 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 " @@ -300,36 +325,87 @@ msgid "" "state structure." msgstr "" -#: c-api/sys.rst:263 +#: 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:268 +#: 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:293 +msgid "" +"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:274 +#: c-api/sys.rst:297 msgid "" -"Reset :data:`sys.warnoptions` to an empty list. This function may be called " -"prior to :c:func:`Py_Initialize`." +"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:277 -msgid "Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +#: 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:282 +#: 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:285 +#: 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 " @@ -340,49 +416,49 @@ msgid "" "of digits for very large numbers." msgstr "" -#: c-api/sys.rst:293 +#: 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:298 +#: 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:303 +#: 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." msgstr "" -#: c-api/sys.rst:311 +#: 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:318 +#: 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." msgstr "" -#: c-api/sys.rst:327 +#: 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:330 +#: c-api/sys.rst:387 msgid "The *event* string argument must not be *NULL*." msgstr "" -#: c-api/sys.rst:332 +#: 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 " @@ -390,41 +466,41 @@ msgid "" "tuple, it will be added into a single-element tuple." msgstr "" -#: c-api/sys.rst:337 +#: 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:341 +#: 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." msgstr "" -#: c-api/sys.rst:344 +#: c-api/sys.rst:401 msgid ":func:`sys.audit` performs the same function from Python code." msgstr "" -#: c-api/sys.rst:346 +#: c-api/sys.rst:403 msgid "See also :c:func:`PySys_AuditTuple`." msgstr "" -#: c-api/sys.rst:352 +#: 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:358 +#: 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:366 +#: 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, " @@ -432,14 +508,14 @@ msgid "" "all interpreters created by the runtime." msgstr "" -#: c-api/sys.rst:372 +#: 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:376 +#: 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 " @@ -447,20 +523,20 @@ msgid "" "from :class:`Exception` (other errors will not be silenced)." msgstr "" -#: c-api/sys.rst:381 +#: c-api/sys.rst:438 msgid "" "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:384 +#: 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:391 +#: 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 " @@ -469,7 +545,7 @@ msgid "" "hook has been added unless they control all existing hooks." msgstr "" -#: c-api/sys.rst:400 +#: 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 " @@ -477,11 +553,11 @@ msgid "" "PySys_AddAuditHook()." msgstr "" -#: c-api/sys.rst:412 +#: c-api/sys.rst:469 msgid "Process Control" msgstr "" -#: c-api/sys.rst:419 +#: 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 " @@ -491,29 +567,29 @@ msgid "" "a :file:`core` file." msgstr "" -#: c-api/sys.rst:426 +#: 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:430 +#: c-api/sys.rst:487 msgid "Log the function name automatically." msgstr "" -#: c-api/sys.rst:440 +#: 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." msgstr "" -#: c-api/sys.rst:444 +#: c-api/sys.rst:501 msgid "Errors from finalization no longer ignored." msgstr "" -#: c-api/sys.rst:454 +#: 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 " @@ -525,7 +601,7 @@ msgid "" "should be called by *func*." msgstr "" -#: c-api/sys.rst:464 +#: c-api/sys.rst:521 msgid ":c:func:`PyUnstable_AtExit` for passing a ``void *data`` argument." msgstr "" diff --git a/c-api/threads.po b/c-api/threads.po new file mode 100644 index 0000000000..3ec9486510 --- /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/tls.po b/c-api/tls.po new file mode 100644 index 0000000000..552707c362 --- /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 6eb19e74d2..aecd7c5ee2 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -56,23 +56,39 @@ 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 " @@ -82,7 +98,7 @@ msgstr "" "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 " @@ -90,35 +106,37 @@ msgid "" "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." @@ -126,23 +144,25 @@ 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:224 c-api/tuple.rst:242 +#: 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>`." 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 " @@ -153,14 +173,14 @@ msgstr "" "à :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:114 +#: 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:121 +#: 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 " @@ -187,23 +207,30 @@ msgstr "" "cette fonction renvoie ``-1`` , stocke ``NULL`` dans ``*p`` et lève " "soit :exc:`MemoryError` soit :exc:`SystemError`." -#: c-api/tuple.rst:136 +#: c-api/tuple.rst:150 msgid "Struct Sequence Objects" msgstr "Objets structure-séquence" -#: c-api/tuple.rst:138 +#: c-api/tuple.rst:152 +#, fuzzy 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." +"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:145 +#: c-api/tuple.rst:157 +msgid "" +"To create a struct sequence, you first have to create a specific struct " +"sequence type." +msgstr "" + +#: 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 " @@ -213,44 +240,44 @@ msgstr "" "*desc*, décrit ci-dessous. Le type ainsi créé peut être instancié en " "appelant :c:func:`PyStructSequence_New`." -#: c-api/tuple.rst:217 +#: c-api/tuple.rst:234 msgid "Return ``NULL`` with an exception set on failure." msgstr "" -#: c-api/tuple.rst:153 +#: 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:158 +#: 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:166 +#: c-api/tuple.rst:183 msgid "Contains the meta information of a struct sequence type to create." msgstr "Contient les méta-données d’un type structure-séquence à créer." -#: c-api/tuple.rst:170 +#: 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:175 +#: c-api/tuple.rst:192 msgid "Pointer to docstring for the type or ``NULL`` to omit." msgstr "" -#: c-api/tuple.rst:179 +#: c-api/tuple.rst:196 msgid "Pointer to ``NULL``-terminated array with field names of the new type." msgstr "" -#: c-api/tuple.rst:183 +#: c-api/tuple.rst:200 msgid "Number of fields visible to the Python side (if used as tuple)." msgstr "" -#: c-api/tuple.rst:188 +#: 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 " @@ -259,25 +286,25 @@ msgid "" "sequence is described." msgstr "" -#: c-api/tuple.rst:196 +#: 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." msgstr "" -#: c-api/tuple.rst:201 +#: c-api/tuple.rst:218 msgid "Field docstring or ``NULL`` to omit." msgstr "" -#: c-api/tuple.rst:206 +#: c-api/tuple.rst:223 msgid "Special value for a field name to leave it unnamed." msgstr "Une valeur sentinelle pour indiquer qu’un champ n’est pas nommé." -#: c-api/tuple.rst:208 +#: c-api/tuple.rst:225 msgid "The type was changed from ``char *``." msgstr "Le type était ``char *``." -#: c-api/tuple.rst:214 +#: c-api/tuple.rst:231 msgid "" "Creates an instance of *type*, which must have been created " "with :c:func:`PyStructSequence_NewType`." @@ -285,20 +312,22 @@ msgstr "" "Crée une instance de *type*, qui doit avoir été créé " "via :c:func:`PyStructSequence_NewType`." -#: c-api/tuple.rst:222 +#: 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:230 +#: c-api/tuple.rst:249 msgid "Alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: c-api/tuple.rst:232 +#: c-api/tuple.rst:251 msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: c-api/tuple.rst:238 +#: 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 " @@ -308,15 +337,15 @@ msgstr "" "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:247 +#: c-api/tuple.rst:266 msgid "This function \"steals\" a reference to *o*." msgstr "Cette fonction « s’accapare » une référence à *o*." -#: c-api/tuple.rst:252 +#: c-api/tuple.rst:271 msgid "Alias to :c:func:`PyStructSequence_SetItem`." msgstr "" -#: c-api/tuple.rst:254 +#: 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 e18b992768..ed5b2d23f2 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: 2025-10-17 09:58+0200\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" @@ -126,39 +126,94 @@ msgid "" msgstr "" #: 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:121 +#: 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:123 +#: 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:132 +#: 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:138 +#: 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:144 +#: c-api/type.rst:184 msgid "Return true if *a* is a subtype of *b*." msgstr "" -#: c-api/type.rst:146 +#: c-api/type.rst:186 msgid "" "This function only checks for actual subtypes, which means " "that :meth:`~type.__subclasscheck__` is not called on *b*. " @@ -166,7 +221,7 @@ msgid "" "that :func:`issubclass` would do." msgstr "" -#: c-api/type.rst:154 +#: c-api/type.rst:194 msgid "" "Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type " "object. Uses Python's default memory allocation mechanism to allocate " @@ -174,13 +229,13 @@ msgid "" "if by calling :c:func:`PyObject_Init` or :c:func:`PyObject_InitVar`." msgstr "" -#: c-api/type.rst:159 +#: 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:162 +#: 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 " @@ -193,7 +248,7 @@ msgid "" "in :c:member:`~PyTypeObject.tp_free`." msgstr "" -#: c-api/type.rst:174 +#: c-api/type.rst:215 msgid "" "Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type " "object. Creates a new instance using the " @@ -201,7 +256,7 @@ msgid "" "object." msgstr "" -#: c-api/type.rst:180 +#: 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 " @@ -209,7 +264,7 @@ msgid "" "and sets an exception on error." msgstr "" -#: c-api/type.rst:186 +#: 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 " @@ -220,32 +275,32 @@ msgid "" "the :c:member:`~PyTypeObject.tp_traverse` handle." msgstr "" -#: c-api/type.rst:196 +#: c-api/type.rst:239 msgid "" "Return the type's name. Equivalent to getting the " "type's :attr:`~type.__name__` attribute." msgstr "" -#: c-api/type.rst:203 +#: c-api/type.rst:247 msgid "" "Return the type's qualified name. Equivalent to getting the " "type's :attr:`~type.__qualname__` attribute." msgstr "" -#: c-api/type.rst:210 +#: 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\"``." msgstr "" -#: c-api/type.rst:218 +#: c-api/type.rst:263 msgid "" "Return the type's module name. Equivalent to getting " "the :attr:`type.__module__` attribute." msgstr "" -#: c-api/type.rst:225 +#: 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 " @@ -253,65 +308,72 @@ msgid "" "result pointer into the appropriate function type." msgstr "" -#: c-api/type.rst:231 +#: c-api/type.rst:277 msgid "" "See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." msgstr "" -#: c-api/type.rst:235 +#: 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:241 +#: 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:264 +#: 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:247 +#: 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 " +"defines the method. See :c:func:`PyType_GetModuleByToken` for cases " "when :c:type:`!PyCMethod` cannot be used." msgstr "" -#: c-api/type.rst:260 +#: 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`." msgstr "" -#: c-api/type.rst:267 +#: 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:274 +#: 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:277 +#: c-api/type.rst:330 msgid "" "If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." msgstr "" -#: c-api/type.rst:279 +#: 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 " @@ -321,107 +383,106 @@ msgid "" "convention." msgstr "" -#: c-api/type.rst:285 +#: c-api/type.rst:343 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." +"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:293 +#: c-api/type.rst:347 +msgid "" +"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:352 +msgid "returns a borrowed reference, and" +msgstr "" + +#: c-api/type.rst:353 +msgid "" +"has a non-``void*`` argument type (which is a cosmetic difference in C)." +msgstr "" + +#: c-api/type.rst:364 msgid "" "Find the first superclass in *type*'s :term:`method resolution order` " -"whose :c:macro:`Py_tp_token` token is equal to the given one." +"whose :c:macro:`Py_tp_token` token is equal to *tp_token*." msgstr "" -#: c-api/type.rst:296 +#: c-api/type.rst:367 msgid "" "If found, set *\\*result* to a new :term:`strong reference` to it and return " "``1``." msgstr "" -#: c-api/type.rst:298 +#: c-api/type.rst:369 msgid "If not found, set *\\*result* to ``NULL`` and return ``0``." msgstr "" -#: c-api/type.rst:299 +#: c-api/type.rst:370 msgid "" "On error, set *\\*result* to ``NULL`` and return ``-1`` with an exception " "set." msgstr "" -#: c-api/type.rst:302 +#: 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:305 -msgid "The *token* argument may not be ``NULL``." +#: c-api/type.rst:376 +msgid "The *tp_token* argument may not be ``NULL``." msgstr "" -#: c-api/type.rst:311 +#: c-api/type.rst:383 msgid "Attempt to assign a version tag to the given type." msgstr "" -#: c-api/type.rst:313 +#: 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:320 -msgid "Creating Heap-Allocated Types" -msgstr "" - -#: c-api/type.rst:322 +#: c-api/type.rst:393 msgid "" -"The following functions and structs are used to create :ref:`heap types " -"`." +"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:327 -msgid "" -"Create and return a :ref:`heap type ` from the *spec* " -"(see :c:macro:`Py_TPFLAGS_HEAPTYPE`)." +#: c-api/type.rst:397 +msgid ":ref:`weakrefobjects`" msgstr "" -#: c-api/type.rst:330 -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)." +#: c-api/type.rst:398 +msgid ":py:mod:`weakref`" msgstr "" -#: c-api/type.rst:334 -msgid "" -"Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " -"supported, except if ``tp_new`` is ``NULL``." +#: c-api/type.rst:404 +msgid "Creating Heap-Allocated Types" msgstr "" -#: c-api/type.rst:337 +#: 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:343 +#: 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:350 +#: c-api/type.rst:788 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" -#: c-api/type.rst:352 +#: 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. " @@ -430,347 +491,660 @@ msgid "" "Specifically:" msgstr "" -#: c-api/type.rst:359 +#: 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:361 +#: c-api/type.rst:426 msgid ":py:meth:`~object.__init__` is not called on the new class." msgstr "" -#: c-api/type.rst:362 +#: c-api/type.rst:427 msgid ":py:meth:`~object.__init_subclass__` is not called on any bases." msgstr "" -#: c-api/type.rst:363 +#: c-api/type.rst:428 msgid ":py:meth:`~object.__set_name__` is not called on new descriptors." msgstr "" -#: c-api/type.rst:369 -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:375 +#: 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:401 +#: 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:465 +msgid "All base classes of *type* must be immutable." msgstr "" -#: c-api/type.rst:404 c-api/type.rst:424 +#: 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." +"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:479 +msgid "Type slot IDs" msgstr "" -#: c-api/type.rst:411 c-api/type.rst:431 +#: c-api/type.rst:481 msgid "" -"Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " -"is no longer allowed." +"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:395 -msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." +#: c-api/type.rst:487 +msgid ":c:data:`Py_tp_dealloc` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr "" -#: c-api/type.rst:416 -msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." +#: 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:420 +#: 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: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:436 +#: c-api/type.rst:495 +msgid ":c:data:`Py_tp_itemsize`" +msgstr "" + +#: c-api/type.rst:496 +msgid ":c:data:`Py_tp_flags`" +msgstr "" + +#: c-api/type.rst:498 msgid "" -"Make a type immutable: set the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag." +"Additional slots do not directly correspond to a :c:type:`!PyTypeObject` " +"struct field:" msgstr "" -#: c-api/type.rst:438 -msgid "All base classes of *type* must be immutable." +#: c-api/type.rst:501 +msgid ":c:data:`Py_tp_token`" msgstr "" -#: c-api/type.rst:440 -msgid "On success, return ``0``. On error, set an exception and return ``-1``." +#: 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:443 +#: c-api/type.rst:505 msgid "" -"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." +"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" msgstr "" -#: c-api/type.rst:459 -msgid "Structure defining a type's behavior." +#: c-api/type.rst:507 +msgid "" +":c:member:`~PyTypeObject.tp_weaklistoffset` " +"(use :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" msgstr "" -#: c-api/type.rst:463 -msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." +#: 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:467 +#: c-api/type.rst:511 msgid "" -"If positive, specifies the size of the instance in bytes. It is used to " -"set :c:member:`PyTypeObject.tp_basicsize`." +":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " +"``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" msgstr "" -#: c-api/type.rst:470 +#: c-api/type.rst:514 msgid "" -"If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be " -"inherited." +"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:473 +#: c-api/type.rst:520 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. For negative :c:member:`!basicsize`, Python will " -"insert padding when needed to meet :c:member:`~PyTypeObject.tp_basicsize`'s " -"alignment requirements." +"The following internal fields cannot be set at all when creating a heap type:" msgstr "" -#: c-api/type.rst:483 -msgid "Previously, this field could not be negative." +#: 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:487 +#: c-api/type.rst:529 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." +"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:491 +#: 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 "" -"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:" +":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather " +"than ``NULL``)" msgstr "" -#: c-api/type.rst:498 +#: 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 "" -"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." +":c:member:`~PyBufferProcs.bf_getbuffer` " +"and :c:member:`~PyBufferProcs.bf_releasebuffer` are now available under " +"the :ref:`limited API `." msgstr "" -#: c-api/type.rst:500 +#: c-api/type.rst:548 msgid "" -"The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that " -"the memory layout of the base class is known." +"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:502 +#: c-api/type.rst:553 msgid "" -"The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the " -"subclass does not access the instance's memory directly." +"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:505 -msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." +#: 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:509 -msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." +#: 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:511 +#: 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 "" -"If the ``Py_TPFLAGS_HEAPTYPE`` flag is not " -"set, :c:func:`PyType_FromSpecWithBases` sets it automatically." +"This may not be used in :c:member:`PyType_Spec.slots`. " +"Use :c:func:`PyType_Spec.name` instead." msgstr "" -#: c-api/type.rst:516 +#: c-api/type.rst:573 msgid "" -"Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " -"value ``{0, NULL}``." +"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:519 -msgid "Each slot ID should be specified at most once." +#: 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:529 +#: c-api/type.rst:632 +msgid "The value must be positive." +msgstr "" + +#: c-api/type.rst:587 msgid "" -"Structure defining optional functionality of a type, containing a slot ID " -"and a value pointer." +"This may not be used in :c:member:`PyType_Spec.slots`. " +"Use :c:func:`PyType_Spec.basicsize` instead." msgstr "" -#: c-api/type.rst:534 -msgid "A slot ID." +#: 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:536 +#: c-api/type.rst:598 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:" +":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:542 -msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" +#: 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:543 -msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" +#: 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:544 -msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" +#: 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:546 +#: c-api/type.rst:615 msgid "" -"An additional slot is supported that does not correspond to a :c:type:`!" -"PyTypeObject` struct field:" +"Specifying both :c:macro:`Py_tp_basicsize` and :c:macro:`!" +"Py_tp_extra_basicsize` is an error." msgstr "" -#: c-api/type.rst:549 -msgid ":c:data:`Py_tp_token`" +#: 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:551 +#: c-api/type.rst:627 msgid "" -"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" +":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:553 +#: c-api/type.rst:634 msgid "" -":c:member:`~PyTypeObject.tp_weaklistoffset` " -"(use :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" +"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:555 +#: c-api/type.rst:641 msgid "" -":c:member:`~PyTypeObject.tp_dictoffset` " -"(use :c:macro:`Py_TPFLAGS_MANAGED_DICT` instead if possible)" +"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." msgstr "" -#: c-api/type.rst:557 +#: c-api/type.rst:643 msgid "" -":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " -"``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" +"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:561 +#: c-api/type.rst:645 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." +"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:648 +msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." msgstr "" -#: c-api/type.rst:567 +#: c-api/type.rst:650 msgid "" -"The following internal fields cannot be set at all when creating a heap type:" +"This may not be used in :c:member:`PyType_Spec.slots`. " +"Use :c:func:`PyType_Spec.itemsize` instead." msgstr "" -#: c-api/type.rst:570 +#: c-api/type.rst:659 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`." +":c:member:`Slot ID ` for type flags, used to " +"set :c:member:`PyTypeObject.tp_flags`." msgstr "" -#: c-api/type.rst:576 +#: c-api/type.rst:662 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." +"The ``Py_TPFLAGS_HEAPTYPE`` flag is not " +"set, :c:func:`PyType_FromSpecWithBases` sets it automatically." msgstr "" -#: c-api/type.rst:581 -msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." +#: 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:584 +#: c-api/type.rst:673 msgid "" -":c:member:`~PyBufferProcs.bf_getbuffer` " -"and :c:member:`~PyBufferProcs.bf_releasebuffer` are now available under " -"the :ref:`limited API `." +"The following slots do not correspond to public fields in the underlying " +"structures:" msgstr "" -#: c-api/type.rst:589 +#: c-api/type.rst:678 msgid "" -"The field :c:member:`~PyTypeObject.tp_vectorcall` can now set using " -"``Py_tp_vectorcall``. See the field's documentation for details." +":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:596 +#: c-api/type.rst:684 msgid "" -"The desired value of the slot. In most cases, this is a pointer to a " -"function." +"Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " +"supported, except if ``tp_new`` is ``NULL``." msgstr "" -#: c-api/type.rst:599 -msgid "*pfunc* values may not be ``NULL``, except for the following slots:" +#: 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:601 -msgid "``Py_tp_doc``" +#: 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:602 +#: c-api/type.rst:698 msgid "" -":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather " -"than ``NULL``)" +":c:member:`Slot ID ` for recording the module in which the new " +"class is defined." msgstr "" -#: c-api/type.rst:607 +#: c-api/type.rst:701 msgid "" -"A :c:member:`~PyType_Slot.slot` that records a static memory layout ID for a " -"class." +"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:610 +#: c-api/type.rst:707 +msgid "" +"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:711 msgid "" -"If the :c:type:`PyType_Spec` of the class is statically allocated, the token " -"can be set to the spec using the special value :c:data:`Py_TP_USE_SPEC`:" +"This slot may not be used with :c:func:`PyType_GetSlot`. " +"Use :c:func:`PyType_GetModule` instead." msgstr "" -#: c-api/type.rst:619 +#: c-api/type.rst:718 +msgid "" +":c:member:`Slot ID ` for recording a static memory layout ID " +"for a class." +msgstr "" + +#: c-api/type.rst:721 +msgid "" +"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:730 msgid "It can also be set to an arbitrary pointer, but you must ensure that:" msgstr "" -#: c-api/type.rst:621 +#: c-api/type.rst:732 msgid "" "The pointer outlives the class, so it's not reused for something else while " "the class exists." msgstr "" -#: c-api/type.rst:623 +#: c-api/type.rst:734 msgid "" "It \"belongs\" to the extension module where the class lives, so it will not " "clash with other extensions." msgstr "" -#: c-api/type.rst:626 +#: c-api/type.rst:737 msgid "" "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:629 +#: 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:638 +#: c-api/type.rst:749 msgid "" "Used as a value with :c:data:`Py_tp_token` to set the token to the " -"class's :c:type:`PyType_Spec`. Expands to ``NULL``." +"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:759 +msgid "" +":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: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/typeobj.po b/c-api/typeobj.po index 6075c9f0d5..74639ba913 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: 2025-10-17 09:58+0200\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" @@ -91,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 "" @@ -112,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:417 +#: 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 "" @@ -375,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 "" @@ -387,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:347 c-api/typeobj.rst:369 c-api/typeobj.rst:382 -#: c-api/typeobj.rst:405 c-api/typeobj.rst:413 c-api/typeobj.rst:417 -#: c-api/typeobj.rst:432 c-api/typeobj.rst:441 c-api/typeobj.rst:447 +#: 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 "" @@ -498,7 +503,7 @@ msgstr "" msgid "[:c:member:`~PyTypeObject.tp_subclasses`]" msgstr "" -#: c-api/typeobj.rst:138 c-api/typeobj.rst:349 +#: c-api/typeobj.rst:279 c-api/typeobj.rst:353 msgid "void *" msgstr "" @@ -1048,7 +1053,7 @@ msgid ":c:func:`releasebufferproc`" msgstr "" #: c-api/typeobj.rst:330 -msgid "__release_\\ buffer\\__" +msgid "__release_ buffer\\__" msgstr "" #: c-api/typeobj.rst:337 @@ -1071,12 +1076,12 @@ msgstr "" msgid "void" msgstr "" -#: c-api/typeobj.rst:0 +#: c-api/typeobj.rst:352 msgid ":c:type:`visitproc`" msgstr "" -#: c-api/typeobj.rst:351 c-api/typeobj.rst:376 c-api/typeobj.rst:399 -#: c-api/typeobj.rst:430 c-api/typeobj.rst:458 c-api/typeobj.rst:463 +#: 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*" @@ -1088,7 +1093,7 @@ msgstr "" msgid ":c:type:`getbufferproc`" msgstr "" -#: c-api/typeobj.rst:0 +#: c-api/typeobj.rst:426 msgid ":c:type:`Py_buffer` *" msgstr "" @@ -1141,21 +1146,21 @@ msgid "" "types>`, the instances *do* count as references." msgstr "" -#: c-api/typeobj.rst:527 c-api/typeobj.rst:587 c-api/typeobj.rst:807 -#: c-api/typeobj.rst:869 c-api/typeobj.rst:904 c-api/typeobj.rst:945 -#: c-api/typeobj.rst:969 c-api/typeobj.rst:1024 c-api/typeobj.rst:1065 -#: c-api/typeobj.rst:1110 c-api/typeobj.rst:1166 c-api/typeobj.rst:1187 -#: c-api/typeobj.rst:1211 c-api/typeobj.rst:1252 c-api/typeobj.rst:1283 -#: c-api/typeobj.rst:1349 c-api/typeobj.rst:1389 c-api/typeobj.rst:1441 -#: c-api/typeobj.rst:1558 c-api/typeobj.rst:1767 c-api/typeobj.rst:1828 -#: c-api/typeobj.rst:1864 c-api/typeobj.rst:1893 c-api/typeobj.rst:1955 -#: c-api/typeobj.rst:1999 c-api/typeobj.rst:2072 c-api/typeobj.rst:2129 -#: c-api/typeobj.rst:2190 c-api/typeobj.rst:2231 c-api/typeobj.rst:2258 -#: c-api/typeobj.rst:2289 c-api/typeobj.rst:2489 +#: 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:545 c-api/typeobj.rst:589 +#: c-api/typeobj.rst:545 c-api/typeobj.rst:592 msgid "This field is not inherited by subtypes." msgstr "" @@ -1184,8 +1189,8 @@ msgid "" "if it is non-zero." msgstr "" -#: c-api/typeobj.rst:809 c-api/typeobj.rst:1026 c-api/typeobj.rst:1830 -#: c-api/typeobj.rst:1983 c-api/typeobj.rst:2074 c-api/typeobj.rst:2433 +#: 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 "" @@ -1224,6 +1229,12 @@ msgstr "" #: 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 " @@ -1234,14 +1245,14 @@ msgid "" "the :c:member:`~PyTypeObject.tp_name` initializer ``\"P.Q.M.T\"``." msgstr "" -#: c-api/typeobj.rst:566 +#: 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:571 +#: 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 " @@ -1249,7 +1260,7 @@ msgid "" "the last dot is made accessible as the :attr:`~type.__name__` attribute." msgstr "" -#: c-api/typeobj.rst:577 +#: 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 " @@ -1259,19 +1270,26 @@ msgid "" "documentations created with pydoc." msgstr "" -#: c-api/typeobj.rst:583 +#: 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`)." msgstr "" -#: c-api/typeobj.rst:595 +#: c-api/typeobj.rst:598 msgid "" "These fields allow calculating the size in bytes of instances of the type." msgstr "" -#: c-api/typeobj.rst:597 +#: c-api/typeobj.rst:600 +msgid "" +"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:604 msgid "" "There are two kinds of types: types with fixed-length instances have a " "zero :c:member:`!tp_itemsize` field, types with variable-length instances " @@ -1281,7 +1299,7 @@ msgid "" "using :c:func:`PyUnstable_Object_GC_NewWithExtraData`.)" msgstr "" -#: c-api/typeobj.rst:604 +#: c-api/typeobj.rst:611 msgid "" "For a type with variable-length instances, the instances must have " "an :c:member:`~PyVarObject.ob_size` field, and the instance size " @@ -1289,7 +1307,7 @@ msgid "" "is the \"length\" of the object." msgstr "" -#: c-api/typeobj.rst:609 +#: c-api/typeobj.rst:616 msgid "" "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` " @@ -1300,13 +1318,13 @@ msgid "" "using :c:func:`PyLong_Export`." msgstr "" -#: c-api/typeobj.rst:619 +#: c-api/typeobj.rst:626 msgid "" "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:622 +#: c-api/typeobj.rst:629 msgid "" "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. " @@ -1316,14 +1334,14 @@ msgid "" "Call :c:func:`PyList_Size` instead.)" msgstr "" -#: c-api/typeobj.rst:629 +#: 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:633 +#: 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 " @@ -1332,7 +1350,7 @@ msgid "" "base's :c:member:`!tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:639 +#: 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 " @@ -1341,23 +1359,23 @@ msgid "" "or :c:macro:`PyObject_VAR_HEAD`, respectively." msgstr "" -#: c-api/typeobj.rst:645 +#: c-api/typeobj.rst:652 msgid "" "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:648 +#: c-api/typeobj.rst:655 msgid "" "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:651 +#: c-api/typeobj.rst:658 msgid "Notes about alignment:" msgstr "" -#: c-api/typeobj.rst:653 +#: 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 " @@ -1366,7 +1384,7 @@ msgid "" "you." msgstr "" -#: c-api/typeobj.rst:658 +#: c-api/typeobj.rst:665 msgid "" "If the variable items require a particular alignment, :c:member:`!" "tp_basicsize` and :c:member:`!tp_itemsize` must each be a multiple of that " @@ -1374,14 +1392,14 @@ msgid "" "your responsibility that both fields are a multiple of ``_Alignof(double)``." msgstr "" -#: c-api/typeobj.rst:667 +#: 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:672 +#: 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 " @@ -1389,12 +1407,12 @@ msgid "" "implementation of the base type)." msgstr "" -#: c-api/typeobj.rst:679 +#: c-api/typeobj.rst:688 msgid "" "A pointer to the instance destructor function. The function signature is::" msgstr "" -#: c-api/typeobj.rst:683 +#: 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 " @@ -1402,7 +1420,7 @@ msgid "" "free the object itself." msgstr "" -#: c-api/typeobj.rst:688 +#: c-api/typeobj.rst:697 msgid "" "If you may call functions that may set the error indicator, you must " "use :c:func:`PyErr_GetRaisedException` " @@ -1411,53 +1429,53 @@ msgid "" "processing a different error):" msgstr "" -#: c-api/typeobj.rst:704 +#: 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:708 +#: c-api/typeobj.rst:717 msgid "No guarantees are made about when an object is destroyed, except:" msgstr "" -#: c-api/typeobj.rst:710 +#: 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:714 +#: 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:718 +#: 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:722 +#: 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:726 +#: 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:730 +#: 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 " @@ -1465,7 +1483,7 @@ msgid "" "that :c:member:`!tp_clear` might have already been called." msgstr "" -#: c-api/typeobj.rst:735 +#: 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 " @@ -1473,7 +1491,7 @@ msgid "" "example code below.::" msgstr "" -#: c-api/typeobj.rst:749 +#: 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 " @@ -1481,12 +1499,12 @@ msgid "" "with :c:func:`PyErr_WriteUnraisable`)." msgstr "" -#: c-api/typeobj.rst:754 +#: c-api/typeobj.rst:763 #, fuzzy msgid "Example::" msgstr "Exemples" -#: c-api/typeobj.rst:795 +#: c-api/typeobj.rst:804 msgid "" ":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 " @@ -1499,33 +1517,33 @@ msgid "" "violate any assumptions of the library." msgstr "" -#: c-api/typeobj.rst:1713 c-api/typeobj.rst:2446 +#: c-api/typeobj.rst:1739 c-api/typeobj.rst:2506 msgid "" ":ref:`life-cycle` for details about how this slot relates to other slots." msgstr "" -#: c-api/typeobj.rst:818 +#: 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:823 +#: 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:827 +#: 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:831 +#: 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 " @@ -1533,13 +1551,13 @@ msgid "" "*tp_call* to :c:func:`PyVectorcall_Call`." msgstr "" -#: c-api/typeobj.rst:838 +#: 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:844 +#: 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 " @@ -1549,7 +1567,7 @@ msgid "" "the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag." msgstr "" -#: c-api/typeobj.rst:854 +#: 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 " @@ -1557,11 +1575,11 @@ msgid "" "except when :c:func:`PyVectorcall_Call` is explicitly called." msgstr "" -#: c-api/typeobj.rst:863 +#: c-api/typeobj.rst:874 msgid "An optional pointer to the get-attribute-string function." msgstr "" -#: c-api/typeobj.rst:865 +#: 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, " @@ -1569,11 +1587,11 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:1067 +#: c-api/typeobj.rst:1090 msgid "Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject.tp_getattro`" msgstr "" -#: c-api/typeobj.rst:873 +#: c-api/typeobj.rst:884 msgid "" "This field is inherited by subtypes together " "with :c:member:`~PyTypeObject.tp_getattro`: a subtype inherits " @@ -1583,12 +1601,12 @@ msgid "" "and :c:member:`~PyTypeObject.tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1080 +#: c-api/typeobj.rst:1105 msgid "" "An optional pointer to the function for setting and deleting attributes." msgstr "" -#: c-api/typeobj.rst:882 +#: 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, " @@ -1596,11 +1614,11 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:1093 +#: c-api/typeobj.rst:1118 msgid "Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject.tp_setattro`" msgstr "" -#: c-api/typeobj.rst:890 +#: c-api/typeobj.rst:903 msgid "" "This field is inherited by subtypes together " "with :c:member:`~PyTypeObject.tp_setattro`: a subtype inherits " @@ -1610,34 +1628,34 @@ msgid "" "and :c:member:`~PyTypeObject.tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:897 +#: 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:901 +#: c-api/typeobj.rst:914 msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." msgstr "" -#: c-api/typeobj.rst:906 +#: 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:914 +#: c-api/typeobj.rst:929 msgid "" "An optional pointer to a function that implements the built-in " "function :func:`repr`." msgstr "" -#: c-api/typeobj.rst:917 +#: c-api/typeobj.rst:932 msgid "The signature is the same as for :c:func:`PyObject_Repr`::" msgstr "" -#: c-api/typeobj.rst:921 +#: 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 " @@ -1646,76 +1664,76 @@ msgid "" "``'>'`` from which both the type and the value of the object can be deduced." msgstr "" -#: c-api/typeobj.rst:1011 c-api/typeobj.rst:1073 c-api/typeobj.rst:1141 -#: c-api/typeobj.rst:1810 c-api/typeobj.rst:1960 c-api/typeobj.rst:2076 -#: c-api/typeobj.rst:2135 c-api/typeobj.rst:2194 +#: 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:934 +#: 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:941 +#: 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:947 +#: 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:953 +#: 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:959 +#: 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:965 +#: 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:971 +#: 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:979 +#: c-api/typeobj.rst:996 msgid "" "An optional pointer to a function that implements the built-in " "function :func:`hash`." msgstr "" -#: c-api/typeobj.rst:982 +#: c-api/typeobj.rst:999 msgid "The signature is the same as for :c:func:`PyObject_Hash`::" msgstr "" -#: c-api/typeobj.rst:986 +#: 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:990 +#: 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 " @@ -1723,7 +1741,7 @@ msgid "" "to :c:func:`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:994 +#: 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 " @@ -1734,11 +1752,11 @@ msgid "" "to :c:func:`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:1769 +#: c-api/typeobj.rst:1797 msgid "Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject.tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:1006 +#: c-api/typeobj.rst:1023 msgid "" "This field is inherited by subtypes together " "with :c:member:`~PyTypeObject.tp_richcompare`: a subtype inherits both " @@ -1748,18 +1766,18 @@ msgid "" "and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1013 +#: c-api/typeobj.rst:1030 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericHash`." msgstr "" -#: c-api/typeobj.rst:1018 +#: 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:1031 +#: 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, " @@ -1768,11 +1786,11 @@ msgid "" "and :c:func:`PyObject_Str` will call this handler.)" msgstr "" -#: c-api/typeobj.rst:1036 +#: c-api/typeobj.rst:1057 msgid "The signature is the same as for :c:func:`PyObject_Str`::" msgstr "" -#: c-api/typeobj.rst:1040 +#: 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 " @@ -1780,28 +1798,28 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:1050 +#: 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:1056 +#: c-api/typeobj.rst:1079 msgid "An optional pointer to the get-attribute function." msgstr "" -#: c-api/typeobj.rst:1058 +#: c-api/typeobj.rst:1081 msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" msgstr "" -#: c-api/typeobj.rst:1062 +#: 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." msgstr "" -#: c-api/typeobj.rst:1069 +#: c-api/typeobj.rst:1092 msgid "" "This field is inherited by subtypes together " "with :c:member:`~PyTypeObject.tp_getattr`: a subtype inherits " @@ -1811,15 +1829,15 @@ msgid "" "and :c:member:`~PyTypeObject.tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1075 +#: c-api/typeobj.rst:1098 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:1082 +#: c-api/typeobj.rst:1107 msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" msgstr "" -#: c-api/typeobj.rst:1086 +#: 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 " @@ -1827,7 +1845,7 @@ msgid "" "setting object attributes." msgstr "" -#: c-api/typeobj.rst:1095 +#: c-api/typeobj.rst:1120 msgid "" "This field is inherited by subtypes together " "with :c:member:`~PyTypeObject.tp_setattr`: a subtype inherits " @@ -1837,24 +1855,30 @@ msgid "" "and :c:member:`~PyTypeObject.tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1101 +#: c-api/typeobj.rst:1126 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" -#: c-api/typeobj.rst:1106 +#: 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:1112 +#: 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:1118 +#: 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 " @@ -1866,7 +1890,7 @@ msgid "" "``NULL`` value instead." msgstr "" -#: c-api/typeobj.rst:1128 +#: 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 " @@ -1882,17 +1906,17 @@ msgid "" "``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1143 +#: c-api/typeobj.rst:1171 msgid "" ":c:data:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" -#: c-api/typeobj.rst:1146 +#: c-api/typeobj.rst:1174 msgid "**Bit Masks:**" msgstr "" -#: c-api/typeobj.rst:1150 +#: 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 " @@ -1901,7 +1925,7 @@ msgid "" "*f*, and checks whether ``tp->tp_flags & f`` is non-zero." msgstr "" -#: c-api/typeobj.rst:1157 +#: 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 " @@ -1914,30 +1938,30 @@ msgid "" "can form a reference cycle with their own module object." msgstr "" -#: c-api/typeobj.rst:1179 c-api/typeobj.rst:1199 c-api/typeobj.rst:1231 +#: c-api/typeobj.rst:1207 c-api/typeobj.rst:1227 c-api/typeobj.rst:1259 msgid "???" msgstr "" -#: c-api/typeobj.rst:1173 +#: 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:1184 +#: c-api/typeobj.rst:1212 msgid "" "This bit is set when the type object has been fully initialized " "by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1194 +#: 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:1204 +#: c-api/typeobj.rst:1232 msgid "" "This bit is set when the object supports garbage collection. If this bit is " "set, memory for new instances (see :c:member:`~PyTypeObject.tp_alloc`) must " @@ -1947,11 +1971,11 @@ msgid "" "More information in section :ref:`supporting-cycle-detection`." msgstr "" -#: c-api/typeobj.rst:1560 c-api/typeobj.rst:1704 +#: 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:1215 +#: 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` " @@ -1962,108 +1986,123 @@ msgid "" "``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1225 +#: 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:1236 +#: c-api/typeobj.rst:1264 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: c-api/typeobj.rst:1238 +#: c-api/typeobj.rst:1266 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: c-api/typeobj.rst:1240 +#: 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:1243 +#: c-api/typeobj.rst:1271 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1246 +#: 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``." msgstr "" -#: c-api/typeobj.rst:1254 +#: 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." msgstr "" -#: c-api/typeobj.rst:1260 +#: c-api/typeobj.rst:1288 msgid "" "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:1263 -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:1265 +#: 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:1272 +#: 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:1278 +#: c-api/typeobj.rst:1306 msgid "" "This bit indicates that instances of the class should be weakly " "referenceable." msgstr "" -#: c-api/typeobj.rst:1285 +#: c-api/typeobj.rst:1315 msgid "" "This flag is inherited unless " "the :c:member:`~PyTypeObject.tp_weaklistoffset` field is set in a superclass." msgstr "" -#: c-api/typeobj.rst:1291 +#: c-api/typeobj.rst:1321 +msgid "" +"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: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:1294 +#: 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:1299 +#: 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:1307 +#: c-api/typeobj.rst:1350 msgid "This flag is inherited." msgstr "" -#: c-api/typeobj.rst:1321 +#: 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 " @@ -2072,92 +2111,102 @@ msgid "" "check is used." msgstr "" -#: c-api/typeobj.rst:1332 +#: 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:1337 +#: 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." msgstr "" -#: c-api/typeobj.rst:1345 +#: 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:1351 +#: c-api/typeobj.rst:1397 msgid "" "This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited." msgstr "" -#: c-api/typeobj.rst:1358 +#: c-api/typeobj.rst:1400 +msgid "as ``_Py_TPFLAGS_HAVE_VECTORCALL``" +msgstr "" + +#: c-api/typeobj.rst:1404 +msgid "" +"Renamed to the current name, without the leading underscore. The old " +"provisional name is :term:`soft deprecated`." +msgstr "" + +#: 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:1361 +#: c-api/typeobj.rst:1412 msgid "This flag can now be inherited by mutable classes." msgstr "" -#: c-api/typeobj.rst:1365 +#: 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:1367 +#: c-api/typeobj.rst:1418 msgid "" ":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " "`." msgstr "" -#: c-api/typeobj.rst:1372 +#: c-api/typeobj.rst:1532 c-api/typeobj.rst:1544 msgid "This flag is not inherited." msgstr "" -#: c-api/typeobj.rst:1378 +#: 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." msgstr "" -#: c-api/typeobj.rst:1382 +#: 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:1385 +#: 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." msgstr "" -#: c-api/typeobj.rst:1391 +#: 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:1398 +#: 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:1409 +#: 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 " @@ -2165,23 +2214,23 @@ msgid "" "unset when registering :class:`collections.abc.Sequence`." msgstr "" -#: c-api/typeobj.rst:1438 +#: 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:1421 +#: c-api/typeobj.rst:1472 msgid "" "This flag is inherited by types that do not already " "set :c:macro:`Py_TPFLAGS_SEQUENCE`." msgstr "" -#: c-api/typeobj.rst:1446 +#: 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:1431 +#: 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 " @@ -2189,135 +2238,86 @@ msgid "" "unset when registering :class:`collections.abc.Mapping`." msgstr "" -#: c-api/typeobj.rst:1443 +#: c-api/typeobj.rst:1494 msgid "" "This flag is inherited by types that do not already " "set :c:macro:`Py_TPFLAGS_MAPPING`." msgstr "" -#: c-api/typeobj.rst:1453 +#: 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:1457 +#: 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:1463 -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:1469 -msgid "This field is *not* inherited by subtypes." -msgstr "" - -#: c-api/typeobj.rst:1474 -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::" -msgstr "" - -#: c-api/typeobj.rst:1699 +#: c-api/typeobj.rst:1514 msgid "" -"More information about Python's garbage collection scheme can be found in " -"section :ref:`supporting-cycle-detection`." +"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:1482 +#: c-api/typeobj.rst:1524 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::" +"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:1498 -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." +#: c-api/typeobj.rst:1528 +msgid "This requires that :c:macro:`Py_TPFLAGS_HAVE_GC` is set." msgstr "" -#: c-api/typeobj.rst:1502 +#: c-api/typeobj.rst:1539 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." +"This bit indicates that this is an abstract type and therefore cannot be " +"instantiated." msgstr "" -#: c-api/typeobj.rst:1506 -msgid "" -"Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::" +#: c-api/typeobj.rst:1547 +msgid ":mod:`abc`" msgstr "" -#: c-api/typeobj.rst:1510 +#: c-api/typeobj.rst:1552 msgid "" -"It is only needed since Python 3.9. To support Python 3.8 and older, this " -"line must be conditional::" +"Internal. Do not set or unset this flag. Historically, this was a reserved " +"flag for use in Stackless Python." msgstr "" -#: c-api/typeobj.rst:1517 +#: c-api/typeobj.rst:1556 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::" +"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:1524 +#: c-api/typeobj.rst:1564 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)." -msgstr "" - -#: c-api/typeobj.rst:1535 -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." +"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:1539 -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." +#: c-api/typeobj.rst:1570 +msgid "This field is *not* inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:1548 +#: c-api/typeobj.rst:1577 msgid "" -"The :c:member:`~PyTypeObject.tp_traverse` function can be called from any " -"thread." +"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." msgstr "" -#: c-api/typeobj.rst:1553 -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." +#: c-api/typeobj.rst:1580 +msgid "See :ref:`gc-traversal` for documentation." msgstr "" -#: c-api/typeobj.rst:1562 +#: c-api/typeobj.rst:1586 msgid "" "This field is inherited by subtypes together " "with :c:member:`~PyTypeObject.tp_clear` and " @@ -2327,11 +2327,11 @@ msgid "" "if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1570 +#: c-api/typeobj.rst:1596 msgid "An optional pointer to a clear function. The signature is::" msgstr "" -#: c-api/typeobj.rst:1574 +#: 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 " @@ -2339,7 +2339,7 @@ msgid "" "to satisfy design invariants held during normal use." msgstr "" -#: c-api/typeobj.rst:1579 +#: 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 " @@ -2350,44 +2350,44 @@ msgid "" "idempotent functions like :c:func:`Py_CLEAR`.)" msgstr "" -#: c-api/typeobj.rst:1587 +#: 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:1592 +#: c-api/typeobj.rst:1618 msgid "" "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:1598 +#: c-api/typeobj.rst:1624 msgid "" "Referents (direct and indirect) might have already been cleared; they are " "not guaranteed to be in a consistent state." msgstr "" -#: c-api/typeobj.rst:1603 +#: c-api/typeobj.rst:1629 msgid "" "The :c:member:`~PyTypeObject.tp_clear` function can be called from any " "thread." msgstr "" -#: c-api/typeobj.rst:1608 +#: c-api/typeobj.rst:1634 msgid "" "An object is not guaranteed to be automatically cleared before its " "destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called." msgstr "" -#: c-api/typeobj.rst:1611 +#: c-api/typeobj.rst:1637 msgid "" "This function differs from the destructor " "(:c:member:`~PyTypeObject.tp_dealloc`) in the following ways:" msgstr "" -#: c-api/typeobj.rst:1614 +#: c-api/typeobj.rst:1640 msgid "" "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, " @@ -2397,7 +2397,7 @@ msgid "" "calling :c:member:`~PyTypeObject.tp_free`)." msgstr "" -#: c-api/typeobj.rst:1620 +#: c-api/typeobj.rst:1646 msgid "" "When :c:member:`!tp_clear` is called, other objects might still hold " "references to the object being cleared. Because of this, :c:member:`!" @@ -2407,7 +2407,7 @@ msgid "" "destroy the object itself by deallocating it." msgstr "" -#: c-api/typeobj.rst:1626 +#: 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 " @@ -2415,20 +2415,20 @@ msgid "" "object or the object is a member of a :term:`cyclic isolate`)." msgstr "" -#: c-api/typeobj.rst:1631 +#: c-api/typeobj.rst:1657 msgid "" "No guarantees are made about when, if, or how often Python automatically " "clears an object, except:" msgstr "" -#: c-api/typeobj.rst:1634 +#: c-api/typeobj.rst:1660 msgid "" "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:1637 +#: c-api/typeobj.rst:1663 msgid "" "Python will not automatically clear an object if it has not been " "automatically finalized (see :c:member:`~PyTypeObject.tp_finalize`). (If " @@ -2436,14 +2436,14 @@ msgid "" "automatically finalized again before it is cleared.)" msgstr "" -#: c-api/typeobj.rst:1641 +#: c-api/typeobj.rst:1667 msgid "" "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:1644 +#: c-api/typeobj.rst:1670 msgid "" "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 " @@ -2451,20 +2451,20 @@ msgid "" "while :c:member:`!tp_clear` is still executing." msgstr "" -#: c-api/typeobj.rst:1648 +#: c-api/typeobj.rst:1674 msgid "" "Python will not automatically call :c:member:`!tp_clear` multiple times " "concurrently." msgstr "" -#: c-api/typeobj.rst:1651 +#: 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:1655 +#: 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 " @@ -2478,7 +2478,7 @@ msgid "" "implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1666 +#: 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, " @@ -2486,7 +2486,7 @@ msgid "" "example::" msgstr "" -#: c-api/typeobj.rst:1681 +#: 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 " @@ -2501,14 +2501,20 @@ msgid "" "performs the operations in a safe order." msgstr "" -#: c-api/typeobj.rst:1693 +#: c-api/typeobj.rst:1719 msgid "" "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:1706 +#: c-api/typeobj.rst:1725 +msgid "" +"More information about Python's garbage collection scheme can be found in " +"section :ref:`supporting-cycle-detection`." +msgstr "" + +#: c-api/typeobj.rst:1732 msgid "" "This field is inherited by subtypes together " "with :c:member:`~PyTypeObject.tp_traverse` and " @@ -2518,18 +2524,18 @@ msgid "" "if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1718 +#: c-api/typeobj.rst:1746 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: c-api/typeobj.rst:1722 +#: 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:1725 +#: 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 " @@ -2537,51 +2543,51 @@ msgid "" "set an exception condition." msgstr "" -#: c-api/typeobj.rst:1730 +#: 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`:" msgstr "" -#: c-api/typeobj.rst:1736 +#: c-api/typeobj.rst:1764 msgid "Constant" msgstr "Constante" -#: c-api/typeobj.rst:1736 +#: c-api/typeobj.rst:1764 msgid "Comparison" msgstr "Comparaison" -#: c-api/typeobj.rst:1738 +#: c-api/typeobj.rst:1766 msgid "``<``" msgstr "``<``" -#: c-api/typeobj.rst:1740 +#: c-api/typeobj.rst:1768 msgid "``<=``" msgstr "``<=``" -#: c-api/typeobj.rst:1742 +#: c-api/typeobj.rst:1770 msgid "``==``" msgstr "``==``" -#: c-api/typeobj.rst:1744 +#: c-api/typeobj.rst:1772 msgid "``!=``" msgstr "``!=``" -#: c-api/typeobj.rst:1746 +#: c-api/typeobj.rst:1774 msgid "``>``" msgstr "``>``" -#: c-api/typeobj.rst:1748 +#: c-api/typeobj.rst:1776 msgid "``>=``" msgstr "``>=``" -#: c-api/typeobj.rst:1751 +#: c-api/typeobj.rst:1779 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: c-api/typeobj.rst:1755 +#: 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 " @@ -2589,15 +2595,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: c-api/typeobj.rst:1761 +#: c-api/typeobj.rst:1789 msgid "The returned value is a new :term:`strong reference`." msgstr "" -#: c-api/typeobj.rst:1763 +#: c-api/typeobj.rst:1791 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: c-api/typeobj.rst:1771 +#: c-api/typeobj.rst:1799 msgid "" "This field is inherited by subtypes together " "with :c:member:`~PyTypeObject.tp_hash`: a subtype " @@ -2607,7 +2613,7 @@ msgid "" "and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1778 +#: c-api/typeobj.rst:1806 msgid "" ":c:data:`PyBaseObject_Type` provides " "a :c:member:`~PyTypeObject.tp_richcompare` implementation, which may be " @@ -2616,13 +2622,13 @@ msgid "" "be able to participate in any comparisons." msgstr "" -#: c-api/typeobj.rst:1787 +#: 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:1790 +#: 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 " @@ -2632,19 +2638,19 @@ msgid "" "type :c:expr:`PyObject*` which is initialized to ``NULL``." msgstr "" -#: c-api/typeobj.rst:1797 +#: 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:1800 +#: 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:1805 +#: 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 " @@ -2653,7 +2659,7 @@ msgid "" "not be a problem." msgstr "" -#: c-api/typeobj.rst:1812 +#: 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, " @@ -2661,7 +2667,7 @@ msgid "" "value, to indicate that it is unsafe to use this field." msgstr "" -#: c-api/typeobj.rst:1820 +#: 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 " @@ -2669,17 +2675,17 @@ msgid "" "function)." msgstr "" -#: c-api/typeobj.rst:1824 +#: c-api/typeobj.rst:1854 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: c-api/typeobj.rst:1835 +#: c-api/typeobj.rst:1867 msgid "" "An optional pointer to a function that returns the next item in " "an :term:`iterator`. The signature is::" msgstr "" -#: c-api/typeobj.rst:1840 +#: 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 " @@ -2687,74 +2693,74 @@ msgid "" "instances of this type are iterators." msgstr "" -#: c-api/typeobj.rst:1845 +#: 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:1849 +#: c-api/typeobj.rst:1881 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: c-api/typeobj.rst:1858 +#: 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." msgstr "" -#: c-api/typeobj.rst:1861 +#: 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:1866 +#: 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:1872 +#: 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." msgstr "" -#: c-api/typeobj.rst:1876 +#: 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:1881 +#: 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:1887 +#: 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." msgstr "" -#: c-api/typeobj.rst:1890 +#: 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:1895 +#: 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:1901 +#: 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 " @@ -2762,7 +2768,7 @@ msgid "" "metatype." msgstr "" -#: c-api/typeobj.rst:1909 +#: 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 " @@ -2770,7 +2776,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: c-api/typeobj.rst:1914 +#: 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 " @@ -2778,27 +2784,27 @@ msgid "" "compilers are strictly standard conforming in this particular behavior." msgstr "" -#: c-api/typeobj.rst:1920 +#: 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:1925 +#: c-api/typeobj.rst:1965 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: c-api/typeobj.rst:1929 +#: 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:1935 +#: c-api/typeobj.rst:1975 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1937 +#: 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 " @@ -2809,63 +2815,63 @@ msgid "" "finished, this field should be treated as read-only." msgstr "" -#: c-api/typeobj.rst:1945 +#: 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." msgstr "" -#: c-api/typeobj.rst:1951 +#: 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." msgstr "" -#: c-api/typeobj.rst:1957 +#: 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:1962 +#: 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:1967 +#: 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." msgstr "" -#: c-api/typeobj.rst:1973 +#: c-api/typeobj.rst:2015 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: c-api/typeobj.rst:1991 c-api/typeobj.rst:2085 c-api/typeobj.rst:2108 +#: 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:1988 +#: 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:1995 +#: c-api/typeobj.rst:2039 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: c-api/typeobj.rst:2006 +#: 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:2009 +#: 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 " @@ -2873,19 +2879,19 @@ msgid "" "by :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:2014 +#: 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:2017 +#: 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:2019 +#: 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 " @@ -2895,13 +2901,13 @@ msgid "" "call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" -#: c-api/typeobj.rst:2025 +#: c-api/typeobj.rst:2069 msgid "" "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:2030 +#: 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 " @@ -2909,14 +2915,14 @@ msgid "" "use :c:macro:`Py_TPFLAGS_MANAGED_DICT`." msgstr "" -#: c-api/typeobj.rst:2037 +#: 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:2040 +#: 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, " @@ -2924,11 +2930,11 @@ msgid "" "indicate that it is unsafe to use this field." msgstr "" -#: c-api/typeobj.rst:2048 +#: c-api/typeobj.rst:2094 msgid "An optional pointer to an instance initialization function." msgstr "" -#: c-api/typeobj.rst:2050 +#: 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 " @@ -2936,14 +2942,14 @@ msgid "" "instance by calling its :meth:`!__init__` method again." msgstr "" -#: c-api/typeobj.rst:2059 +#: 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__`." msgstr "" -#: c-api/typeobj.rst:2063 +#: 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 " @@ -2955,43 +2961,43 @@ msgid "" "original type, the subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: c-api/typeobj.rst:2070 +#: c-api/typeobj.rst:2116 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: c-api/typeobj.rst:2078 +#: c-api/typeobj.rst:2124 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: c-api/typeobj.rst:2083 +#: c-api/typeobj.rst:2131 msgid "An optional pointer to an instance allocation function." msgstr "" -#: c-api/typeobj.rst:2091 +#: c-api/typeobj.rst:2139 msgid "" "Static subtypes inherit this slot, which will " "be :c:func:`PyType_GenericAlloc` if inherited from :class:`object`." msgstr "" -#: c-api/typeobj.rst:2161 +#: c-api/typeobj.rst:2213 msgid ":ref:`Heap subtypes ` do not inherit this slot." msgstr "" -#: c-api/typeobj.rst:2098 +#: c-api/typeobj.rst:2146 msgid "" "For heap subtypes, this field is always set to :c:func:`PyType_GenericAlloc`." msgstr "" -#: c-api/typeobj.rst:2169 +#: c-api/typeobj.rst:2221 msgid "For static subtypes, this slot is inherited (see above)." msgstr "" -#: c-api/typeobj.rst:2106 +#: c-api/typeobj.rst:2156 msgid "An optional pointer to an instance creation function." msgstr "" -#: c-api/typeobj.rst:2112 +#: 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 " @@ -3000,7 +3006,7 @@ msgid "" "subtype of that type (but not an unrelated type)." msgstr "" -#: c-api/typeobj.rst:2118 +#: 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 " @@ -3012,13 +3018,13 @@ msgid "" "initialization should be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:2126 +#: 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:2131 +#: c-api/typeobj.rst:2181 msgid "" "This field is inherited by subtypes, except it is not inherited " "by :ref:`static types ` " @@ -3026,7 +3032,7 @@ msgid "" "``&PyBaseObject_Type``." msgstr "" -#: c-api/typeobj.rst:2137 +#: 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 " @@ -3034,18 +3040,18 @@ msgid "" "factory function." msgstr "" -#: c-api/typeobj.rst:2145 +#: c-api/typeobj.rst:2197 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:2149 +#: c-api/typeobj.rst:2201 msgid "" "This function must free the memory allocated " "by :c:member:`~PyTypeObject.tp_alloc`." msgstr "" -#: c-api/typeobj.rst:2154 +#: c-api/typeobj.rst:2206 msgid "" "Static subtypes inherit this slot, which will be :c:func:`PyObject_Free` if " "inherited from :class:`object`. Exception: If the type supports garbage " @@ -3055,18 +3061,18 @@ msgid "" "defaults to :c:func:`PyObject_GC_Del`." msgstr "" -#: c-api/typeobj.rst:2165 +#: c-api/typeobj.rst:2217 msgid "" "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:2174 +#: c-api/typeobj.rst:2228 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: c-api/typeobj.rst:2176 +#: 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 " @@ -3078,87 +3084,87 @@ msgid "" "non-collectible instance. The signature is::" msgstr "" -#: c-api/typeobj.rst:2186 +#: 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 `.)" msgstr "" -#: c-api/typeobj.rst:2196 +#: 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." msgstr "" -#: c-api/typeobj.rst:2202 +#: c-api/typeobj.rst:2258 msgid "Tuple of base types." msgstr "" -#: c-api/typeobj.rst:2228 +#: 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:2207 +#: c-api/typeobj.rst:2263 msgid "" -"For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " +"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:2214 +#: 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:2243 c-api/typeobj.rst:2277 c-api/typeobj.rst:2291 +#: 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:2225 +#: 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:2233 +#: c-api/typeobj.rst:2289 msgid "" "This field is not inherited; it is calculated fresh " "by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:2239 +#: c-api/typeobj.rst:2295 msgid "Unused. Internal use only." msgstr "" -#: c-api/typeobj.rst:2248 +#: c-api/typeobj.rst:2304 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" -#: c-api/typeobj.rst:2250 +#: c-api/typeobj.rst:2306 msgid "" "To get a list of subclasses, call the Python " "method :py:meth:`~type.__subclasses__`." msgstr "" -#: c-api/typeobj.rst:2255 +#: 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:2265 +#: 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:2270 +#: 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 " @@ -3166,23 +3172,23 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" -#: c-api/typeobj.rst:2282 +#: c-api/typeobj.rst:2340 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: c-api/typeobj.rst:2287 +#: c-api/typeobj.rst:2345 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: c-api/typeobj.rst:2296 +#: 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:2302 +#: 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 " @@ -3190,7 +3196,7 @@ msgid "" "consistent state. The finalizer is allowed to execute arbitrary Python code." msgstr "" -#: c-api/typeobj.rst:2308 +#: 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. " @@ -3198,14 +3204,14 @@ msgid "" "(:c:member:`~PyTypeObject.tp_clear`) yet." msgstr "" -#: c-api/typeobj.rst:2313 +#: 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:2319 +#: 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 " @@ -3214,7 +3220,7 @@ msgid "" "cleared referents." msgstr "" -#: c-api/typeobj.rst:2327 +#: 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 " @@ -3223,25 +3229,25 @@ msgid "" "finalized before destruction." msgstr "" -#: c-api/typeobj.rst:2335 +#: 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:2340 +#: 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:2344 +#: c-api/typeobj.rst:2404 msgid "" "When Python finalizes an object, it behaves like the following algorithm:" msgstr "" -#: c-api/typeobj.rst:2346 +#: 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., " @@ -3250,13 +3256,13 @@ msgid "" "objects; this might change in a future version." msgstr "" -#: c-api/typeobj.rst:2351 +#: 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:2354 +#: 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 " @@ -3266,7 +3272,7 @@ msgid "" "make it reachable, i.e., the object is (still) a member of a cyclic isolate." msgstr "" -#: c-api/typeobj.rst:2361 +#: c-api/typeobj.rst:2421 msgid "" "If the finalizer resurrected the object, the object's pending destruction is " "canceled and the object's *finalized* mark might be removed if present. " @@ -3274,7 +3280,7 @@ msgid "" "future version." msgstr "" -#: c-api/typeobj.rst:2366 +#: c-api/typeobj.rst:2426 msgid "" "*Automatic finalization* refers to any finalization performed by Python " "except via calls to :c:func:`PyObject_CallFinalizer` " @@ -3282,14 +3288,14 @@ msgid "" "about when, if, or how often an object is automatically finalized, except:" msgstr "" -#: c-api/typeobj.rst:2371 +#: c-api/typeobj.rst:2431 msgid "" "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:2374 +#: c-api/typeobj.rst:2434 msgid "" "Python will not automatically finalize an object if finalizing it would not " "mark the object as *finalized*. Currently, this applies to objects whose " @@ -3299,54 +3305,54 @@ msgid "" "or :c:func:`PyObject_CallFinalizerFromDealloc`." msgstr "" -#: c-api/typeobj.rst:2380 +#: 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:2382 +#: 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:2384 +#: 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:2387 +#: 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:2390 +#: 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:2394 +#: 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:2398 +#: c-api/typeobj.rst:2458 msgid "" "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:2402 +#: 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 " @@ -3358,26 +3364,26 @@ msgid "" "For example::" msgstr "" -#: c-api/typeobj.rst:2439 +#: 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:2445 +#: c-api/typeobj.rst:2505 msgid ":pep:`442`: \"Safe object finalization\"" msgstr "" -#: c-api/typeobj.rst:2448 +#: c-api/typeobj.rst:2508 msgid ":c:func:`PyObject_CallFinalizer`" msgstr "" -#: c-api/typeobj.rst:2449 +#: c-api/typeobj.rst:2509 msgid ":c:func:`PyObject_CallFinalizerFromDealloc`" msgstr "" -#: c-api/typeobj.rst:2454 +#: 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 " @@ -3385,13 +3391,13 @@ msgid "" "of *type*." msgstr "" -#: c-api/typeobj.rst:2459 +#: 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:2464 +#: 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 " @@ -3399,27 +3405,27 @@ msgid "" ">tp_call``." msgstr "" -#: c-api/typeobj.rst:2469 +#: 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:2473 +#: c-api/typeobj.rst:2535 msgid "calls ``type->tp_new``," msgstr "" -#: c-api/typeobj.rst:2475 +#: 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:2478 +#: c-api/typeobj.rst:2540 msgid "returns the result of ``tp_new``." msgstr "" -#: c-api/typeobj.rst:2480 +#: c-api/typeobj.rst:2542 msgid "" "Typically, ``tp_vectorcall`` is overridden to optimize this process for " "specific :c:member:`~PyTypeObject.tp_new` " @@ -3428,65 +3434,65 @@ msgid "" "and :py:func:`~object.__init__`, respectively)." msgstr "" -#: c-api/typeobj.rst:2491 +#: c-api/typeobj.rst:2553 msgid "This field is never inherited." msgstr "" -#: c-api/typeobj.rst:2493 +#: 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:2498 +#: c-api/typeobj.rst:2560 msgid "Internal. Do not use." msgstr "" -#: c-api/typeobj.rst:2506 +#: c-api/typeobj.rst:2568 msgid "Static Types" msgstr "" -#: c-api/typeobj.rst:2508 +#: 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`." msgstr "" -#: c-api/typeobj.rst:2512 +#: c-api/typeobj.rst:2574 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: c-api/typeobj.rst:2514 +#: 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:2516 +#: 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:2518 +#: 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:2522 +#: 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:2530 +#: c-api/typeobj.rst:2592 msgid "Heap Types" msgstr "" -#: c-api/typeobj.rst:2532 +#: 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 " @@ -3494,29 +3500,29 @@ msgid "" "the :c:macro:`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: c-api/typeobj.rst:2537 +#: 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`." msgstr "" -#: c-api/typeobj.rst:2545 +#: c-api/typeobj.rst:2607 msgid "Number Object Structures" msgstr "" -#: c-api/typeobj.rst:2552 +#: 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:2882 +#: c-api/typeobj.rst:3089 msgid "Here is the structure definition::" msgstr "" -#: c-api/typeobj.rst:2605 +#: 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 " @@ -3526,31 +3532,31 @@ msgid "" "and set an exception." msgstr "" -#: c-api/typeobj.rst:2614 +#: 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:2659 +#: c-api/typeobj.rst:2824 msgid "Mapping Object Structures" msgstr "" -#: c-api/typeobj.rst:2666 +#: 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:2671 +#: 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." msgstr "" -#: c-api/typeobj.rst:2677 +#: 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:`!" @@ -3559,7 +3565,7 @@ msgid "" "otherwise." msgstr "" -#: c-api/typeobj.rst:2685 +#: c-api/typeobj.rst:2853 msgid "" "This function is used " "by :c:func:`PyObject_SetItem`, :c:func:`PyObject_DelItem`, :c:func:`PySequence_SetSlice` " @@ -3569,17 +3575,17 @@ msgid "" "deletion." msgstr "" -#: c-api/typeobj.rst:2696 +#: c-api/typeobj.rst:2864 msgid "Sequence Object Structures" msgstr "" -#: c-api/typeobj.rst:2703 +#: 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:2708 +#: 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 " @@ -3587,21 +3593,21 @@ msgid "" "and the :c:member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: c-api/typeobj.rst:2715 +#: 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:2721 +#: 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:2727 +#: 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 " @@ -3610,7 +3616,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2733 +#: 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 " @@ -3619,7 +3625,7 @@ msgid "" "``NULL``, the index is passed as is to the function." msgstr "" -#: c-api/typeobj.rst:2740 +#: 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` " @@ -3629,14 +3635,14 @@ msgid "" "and deletion." msgstr "" -#: c-api/typeobj.rst:2749 +#: 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:2756 +#: 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 " @@ -3646,7 +3652,7 @@ msgid "" "the :c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: c-api/typeobj.rst:2765 +#: 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 " @@ -3656,70 +3662,104 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2776 +#: c-api/typeobj.rst:2957 msgid "Buffer Object Structures" msgstr "" -#: c-api/typeobj.rst:2784 +#: 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:2839 c-api/typeobj.rst:2904 c-api/typeobj.rst:2926 +#: 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:2794 +#: 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:2798 +#: 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:2801 +#: c-api/typeobj.rst:2980 msgid "Fill in the requested fields." msgstr "" -#: c-api/typeobj.rst:2803 +#: c-api/typeobj.rst:2982 msgid "Increment an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2805 -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:2807 +#: c-api/typeobj.rst:2986 msgid "Return ``0``." msgstr "" -#: c-api/typeobj.rst:2809 +#: 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:2812 +#: 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:2815 +#: 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:2819 +#: 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 " @@ -3727,7 +3767,7 @@ msgid "" "types>`." msgstr "" -#: c-api/typeobj.rst:2824 +#: 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 " @@ -3735,19 +3775,19 @@ msgid "" "and :c:member:`~Py_buffer.internal` are read-only for the consumer." msgstr "" -#: c-api/typeobj.rst:2831 +#: 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:2834 +#: 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:2843 +#: 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 " @@ -3755,15 +3795,30 @@ msgid "" "these optional steps:" msgstr "" -#: c-api/typeobj.rst:2848 +#: c-api/typeobj.rst:3047 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2850 +#: c-api/typeobj.rst:3049 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: c-api/typeobj.rst:2852 +#: 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 " @@ -3771,68 +3826,68 @@ msgid "" "*view* argument." msgstr "" -#: c-api/typeobj.rst:2858 +#: 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:2863 +#: 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:2871 +#: c-api/typeobj.rst:3080 msgid "Async Object Structures" msgstr "" -#: c-api/typeobj.rst:2879 +#: c-api/typeobj.rst:3086 msgid "" "This structure holds pointers to the functions required to " "implement :term:`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: c-api/typeobj.rst:2897 +#: 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:2900 +#: 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:2908 +#: c-api/typeobj.rst:3119 msgid "" "Must return an :term:`asynchronous iterator` object. " "See :meth:`~object.__anext__` for details." msgstr "" -#: c-api/typeobj.rst:2911 +#: 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:2920 +#: 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:2930 +#: 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:2939 +#: c-api/typeobj.rst:3154 msgid "Slot Type typedefs" msgstr "" -#: c-api/typeobj.rst:2943 +#: 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 " @@ -3847,80 +3902,80 @@ msgid "" "block should be :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:2953 +#: 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`." msgstr "" -#: c-api/typeobj.rst:2960 +#: c-api/typeobj.rst:3175 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "" -#: c-api/typeobj.rst:2964 +#: c-api/typeobj.rst:3179 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: c-api/typeobj.rst:2968 +#: c-api/typeobj.rst:3183 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:2972 +#: c-api/typeobj.rst:3187 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "" -#: c-api/typeobj.rst:2985 +#: c-api/typeobj.rst:3200 msgid "Return the value of the named attribute for the object." msgstr "" -#: c-api/typeobj.rst:2991 +#: 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:2987 +#: c-api/typeobj.rst:3202 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "" -#: c-api/typeobj.rst:2994 +#: c-api/typeobj.rst:3209 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "" -#: c-api/typeobj.rst:2998 +#: c-api/typeobj.rst:3213 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "" -#: c-api/typeobj.rst:3002 +#: c-api/typeobj.rst:3217 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "" -#: c-api/typeobj.rst:3006 +#: c-api/typeobj.rst:3221 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "" -#: c-api/typeobj.rst:3010 +#: c-api/typeobj.rst:3225 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "" -#: c-api/typeobj.rst:3014 +#: c-api/typeobj.rst:3229 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "" -#: c-api/typeobj.rst:3018 +#: c-api/typeobj.rst:3233 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "" -#: c-api/typeobj.rst:3032 +#: c-api/typeobj.rst:3247 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "" -#: c-api/typeobj.rst:3048 +#: c-api/typeobj.rst:3263 msgid "Examples" msgstr "Exemples" -#: c-api/typeobj.rst:3050 +#: 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 " @@ -3928,33 +3983,33 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: c-api/typeobj.rst:3055 +#: c-api/typeobj.rst:3270 msgid "A basic :ref:`static type `::" msgstr "" -#: c-api/typeobj.rst:3072 +#: 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:3116 +#: c-api/typeobj.rst:3331 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: c-api/typeobj.rst:3141 +#: 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::" msgstr "" -#: c-api/typeobj.rst:3160 +#: c-api/typeobj.rst:3375 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: c-api/typeobj.rst:3171 +#: 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 a378d27c3e..2b6233ada5 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: 2025-10-17 09:58+0200\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,19 +65,19 @@ msgstr "" "Voici les types d'objets Unicode utilisés pour l'implémentation Unicode en " "Python :" -#: c-api/unicode.rst:36 +#: 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:42 +#: 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:50 +#: 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 " @@ -87,38 +87,53 @@ 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:61 +#: c-api/unicode.rst:58 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." msgstr "" -#: c-api/unicode.rst:68 +#: c-api/unicode.rst:65 +msgid "" +"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 "" + +#: c-api/unicode.rst:74 +msgid "True if *o* uses the :c:struct:`PyCompactUnicodeObject` structure." +msgstr "" + +#: c-api/unicode.rst:81 +msgid "True if *o* uses the :c:struct:`PyASCIIObject` structure." +msgstr "" + +#: 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:73 +#: 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:79 +#: 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:85 +#: 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:95 +#: 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 " @@ -126,15 +141,15 @@ msgid "" "use :c:func:`PyUnicode_KIND` to select the right function." msgstr "" -#: c-api/unicode.rst:107 +#: c-api/unicode.rst:125 msgid "Return values of the :c:func:`PyUnicode_KIND` macro." msgstr "" -#: c-api/unicode.rst:111 +#: c-api/unicode.rst:129 msgid "``PyUnicode_WCHAR_KIND`` has been removed." msgstr "" -#: c-api/unicode.rst:117 +#: 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. " @@ -142,18 +157,18 @@ msgid "" "(not checked)." msgstr "" -#: c-api/unicode.rst:126 +#: 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:135 +#: 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:137 +#: c-api/unicode.rst:155 msgid "" "The *kind* value and *data* pointer must have been obtained from a string " "using :c:func:`PyUnicode_KIND` and :c:func:`PyUnicode_DATA` respectively. " @@ -162,194 +177,230 @@ msgid "" "apply." msgstr "" -#: c-api/unicode.rst:143 +#: c-api/unicode.rst:161 msgid "" "The function performs no checks for any of its requirements, and is intended " "for usage in loops." msgstr "" -#: c-api/unicode.rst:152 +#: 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:160 +#: 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." msgstr "" -#: c-api/unicode.rst:169 +#: 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:178 +#: 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:181 +#: 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:188 +#: 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:195 +#: 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:197 +#: 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:204 +#: c-api/unicode.rst:238 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a whitespace character." msgstr "" -#: c-api/unicode.rst:209 +#: c-api/unicode.rst:243 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a lowercase character." msgstr "" -#: c-api/unicode.rst:214 +#: c-api/unicode.rst:248 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an uppercase character." msgstr "" -#: c-api/unicode.rst:219 +#: c-api/unicode.rst:253 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a titlecase character." msgstr "" -#: c-api/unicode.rst:224 +#: c-api/unicode.rst:258 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a linebreak character." msgstr "" -#: c-api/unicode.rst:229 +#: c-api/unicode.rst:263 msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character." msgstr "" -#: c-api/unicode.rst:234 +#: c-api/unicode.rst:268 msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character." msgstr "" -#: c-api/unicode.rst:239 +#: c-api/unicode.rst:273 msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character." msgstr "" -#: c-api/unicode.rst:244 +#: c-api/unicode.rst:278 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character." msgstr "" -#: c-api/unicode.rst:249 +#: c-api/unicode.rst:283 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character." msgstr "" -#: c-api/unicode.rst:254 +#: c-api/unicode.rst:288 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a printable character, in " "the sense of :meth:`str.isprintable`." msgstr "" -#: c-api/unicode.rst:258 +#: c-api/unicode.rst:292 msgid "These APIs can be used for fast direct character conversions:" msgstr "" -#: c-api/unicode.rst:263 +#: c-api/unicode.rst:297 msgid "Return the character *ch* converted to lower case." msgstr "" -#: c-api/unicode.rst:268 +#: c-api/unicode.rst:302 msgid "Return the character *ch* converted to upper case." msgstr "" -#: c-api/unicode.rst:273 +#: c-api/unicode.rst:307 msgid "Return the character *ch* converted to title case." msgstr "" -#: c-api/unicode.rst:278 +#: 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:284 +#: 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:290 +#: 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:294 +#: c-api/unicode.rst:328 msgid "These APIs can be used to work with surrogates:" msgstr "" -#: c-api/unicode.rst:298 +#: c-api/unicode.rst:332 msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)." msgstr "" -#: c-api/unicode.rst:302 +#: c-api/unicode.rst:336 msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)." msgstr "" -#: c-api/unicode.rst:306 +#: c-api/unicode.rst:340 msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)." msgstr "" -#: c-api/unicode.rst:310 +#: 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:317 +#: c-api/unicode.rst:361 msgid "Creating and accessing Unicode strings" msgstr "" -#: c-api/unicode.rst:319 +#: c-api/unicode.rst:363 msgid "" "To create Unicode objects and access their basic sequence properties, use " "these APIs:" msgstr "" -#: c-api/unicode.rst:324 +#: 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:328 +#: c-api/unicode.rst:372 msgid "On error, set an exception and return ``NULL``." msgstr "" -#: c-api/unicode.rst:330 +#: c-api/unicode.rst:374 msgid "" "After creation, the string can be filled " "by :c:func:`PyUnicode_WriteChar`, :c:func:`PyUnicode_CopyCharacters`, :c:func:`PyUnicode_Fill`, :c:func:`PyUnicode_WRITE` " @@ -358,38 +409,38 @@ msgid "" "filled with its final contents, a string:" msgstr "" -#: c-api/unicode.rst:337 +#: c-api/unicode.rst:381 msgid "must not be hashed," msgstr "" -#: c-api/unicode.rst:338 +#: c-api/unicode.rst:382 msgid "" "must not be :c:func:`converted to UTF-8 `, or " "another non-\"canonical\" representation," msgstr "" -#: c-api/unicode.rst:340 +#: c-api/unicode.rst:384 msgid "must not have its reference count changed," msgstr "" -#: c-api/unicode.rst:341 +#: c-api/unicode.rst:385 msgid "must not be shared with code that might do one of the above." msgstr "" -#: c-api/unicode.rst:343 +#: 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:346 +#: 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:357 +#: 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 " @@ -397,7 +448,7 @@ msgid "" "units of 1, 2 or 4 bytes per character, as given by the kind." msgstr "" -#: c-api/unicode.rst:362 +#: 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 " @@ -406,7 +457,7 @@ msgid "" "(:c:macro:`PyUnicode_1BYTE_KIND`)." msgstr "" -#: c-api/unicode.rst:373 +#: 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 " @@ -414,29 +465,29 @@ msgid "" "data is not allowed." msgstr "" -#: c-api/unicode.rst:379 +#: c-api/unicode.rst:423 msgid "This function raises :exc:`SystemError` when:" msgstr "" -#: c-api/unicode.rst:381 +#: c-api/unicode.rst:425 msgid "*size* < 0," msgstr "" -#: c-api/unicode.rst:382 +#: c-api/unicode.rst:426 msgid "*str* is ``NULL`` and *size* > 0" msgstr "" -#: c-api/unicode.rst:384 +#: c-api/unicode.rst:428 msgid "*str* == ``NULL`` with *size* > 0 is not allowed anymore." msgstr "" -#: c-api/unicode.rst:390 +#: 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:396 +#: 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 " @@ -445,7 +496,7 @@ msgid "" "*format* ASCII-encoded string." msgstr "" -#: c-api/unicode.rst:402 +#: 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:" @@ -453,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:405 +#: 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:407 +#: c-api/unicode.rst:451 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." @@ -465,7 +516,7 @@ msgstr "" "des indications de conversion, facultatives, qui affectent le résultat de " "certains types de conversion ;" -#: c-api/unicode.rst:410 +#: 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 " @@ -473,7 +524,7 @@ msgid "" "width and optional precision." msgstr "" -#: c-api/unicode.rst:415 +#: 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 " @@ -481,317 +532,317 @@ msgid "" "comes after the precision." msgstr "" -#: c-api/unicode.rst:420 +#: c-api/unicode.rst:464 msgid "Length modifier (optional)." msgstr "modificateur de longueur (facultatif) ;" -#: c-api/unicode.rst:422 +#: c-api/unicode.rst:466 msgid "Conversion type." msgstr "type de conversion." -#: c-api/unicode.rst:424 +#: c-api/unicode.rst:468 msgid "The conversion flag characters are:" msgstr "Les caractères indicateurs de conversion sont :" -#: c-api/unicode.rst:429 +#: c-api/unicode.rst:473 msgid "Flag" msgstr "Option" -#: c-api/unicode.rst:429 +#: c-api/unicode.rst:473 msgid "Meaning" msgstr "Signification" -#: c-api/unicode.rst:431 +#: c-api/unicode.rst:475 msgid "``0``" msgstr "``0``" -#: c-api/unicode.rst:431 +#: 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:433 +#: c-api/unicode.rst:477 msgid "``-``" msgstr "" -#: c-api/unicode.rst:433 +#: 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:437 +#: 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:444 +#: c-api/unicode.rst:488 msgid "Modifier" msgstr "" -#: c-api/unicode.rst:444 +#: c-api/unicode.rst:488 #, fuzzy msgid "Types" msgstr "Type" -#: c-api/unicode.rst:446 +#: c-api/unicode.rst:490 msgid "``l``" msgstr "``l``" -#: c-api/unicode.rst:446 +#: c-api/unicode.rst:490 msgid ":c:expr:`long` or :c:expr:`unsigned long`" msgstr "" -#: c-api/unicode.rst:448 +#: c-api/unicode.rst:492 msgid "``ll``" msgstr "" -#: c-api/unicode.rst:448 +#: c-api/unicode.rst:492 msgid ":c:expr:`long long` or :c:expr:`unsigned long long`" msgstr "" -#: c-api/unicode.rst:450 +#: c-api/unicode.rst:494 msgid "``j``" msgstr "" -#: c-api/unicode.rst:450 +#: c-api/unicode.rst:494 msgid ":c:type:`intmax_t` or :c:type:`uintmax_t`" msgstr "" -#: c-api/unicode.rst:452 +#: c-api/unicode.rst:496 msgid "``z``" msgstr "" -#: c-api/unicode.rst:452 +#: c-api/unicode.rst:496 msgid ":c:type:`size_t` or :c:type:`ssize_t`" msgstr "" -#: c-api/unicode.rst:454 +#: c-api/unicode.rst:498 msgid "``t``" msgstr "" -#: c-api/unicode.rst:454 +#: c-api/unicode.rst:498 msgid ":c:type:`ptrdiff_t`" msgstr "" -#: c-api/unicode.rst:457 +#: 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:460 +#: c-api/unicode.rst:504 msgid "The conversion specifiers are:" msgstr "" -#: c-api/unicode.rst:466 +#: c-api/unicode.rst:510 msgid "Conversion Specifier" msgstr "" -#: c-api/unicode.rst:467 +#: c-api/unicode.rst:511 msgid "Type" msgstr "Type" -#: c-api/unicode.rst:468 +#: c-api/unicode.rst:512 #, fuzzy msgid "Comment" msgstr "Commentaires" -#: c-api/unicode.rst:470 +#: c-api/unicode.rst:514 msgid "``%``" msgstr "" -#: c-api/unicode.rst:471 +#: c-api/unicode.rst:515 msgid "*n/a*" msgstr "" -#: c-api/unicode.rst:472 +#: c-api/unicode.rst:516 msgid "The literal ``%`` character." msgstr "" -#: c-api/unicode.rst:474 +#: c-api/unicode.rst:518 msgid "``d``, ``i``" msgstr "" -#: c-api/unicode.rst:479 c-api/unicode.rst:487 c-api/unicode.rst:491 +#: 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:476 +#: c-api/unicode.rst:520 msgid "The decimal representation of a signed C integer." msgstr "" -#: c-api/unicode.rst:478 +#: c-api/unicode.rst:522 msgid "``u``" msgstr "" -#: c-api/unicode.rst:480 +#: c-api/unicode.rst:524 msgid "The decimal representation of an unsigned C integer." msgstr "" -#: c-api/unicode.rst:482 +#: c-api/unicode.rst:526 msgid "``o``" msgstr "" -#: c-api/unicode.rst:484 +#: c-api/unicode.rst:528 msgid "The octal representation of an unsigned C integer." msgstr "" -#: c-api/unicode.rst:486 +#: c-api/unicode.rst:530 msgid "``x``" msgstr "``x``" -#: c-api/unicode.rst:488 +#: c-api/unicode.rst:532 msgid "The hexadecimal representation of an unsigned C integer (lowercase)." msgstr "" -#: c-api/unicode.rst:490 +#: c-api/unicode.rst:534 msgid "``X``" msgstr "" -#: c-api/unicode.rst:492 +#: c-api/unicode.rst:536 msgid "The hexadecimal representation of an unsigned C integer (uppercase)." msgstr "" -#: c-api/unicode.rst:494 +#: c-api/unicode.rst:538 msgid "``c``" msgstr "``c``" -#: c-api/unicode.rst:495 +#: c-api/unicode.rst:539 msgid ":c:expr:`int`" msgstr "" -#: c-api/unicode.rst:496 +#: c-api/unicode.rst:540 msgid "A single character." msgstr "" -#: c-api/unicode.rst:498 +#: c-api/unicode.rst:542 msgid "``s``" msgstr "``s``" -#: c-api/unicode.rst:499 +#: c-api/unicode.rst:543 msgid ":c:expr:`const char*` or :c:expr:`const wchar_t*`" msgstr "" -#: c-api/unicode.rst:500 +#: c-api/unicode.rst:544 msgid "A null-terminated C character array." msgstr "" -#: c-api/unicode.rst:502 +#: c-api/unicode.rst:546 msgid "``p``" msgstr "``p``" -#: c-api/unicode.rst:503 +#: c-api/unicode.rst:547 msgid ":c:expr:`const void*`" msgstr "" -#: c-api/unicode.rst:504 +#: 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:509 +#: c-api/unicode.rst:553 msgid "``A``" msgstr "" -#: c-api/unicode.rst:514 c-api/unicode.rst:528 c-api/unicode.rst:537 +#: 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:511 +#: c-api/unicode.rst:555 msgid "The result of calling :func:`ascii`." msgstr "" -#: c-api/unicode.rst:513 +#: c-api/unicode.rst:557 msgid "``U``" msgstr "" -#: c-api/unicode.rst:515 +#: c-api/unicode.rst:559 #, fuzzy msgid "A Unicode object." msgstr "Un objet Unicode." -#: c-api/unicode.rst:517 +#: c-api/unicode.rst:561 msgid "``V``" msgstr "" -#: c-api/unicode.rst:518 +#: c-api/unicode.rst:562 msgid ":c:expr:`PyObject*`, :c:expr:`const char*` or :c:expr:`const wchar_t*`" msgstr "" -#: c-api/unicode.rst:519 +#: 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:523 +#: c-api/unicode.rst:567 msgid "``S``" msgstr "" -#: c-api/unicode.rst:525 +#: c-api/unicode.rst:569 msgid "The result of calling :c:func:`PyObject_Str`." msgstr "" -#: c-api/unicode.rst:527 +#: c-api/unicode.rst:571 msgid "``R``" msgstr "" -#: c-api/unicode.rst:529 +#: c-api/unicode.rst:573 msgid "The result of calling :c:func:`PyObject_Repr`." msgstr "" -#: c-api/unicode.rst:531 +#: c-api/unicode.rst:575 msgid "``T``" msgstr "" -#: c-api/unicode.rst:533 +#: c-api/unicode.rst:577 msgid "" "Get the fully qualified name of an object type; " "call :c:func:`PyType_GetFullyQualifiedName`." msgstr "" -#: c-api/unicode.rst:536 +#: c-api/unicode.rst:580 msgid "``#T``" msgstr "" -#: c-api/unicode.rst:538 +#: 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:541 +#: c-api/unicode.rst:585 msgid "``N``" msgstr "``N``" -#: c-api/unicode.rst:547 +#: c-api/unicode.rst:591 #, fuzzy msgid ":c:expr:`PyTypeObject*`" msgstr "PyObject\\*" -#: c-api/unicode.rst:543 +#: c-api/unicode.rst:587 msgid "" "Get the fully qualified name of a type; " "call :c:func:`PyType_GetFullyQualifiedName`." msgstr "" -#: c-api/unicode.rst:546 +#: c-api/unicode.rst:590 msgid "``#N``" msgstr "" -#: c-api/unicode.rst:548 +#: 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:552 +#: 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 " @@ -801,28 +852,28 @@ msgid "" "``PyObject*`` argument is not ``NULL``)." msgstr "" -#: c-api/unicode.rst:560 +#: 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:564 +#: c-api/unicode.rst:608 msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added." msgstr "" -#: c-api/unicode.rst:567 +#: c-api/unicode.rst:611 msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added." msgstr "" -#: c-api/unicode.rst:570 +#: c-api/unicode.rst:614 msgid "" "Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, " "``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." msgstr "" -#: c-api/unicode.rst:574 +#: 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 " @@ -831,50 +882,50 @@ msgid "" "flag ``-``." msgstr "" -#: c-api/unicode.rst:582 +#: 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:586 +#: c-api/unicode.rst:630 msgid "Support for ``%T``, ``%#T``, ``%N`` and ``%#N`` formats added." msgstr "" -#: c-api/unicode.rst:592 +#: c-api/unicode.rst:636 msgid "" "Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two " "arguments." msgstr "" -#: c-api/unicode.rst:598 +#: 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:602 +#: c-api/unicode.rst:646 msgid "" "Objects other than Unicode or its subtypes will cause a :exc:`TypeError`." msgstr "" -#: c-api/unicode.rst:607 +#: c-api/unicode.rst:651 msgid "Create a Unicode Object from the given Unicode code point *ordinal*." msgstr "" -#: c-api/unicode.rst:609 +#: 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:616 +#: c-api/unicode.rst:660 msgid "Decode an encoded object *obj* to a Unicode object." msgstr "" -#: c-api/unicode.rst:618 +#: 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 " @@ -882,40 +933,40 @@ msgid "" "interface use the default values (see :ref:`builtincodecs` for details)." msgstr "" -#: c-api/unicode.rst:624 +#: c-api/unicode.rst:668 msgid "" "All other objects, including Unicode objects, cause a :exc:`TypeError` to be " "set." msgstr "" -#: c-api/unicode.rst:627 +#: 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:633 +#: 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:637 +#: c-api/unicode.rst:681 msgid "On error, set *\\*p_left* to ``NULL`` and set an exception." msgstr "" -#: c-api/unicode.rst:639 +#: c-api/unicode.rst:683 msgid "On success, set *\\*p_left* to a new strong reference to the result." msgstr "" -#: c-api/unicode.rst:644 +#: 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:650 +#: 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 " @@ -924,27 +975,27 @@ msgid "" "return ``NULL`` on invalid input." msgstr "" -#: c-api/unicode.rst:661 +#: 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:664 +#: 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:670 +#: c-api/unicode.rst:714 msgid "Return the length of the Unicode object, in code points." msgstr "" -#: c-api/unicode.rst:672 +#: c-api/unicode.rst:716 msgid "On error, set an exception and return ``-1``." msgstr "" -#: c-api/unicode.rst:683 +#: 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:`!" @@ -952,61 +1003,61 @@ msgid "" "otherwise returns the number of copied characters." msgstr "" -#: c-api/unicode.rst:718 c-api/unicode.rst:738 +#: 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:696 +#: c-api/unicode.rst:740 msgid "" "Resize a Unicode object *\\*unicode* to the new *length* in code points." msgstr "" -#: c-api/unicode.rst:698 +#: 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:701 +#: c-api/unicode.rst:745 msgid "" "*\\*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:705 +#: 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:712 +#: 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:715 +#: 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:721 +#: 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:730 +#: c-api/unicode.rst:774 msgid "" "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:733 +#: 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's reference count is one. " @@ -1014,25 +1065,25 @@ msgid "" "them your responsibility." msgstr "" -#: c-api/unicode.rst:746 +#: 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." msgstr "" -#: c-api/unicode.rst:750 +#: c-api/unicode.rst:794 msgid "Return character on success, ``-1`` on error with an exception set." msgstr "" -#: c-api/unicode.rst:758 +#: 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:768 +#: 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 " @@ -1040,7 +1091,7 @@ msgid "" "*unicode*). *buffer* is returned on success." msgstr "" -#: c-api/unicode.rst:778 +#: 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 " @@ -1048,17 +1099,17 @@ msgid "" "point appended." msgstr "" -#: c-api/unicode.rst:787 +#: c-api/unicode.rst:831 msgid "Locale Encoding" msgstr "" -#: c-api/unicode.rst:789 +#: 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:796 +#: 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 " @@ -1067,21 +1118,21 @@ msgid "" "null character but cannot contain embedded null characters." msgstr "" -#: c-api/unicode.rst:803 +#: c-api/unicode.rst:847 msgid "" "Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from " "the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/unicode.rst:841 +#: c-api/unicode.rst:885 msgid "This function ignores the :ref:`Python UTF-8 Mode `." msgstr "" -#: c-api/unicode.rst:926 +#: c-api/unicode.rst:970 msgid "The :c:func:`Py_DecodeLocale` function." msgstr "" -#: c-api/unicode.rst:814 +#: c-api/unicode.rst:858 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. " @@ -1089,13 +1140,13 @@ msgid "" "and the current locale encoding was used for ``strict``." msgstr "" -#: c-api/unicode.rst:823 +#: 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:831 +#: 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 " @@ -1104,17 +1155,17 @@ msgid "" "a :class:`bytes` object. *unicode* cannot contain embedded null characters." msgstr "" -#: c-api/unicode.rst:838 +#: c-api/unicode.rst:882 msgid "" "Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to " "the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/unicode.rst:957 +#: c-api/unicode.rst:1001 msgid "The :c:func:`Py_EncodeLocale` function." msgstr "" -#: c-api/unicode.rst:849 +#: c-api/unicode.rst:893 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. " @@ -1122,24 +1173,24 @@ msgid "" "and the current locale encoding was used for ``strict``." msgstr "" -#: c-api/unicode.rst:858 +#: c-api/unicode.rst:902 msgid "File System Encoding" msgstr "" -#: c-api/unicode.rst:860 +#: 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:863 +#: 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:" msgstr "" -#: c-api/unicode.rst:869 +#: c-api/unicode.rst:913 msgid "" ":ref:`PyArg_Parse\\* converter `: encode :class:`str` objects " "-- obtained directly or through the :class:`os.PathLike` interface -- " @@ -1152,24 +1203,24 @@ msgid "" "not allowed in the result. On failure, return ``0`` with an exception set." msgstr "" -#: c-api/unicode.rst:881 +#: c-api/unicode.rst:925 msgid "" "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:913 +#: c-api/unicode.rst:957 msgid "Accepts a :term:`path-like object`." msgstr "Accepte un :term:`path-like object`." -#: c-api/unicode.rst:889 +#: 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 " "conversion function:" msgstr "" -#: c-api/unicode.rst:895 +#: c-api/unicode.rst:939 msgid "" ":ref:`PyArg_Parse\\* converter `: decode :class:`bytes` objects " "-- obtained either directly or indirectly through the :class:`os.PathLike` " @@ -1184,62 +1235,62 @@ msgid "" "exception set." msgstr "" -#: c-api/unicode.rst:908 +#: 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:919 +#: c-api/unicode.rst:963 msgid "Decode a string from the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/unicode.rst:921 +#: c-api/unicode.rst:965 msgid "" "If you need to decode a string from the current locale encoding, " "use :c:func:`PyUnicode_DecodeLocaleAndSize`." msgstr "" -#: c-api/unicode.rst:941 c-api/unicode.rst:961 +#: c-api/unicode.rst:985 c-api/unicode.rst:1005 msgid "" "The :term:`filesystem error handler ` " "is now used." msgstr "" -#: c-api/unicode.rst:935 +#: c-api/unicode.rst:979 msgid "" "Decode a null-terminated string from the :term:`filesystem encoding and " "error handler`." msgstr "" -#: c-api/unicode.rst:938 +#: c-api/unicode.rst:982 msgid "" "If the string length is known, " "use :c:func:`PyUnicode_DecodeFSDefaultAndSize`." msgstr "" -#: c-api/unicode.rst:948 +#: 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:952 +#: c-api/unicode.rst:996 msgid "" "If you need to encode a string to the current locale encoding, " "use :c:func:`PyUnicode_EncodeLocale`." msgstr "" -#: c-api/unicode.rst:966 +#: c-api/unicode.rst:1010 msgid "wchar_t Support" msgstr "" -#: c-api/unicode.rst:968 +#: c-api/unicode.rst:1012 msgid ":c:type:`wchar_t` support for platforms which support it:" msgstr "" -#: c-api/unicode.rst:972 +#: 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 " @@ -1247,7 +1298,7 @@ msgid "" "failure." msgstr "" -#: c-api/unicode.rst:980 +#: 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 " @@ -1255,13 +1306,13 @@ msgid "" "of :c:type:`wchar_t` characters copied or ``-1`` in case of an error." msgstr "" -#: c-api/unicode.rst:985 +#: 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:988 +#: 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 " @@ -1271,7 +1322,7 @@ msgid "" "most C functions." msgstr "" -#: c-api/unicode.rst:998 +#: 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 " @@ -1283,37 +1334,37 @@ msgid "" "is raised." msgstr "" -#: c-api/unicode.rst:1006 +#: 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:1013 +#: 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:1021 +#: c-api/unicode.rst:1065 msgid "Built-in Codecs" msgstr "" -#: c-api/unicode.rst:1023 +#: 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:1026 +#: 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:1030 +#: 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 " @@ -1321,42 +1372,42 @@ msgid "" "handler` internally." msgstr "" -#: c-api/unicode.rst:1035 +#: 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:1039 +#: 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:1044 +#: c-api/unicode.rst:1088 msgid "Generic Codecs" msgstr "" -#: c-api/unicode.rst:1046 +#: c-api/unicode.rst:1090 msgid "The following macro is provided:" msgstr "" -#: c-api/unicode.rst:1051 +#: c-api/unicode.rst:1095 msgid "The Unicode code point ``U+FFFD`` (replacement character)." msgstr "" -#: c-api/unicode.rst:1053 +#: 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:1057 +#: c-api/unicode.rst:1101 msgid "These are the generic codec APIs:" msgstr "" -#: c-api/unicode.rst:1063 +#: 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 " @@ -1365,7 +1416,7 @@ msgid "" "was raised by the codec." msgstr "" -#: c-api/unicode.rst:1073 +#: 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 " @@ -1374,21 +1425,21 @@ msgid "" "was raised by the codec." msgstr "" -#: c-api/unicode.rst:1081 +#: c-api/unicode.rst:1125 msgid "UTF-8 Codecs" msgstr "" -#: c-api/unicode.rst:1083 +#: c-api/unicode.rst:1127 msgid "These are the UTF-8 codec APIs:" msgstr "" -#: c-api/unicode.rst:1088 +#: 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:1095 +#: 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 " @@ -1396,20 +1447,20 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1103 +#: 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:1122 +#: 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:1113 +#: 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* " @@ -1418,13 +1469,13 @@ msgid "" "regardless of whether there are any other null code points." msgstr "" -#: c-api/unicode.rst:1119 +#: 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:1125 +#: 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 " @@ -1433,19 +1484,19 @@ msgid "" "collected." msgstr "" -#: c-api/unicode.rst:1154 -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:1135 +#: c-api/unicode.rst:1179 msgid "This function is a part of the :ref:`limited API `." msgstr "" -#: c-api/unicode.rst:1141 +#: c-api/unicode.rst:1185 msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." msgstr "" -#: c-api/unicode.rst:1145 +#: c-api/unicode.rst:1189 msgid "" "This function does not have any special behavior for `null characters " "`_ embedded within *unicode*. " @@ -1455,28 +1506,28 @@ msgid "" "use :c:func:`PyUnicode_AsUTF8AndSize` instead." msgstr "" -#: c-api/unicode.rst:1159 +#: c-api/unicode.rst:1203 msgid "UTF-32 Codecs" msgstr "" -#: c-api/unicode.rst:1161 +#: c-api/unicode.rst:1205 msgid "These are the UTF-32 codec APIs:" msgstr "" -#: c-api/unicode.rst:1167 +#: 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:1221 +#: 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:1178 +#: 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 " @@ -1484,21 +1535,21 @@ msgid "" "``-1`` or ``1``, any byte order mark is copied to the output." msgstr "" -#: c-api/unicode.rst:1183 +#: 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:1237 +#: c-api/unicode.rst:1281 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" -#: c-api/unicode.rst:1239 +#: c-api/unicode.rst:1283 msgid "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1194 +#: 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 " @@ -1507,29 +1558,29 @@ msgid "" "number of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1203 +#: 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:1209 +#: c-api/unicode.rst:1253 msgid "UTF-16 Codecs" msgstr "" -#: c-api/unicode.rst:1211 +#: c-api/unicode.rst:1255 msgid "These are the UTF-16 codec APIs:" msgstr "" -#: c-api/unicode.rst:1217 +#: 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:1228 +#: 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 " @@ -1538,13 +1589,13 @@ msgid "" "result in either a ``\\ufeff`` or a ``\\ufffe`` character)." msgstr "" -#: c-api/unicode.rst:1234 +#: 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:1245 +#: 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 " @@ -1554,28 +1605,28 @@ msgid "" "*consumed*." msgstr "" -#: c-api/unicode.rst:1254 +#: 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:1260 +#: c-api/unicode.rst:1304 msgid "UTF-7 Codecs" msgstr "" -#: c-api/unicode.rst:1262 +#: c-api/unicode.rst:1306 msgid "These are the UTF-7 codec APIs:" msgstr "" -#: c-api/unicode.rst:1267 +#: 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:1274 +#: 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 " @@ -1583,101 +1634,101 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1281 +#: c-api/unicode.rst:1325 msgid "Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1283 +#: c-api/unicode.rst:1327 msgid "These are the \"Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1289 +#: 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:1295 +#: 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:1301 +#: c-api/unicode.rst:1345 msgid "Raw-Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1303 +#: c-api/unicode.rst:1347 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1309 +#: 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:1315 +#: 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:1321 +#: c-api/unicode.rst:1365 msgid "Latin-1 Codecs" msgstr "" -#: c-api/unicode.rst:1323 +#: 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:1329 +#: 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:1335 +#: 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:1341 +#: c-api/unicode.rst:1385 msgid "ASCII Codecs" msgstr "" -#: c-api/unicode.rst:1343 +#: 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:1349 +#: 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:1355 +#: 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:1361 +#: c-api/unicode.rst:1405 msgid "Character Map Codecs" msgstr "" -#: c-api/unicode.rst:1363 +#: 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 " @@ -1687,18 +1738,18 @@ msgid "" "sequences work well." msgstr "" -#: c-api/unicode.rst:1369 +#: c-api/unicode.rst:1413 msgid "These are the mapping codec APIs:" msgstr "" -#: c-api/unicode.rst:1374 +#: 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:1378 +#: 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 " @@ -1708,14 +1759,14 @@ msgid "" "treated as undefined mappings and cause an error." msgstr "" -#: c-api/unicode.rst:1389 +#: 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:1393 +#: 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 " @@ -1723,41 +1774,41 @@ msgid "" "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" -#: c-api/unicode.rst:1399 +#: c-api/unicode.rst:1443 msgid "The following codec API is special in that maps Unicode to Unicode." msgstr "" -#: c-api/unicode.rst:1403 +#: 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:1407 +#: 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:1410 +#: 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:1414 +#: 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:1419 +#: c-api/unicode.rst:1463 msgid "MBCS codecs for Windows" msgstr "" -#: c-api/unicode.rst:1421 +#: 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 " @@ -1765,13 +1816,13 @@ msgid "" "is defined by the user settings on the machine running the codec." msgstr "" -#: c-api/unicode.rst:1428 +#: 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:1435 +#: 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 " @@ -1779,46 +1830,46 @@ msgid "" "will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1444 +#: 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:1450 +#: 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:1457 +#: 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:1467 +#: c-api/unicode.rst:1511 msgid "Methods and Slot Functions" msgstr "" -#: c-api/unicode.rst:1469 +#: 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:1473 +#: c-api/unicode.rst:1517 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" -#: c-api/unicode.rst:1478 +#: c-api/unicode.rst:1522 msgid "Concat two strings giving a new Unicode string." msgstr "" -#: c-api/unicode.rst:1483 +#: 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 " @@ -1827,32 +1878,32 @@ msgid "" "list." msgstr "" -#: c-api/unicode.rst:1498 c-api/unicode.rst:1532 +#: c-api/unicode.rst:1542 c-api/unicode.rst:1576 msgid "On error, return ``NULL`` with an exception set." msgstr "" -#: c-api/unicode.rst:1490 +#: c-api/unicode.rst:1534 msgid "Equivalent to :py:meth:`str.split`." msgstr "" -#: c-api/unicode.rst:1495 +#: 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:1500 +#: c-api/unicode.rst:1544 msgid "Equivalent to :py:meth:`str.rsplit`." msgstr "" -#: c-api/unicode.rst:1505 +#: 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:1512 +#: 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 " @@ -1860,39 +1911,39 @@ msgid "" "tuple containing the string itself, followed by two empty strings." msgstr "" -#: c-api/unicode.rst:1530 +#: c-api/unicode.rst:1574 msgid "*sep* must not be empty." msgstr "" -#: c-api/unicode.rst:1521 +#: c-api/unicode.rst:1565 msgid "Equivalent to :py:meth:`str.partition`." msgstr "" -#: c-api/unicode.rst:1526 +#: 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:1534 +#: c-api/unicode.rst:1578 msgid "Equivalent to :py:meth:`str.rpartition`." msgstr "" -#: c-api/unicode.rst:1539 +#: 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:1546 +#: 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:1554 +#: 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, " @@ -1901,7 +1952,7 @@ msgid "" "``-2`` indicates that an error occurred and an exception has been set." msgstr "" -#: c-api/unicode.rst:1564 +#: 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 " @@ -1911,73 +1962,73 @@ msgid "" "set." msgstr "" -#: c-api/unicode.rst:1572 +#: c-api/unicode.rst:1616 msgid "" "*start* and *end* are now adjusted to behave like ``unicode[start:end]``." msgstr "" -#: c-api/unicode.rst:1579 +#: 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:1586 +#: 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:1593 +#: 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:1596 +#: c-api/unicode.rst:1640 msgid "" "This function returns ``-1`` upon failure, so one should " "call :c:func:`PyErr_Occurred` to check for errors." msgstr "" -#: c-api/unicode.rst:1601 +#: c-api/unicode.rst:1645 msgid "The :c:func:`PyUnicode_Equal` function." msgstr "" -#: c-api/unicode.rst:1606 +#: c-api/unicode.rst:1650 msgid "Test if two strings are equal:" msgstr "" -#: c-api/unicode.rst:1608 +#: c-api/unicode.rst:1652 msgid "Return ``1`` if *a* is equal to *b*." msgstr "" -#: c-api/unicode.rst:1609 +#: c-api/unicode.rst:1653 msgid "Return ``0`` if *a* is not equal to *b*." msgstr "" -#: c-api/unicode.rst:1610 +#: 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:1613 +#: c-api/unicode.rst:1657 msgid "The function always succeeds if *a* and *b* are :class:`str` objects." msgstr "" -#: c-api/unicode.rst:1615 +#: 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:1620 +#: c-api/unicode.rst:1664 msgid "The :c:func:`PyUnicode_Compare` function." msgstr "" -#: c-api/unicode.rst:1627 +#: 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 " @@ -1986,18 +2037,18 @@ msgid "" "is returned." msgstr "" -#: c-api/unicode.rst:1655 +#: c-api/unicode.rst:1699 msgid "This function does not raise exceptions." msgstr "" -#: c-api/unicode.rst:1641 +#: 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:1650 +#: 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 " @@ -2005,48 +2056,48 @@ msgid "" "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" -#: c-api/unicode.rst:1660 +#: c-api/unicode.rst:1704 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" -#: c-api/unicode.rst:1662 +#: c-api/unicode.rst:1706 msgid "``NULL`` in case an exception was raised" msgstr "" -#: c-api/unicode.rst:1663 +#: c-api/unicode.rst:1707 msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons" msgstr "" -#: c-api/unicode.rst:1664 +#: c-api/unicode.rst:1708 msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown" msgstr "" -#: c-api/unicode.rst:1666 +#: 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`." msgstr "" -#: c-api/unicode.rst:1672 +#: 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:1678 +#: c-api/unicode.rst:1722 msgid "" "Check whether *substr* is contained in *unicode* and return true or false " "accordingly." msgstr "" -#: c-api/unicode.rst:1681 +#: 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:1687 +#: 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. " @@ -2057,7 +2108,7 @@ msgid "" "leaves :c:expr:`*p_unicode` alone and interns it." msgstr "" -#: c-api/unicode.rst:1694 +#: 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; " @@ -2065,40 +2116,40 @@ msgid "" "the result.)" msgstr "" -#: c-api/unicode.rst:1699 +#: 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:1702 +#: 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." msgstr "" -#: c-api/unicode.rst:1706 +#: 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:1712 +#: c-api/unicode.rst:1756 msgid "" "A combination of :c:func:`PyUnicode_FromString` " "and :c:func:`PyUnicode_InternInPlace`, meant for statically allocated " "strings." msgstr "" -#: c-api/unicode.rst:1715 +#: 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:1719 +#: 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 " @@ -2107,14 +2158,14 @@ msgid "" "and :c:func:`PyUnicode_InternInPlace` directly." msgstr "" -#: c-api/unicode.rst:1728 +#: 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:1734 +#: 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 " @@ -2122,176 +2173,191 @@ msgid "" "versions." msgstr "" -#: c-api/unicode.rst:1741 +#: c-api/unicode.rst:1785 msgid "PyUnicodeWriter" msgstr "" -#: c-api/unicode.rst:1743 +#: 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:1750 +#: c-api/unicode.rst:1794 #, fuzzy msgid "A Unicode writer instance." msgstr "Un objet Unicode." -#: c-api/unicode.rst:1752 +#: 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:1757 +#: c-api/unicode.rst:1801 msgid "Create a Unicode writer instance." msgstr "" -#: c-api/unicode.rst:1759 +#: c-api/unicode.rst:1803 msgid "*length* must be greater than or equal to ``0``." msgstr "" -#: c-api/unicode.rst:1761 +#: c-api/unicode.rst:1805 msgid "" "If *length* is greater than ``0``, preallocate an internal buffer of " "*length* characters." msgstr "" -#: c-api/unicode.rst:1770 +#: c-api/unicode.rst:1814 msgid "Set an exception and return ``NULL`` on error." msgstr "" -#: c-api/unicode.rst:1768 +#: c-api/unicode.rst:1812 msgid "" "Return the final Python :class:`str` object and destroy the writer instance." msgstr "" -#: c-api/unicode.rst:1780 +#: c-api/unicode.rst:1824 msgid "The writer instance is invalid after this call." msgstr "" -#: c-api/unicode.rst:1776 +#: c-api/unicode.rst:1820 msgid "Discard the internal Unicode buffer and destroy the writer instance." msgstr "" -#: c-api/unicode.rst:1778 +#: c-api/unicode.rst:1822 msgid "If *writer* is ``NULL``, no operation is performed." msgstr "" -#: c-api/unicode.rst:1784 +#: c-api/unicode.rst:1828 msgid "Write the single Unicode character *ch* into *writer*." msgstr "" -#: c-api/unicode.rst:1796 c-api/unicode.rst:1823 c-api/unicode.rst:1839 -#: c-api/unicode.rst:1857 c-api/unicode.rst:1883 +#: 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:1791 +#: 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:1805 c-api/unicode.rst:1872 +#: 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:1799 +#: c-api/unicode.rst:1843 msgid "See also :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`." msgstr "" -#: c-api/unicode.rst:1803 +#: c-api/unicode.rst:1847 msgid "Write the ASCII string *str* into *writer*." msgstr "" -#: c-api/unicode.rst:1808 +#: 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:1818 +#: c-api/unicode.rst:1860 msgid "Write the wide string *str* into *writer*." msgstr "" -#: c-api/unicode.rst:1820 +#: 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:1828 +#: c-api/unicode.rst:1870 msgid "Writer the UCS4 string *str* into *writer*." msgstr "" -#: c-api/unicode.rst:1830 +#: c-api/unicode.rst:1872 msgid "*size* is a number of UCS4 characters." msgstr "" -#: c-api/unicode.rst:1837 +#: c-api/unicode.rst:1879 msgid "" "Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*." msgstr "" -#: c-api/unicode.rst:1844 +#: 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:1851 +#: 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:1853 +#: 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:1862 +#: c-api/unicode.rst:1914 msgid "" "Similar to :c:func:`PyUnicode_FromFormat`, but write the output directly " "into *writer*." msgstr "" -#: c-api/unicode.rst:1869 +#: 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:1875 +#: 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:1878 +#: 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:1886 +#: c-api/unicode.rst:1938 msgid "See also :c:func:`PyUnicodeWriter_WriteUTF8`." msgstr "" -#: c-api/unicode.rst:1889 +#: c-api/unicode.rst:1941 msgid "Deprecated API" msgstr "" -#: c-api/unicode.rst:1891 +#: c-api/unicode.rst:1943 msgid "The following API is deprecated." msgstr "" -#: c-api/unicode.rst:1895 +#: 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 " @@ -2301,7 +2367,7 @@ 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:1899 +#: 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 " @@ -2311,26 +2377,26 @@ msgstr "" "selon que vous choisissiez une version Unicode *narrow* ou *wide* de Python " "à la compilation." -#: c-api/unicode.rst:1909 +#: 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:1915 +#: 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:1923 +#: 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:1929 +#: 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." diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index 571651ddb9..385d14e241 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: 2025-10-17 09:58+0200\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" @@ -29,12 +29,12 @@ msgstr "" 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." +"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 " @@ -46,25 +46,25 @@ 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 " @@ -75,13 +75,13 @@ msgid "" "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 " @@ -90,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." 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 " @@ -118,28 +118,22 @@ 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 " @@ -148,13 +142,26 @@ msgid "" "included specifically if needed.)" msgstr "" -#: c-api/veryhigh.rst:124 +#: 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: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`` " @@ -162,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 " @@ -189,61 +196,59 @@ 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." 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`." 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 " -"symbol and must one of the " -"following: :c:data:`Py_eval_input`, :c:data:`Py_file_input`, " -"or :c:data:`Py_single_input`." +"symbol and must be one of the :ref:`available start symbols `." msgstr "" -#: c-api/veryhigh.rst:189 +#: 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:195 +#: 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:201 +#: 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:207 +#: 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:213 +#: 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 " @@ -252,31 +257,30 @@ msgid "" "before :c:func:`PyRun_FileExFlags` returns." msgstr "" -#: c-api/veryhigh.rst:222 +#: 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:228 +#: 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:234 +#: c-api/veryhigh.rst:241 msgid "" "Parse and compile the Python source code in *str*, returning the resulting " "code object. The start symbol 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." +"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:242 +#: 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 " @@ -285,20 +289,20 @@ msgid "" "or ``2`` (docstrings are removed too)." msgstr "" -#: c-api/veryhigh.rst:253 +#: 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:260 +#: 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:267 +#: 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, " @@ -307,13 +311,13 @@ msgid "" "only_parameter>` arguments and a closure tuple of cells." msgstr "" -#: c-api/veryhigh.rst:276 +#: c-api/veryhigh.rst:283 msgid "" "Evaluate an execution frame. This is a simplified interface " "to :c:func:`PyEval_EvalFrameEx`, for backward compatibility." msgstr "" -#: c-api/veryhigh.rst:282 +#: 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 " @@ -323,7 +327,7 @@ msgid "" "of generator objects." msgstr "" -#: c-api/veryhigh.rst:289 +#: 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." @@ -331,33 +335,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/veryhigh.rst:296 +#: 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:304 -msgid "" -"The start symbol from the Python grammar for isolated expressions; for use " -"with :c:func:`Py_CompileString`." -msgstr "" - -#: c-api/veryhigh.rst:312 -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:321 -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:328 +#: 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 " @@ -365,45 +349,45 @@ msgid "" "case, ``from __future__ import`` can modify *flags*." msgstr "" -#: c-api/veryhigh.rst:333 +#: 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:339 +#: c-api/veryhigh.rst:320 msgid "Compiler flags." msgstr "" -#: c-api/veryhigh.rst:343 +#: 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:346 +#: 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:349 +#: c-api/veryhigh.rst:330 msgid "Added *cf_feature_version* field." msgstr "" -#: c-api/veryhigh.rst:352 +#: c-api/veryhigh.rst:333 msgid "The available compiler flags are accessible as macros:" msgstr "" -#: c-api/veryhigh.rst:361 +#: 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:365 +#: 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 " @@ -411,6 +395,87 @@ msgid "" "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: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: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:388 +msgid "" +"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:392 +msgid "This requires the :c:macro:`PyCF_ONLY_AST` flag to be set." +msgstr "" + +#: c-api/veryhigh.rst:395 +msgid ":py:class:`ast.FunctionType`" +msgstr "" + +#: 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: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 "" +"On success, this function returns the stack effect; on failure, this " +"returns :c:macro:`PY_INVALID_STACK_EFFECT`." +msgstr "" + +#: 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:432 +msgid "" +"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 #~ msgid "" #~ "The C structure of the objects used to describe frame objects. The fields " diff --git a/c-api/weakref.po b/c-api/weakref.po index ac1da3341a..4d0309800f 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: 2025-10-17 09:58+0200\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,84 +109,51 @@ 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 -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`." - -#: 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 +#: c-api/weakref.rst:84 msgid "" "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 "" -#: c-api/weakref.rst:102 +#: c-api/weakref.rst:93 msgid "" "This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler " "to clear weak references." msgstr "" -#: c-api/weakref.rst:105 +#: c-api/weakref.rst:96 msgid "" "This iterates through the weak references for *object* and calls callbacks " "for those references which have one. It returns when all callbacks have been " "attempted." msgstr "" -#: c-api/weakref.rst:112 +#: c-api/weakref.rst:103 msgid "Clears the weakrefs for *object* without calling the callbacks." msgstr "" -#: c-api/weakref.rst:114 +#: c-api/weakref.rst:105 msgid "" "This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler " "for types with finalizers (i.e., :meth:`~object.__del__`). The handler for " @@ -182,9 +162,36 @@ msgid "" "clear any weakrefs that may have been created by the finalizer." msgstr "" -#: c-api/weakref.rst:120 +#: 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." 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/deprecations/c-api-pending-removal-in-3.15.po b/deprecations/c-api-pending-removal-in-3.15.po index 9d06a77a25..885ddc6a34 100644 --- a/deprecations/c-api-pending-removal-in-3.15.po +++ b/deprecations/c-api-pending-removal-in-3.15.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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,13 +21,13 @@ msgstr "" #: deprecations/c-api-pending-removal-in-3.15.rst:4 msgid "" -"The :c:func:`PyImport_ImportModuleNoBlock`: " +"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`: " +":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." @@ -35,217 +35,211 @@ msgstr "" #: deprecations/c-api-pending-removal-in-3.15.rst:10 msgid "" -":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: " -"Use :c:type:`wchar_t` instead." -msgstr "" - -#: deprecations/c-api-pending-removal-in-3.15.rst:12 -msgid "" ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:14 +#: 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:17 +#: 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:19 +#: 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:22 +#: 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:24 +#: deprecations/c-api-pending-removal-in-3.15.rst:22 msgid "" -":c:func:`Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") " +":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:27 +#: deprecations/c-api-pending-removal-in-3.15.rst:25 msgid "" -":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") " +":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:32 +#: deprecations/c-api-pending-removal-in-3.15.rst:30 msgid "" -":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") " +":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:38 +#: deprecations/c-api-pending-removal-in-3.15.rst:36 msgid "" -":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " +":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:41 +#: deprecations/c-api-pending-removal-in-3.15.rst:39 msgid "" -":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " +":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:44 +#: deprecations/c-api-pending-removal-in-3.15.rst:42 msgid "" -":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " +":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:48 +#: 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:52 +#: 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:54 +#: 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:56 +#: 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:58 +#: 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.15.rst:60 +#: 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:62 +#: deprecations/c-api-pending-removal-in-3.15.rst:60 msgid "" -":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" +":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:65 +#: 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." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:68 +#: deprecations/c-api-pending-removal-in-3.15.rst:66 msgid "Global configuration variables:" msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:70 +#: 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:73 +#: 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:76 +#: 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:79 +#: 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:82 +#: 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:85 +#: 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:88 +#: 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:91 +#: 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:94 +#: 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:97 +#: 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:100 +#: 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:103 +#: 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:106 +#: 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:109 +#: 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:113 +#: 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.15.rst:116 +#: deprecations/c-api-pending-removal-in-3.15.rst:114 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: " "Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` " @@ -253,14 +247,14 @@ msgid "" "instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:119 +#: 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:122 +#: deprecations/c-api-pending-removal-in-3.15.rst:120 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" "Py_HasFileSystemDefaultEncoding`: " @@ -268,21 +262,21 @@ msgid "" "or :c:func:`PyConfig_Get(\"filesystem_encoding\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:125 +#: 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:128 +#: 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:133 +#: deprecations/c-api-pending-removal-in-3.15.rst:131 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used " "with :c:type:`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can " diff --git a/deprecations/c-api-pending-removal-in-3.16.po b/deprecations/c-api-pending-removal-in-3.16.po index c9d0e58fc0..53696af712 100644 --- a/deprecations/c-api-pending-removal-in-3.16.po +++ b/deprecations/c-api-pending-removal-in-3.16.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/deprecations/c-api-pending-removal-in-3.18.po b/deprecations/c-api-pending-removal-in-3.18.po index 769ed5c201..f6841d447f 100644 --- a/deprecations/c-api-pending-removal-in-3.18.po +++ b/deprecations/c-api-pending-removal-in-3.18.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" 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 0000000000..ce400b74a5 --- /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 0000000000..516a17404e --- /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/index.po b/deprecations/index.po index 889fa41e21..b5fcf6de0e 100644 --- a/deprecations/index.po +++ b/deprecations/index.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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,10 +31,10 @@ msgstr "" #: deprecations/pending-removal-in-3.15.rst:6 msgid "" -"Setting :attr:`~module.__cached__` on a module while failing to " +"Setting ``__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`)" +"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 @@ -63,9 +63,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 @@ -75,7 +75,7 @@ msgid "" msgstr "" #: deprecations/pending-removal-in-3.15.rst:32 -#: deprecations/pending-removal-in-future.rst:63 +#: deprecations/pending-removal-in-future.rst:62 msgid ":mod:`importlib`:" msgstr "" @@ -84,81 +84,67 @@ msgid "``load_module()`` method: use ``exec_module()`` instead." msgstr "" #: deprecations/pending-removal-in-3.15.rst:36 -msgid ":class:`locale`:" -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`.)" -msgstr "" - -#: deprecations/pending-removal-in-3.15.rst:46 msgid ":mod:`pathlib`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:48 +#: deprecations/pending-removal-in-3.15.rst:38 msgid "" -":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. " +":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:52 +#: deprecations/pending-removal-in-3.15.rst:42 msgid ":mod:`platform`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:54 +#: deprecations/pending-removal-in-3.15.rst:44 msgid "" -":func:`~platform.java_ver` has been deprecated since Python 3.13. This " +":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:58 +#: 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.15.rst:60 +#: deprecations/pending-removal-in-3.15.rst:50 msgid "" "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:63 +#: deprecations/pending-removal-in-3.15.rst:53 msgid ":mod:`threading`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:65 +#: 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:71 +#: deprecations/pending-removal-in-3.15.rst:61 msgid ":mod:`types`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:73 +#: deprecations/pending-removal-in-3.15.rst:63 msgid "" -":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was " +":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:80 -#: deprecations/pending-removal-in-3.17.rst:26 +#: 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.15.rst:82 +#: deprecations/pending-removal-in-3.15.rst:72 msgid "" "The undocumented keyword argument syntax for " "creating :class:`~typing.NamedTuple` classes (for example, ``Point = " @@ -166,7 +152,7 @@ msgid "" "3.13. Use the class-based syntax or the functional syntax instead." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:88 +#: 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 " @@ -175,36 +161,40 @@ msgid "" "TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:95 +#: deprecations/pending-removal-in-3.15.rst:85 msgid "" -"The :func:`typing.no_type_check_decorator` decorator function has been " +"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:100 +#: 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:102 +#: deprecations/pending-removal-in-3.15.rst:94 msgid "" -"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, " -"and :meth:`~wave.Wave_read.getmarkers` methods of " +"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:107 +#: deprecations/pending-removal-in-3.15.rst:98 msgid ":mod:`zipimport`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:109 +#: 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. (Contributed " -"by Jiahao Li in :gh:`125746`.)" +":meth:`!zipimport.zipimporter.load_module` has been deprecated since Python " +"3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (:gh:`125746`.)" msgstr "" +#: 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 "" @@ -385,16 +375,28 @@ msgid "Pending removal in Python 3.17" msgstr "" #: deprecations/pending-removal-in-3.17.rst:4 -msgid ":mod:`collections.abc`:" +#: deprecations/pending-removal-in-future.rst:53 +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:8 -#: deprecations/pending-removal-in-3.17.rst:36 +#: 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 " @@ -403,8 +405,8 @@ msgid "" "bytearray | memoryview``)." msgstr "" -#: deprecations/pending-removal-in-3.17.rst:14 -#: deprecations/pending-removal-in-3.17.rst:42 +#: 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`. " @@ -415,14 +417,35 @@ msgid "" "or by static type checkers)." msgstr "" -#: deprecations/pending-removal-in-3.17.rst:22 -#: deprecations/pending-removal-in-3.17.rst:50 +#: 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:28 +#: 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: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 " @@ -432,12 +455,50 @@ msgid "" "of relying on private implementation details." msgstr "" -#: deprecations/pending-removal-in-3.17.rst:33 +#: 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 "" +#: 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 "" +"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 +#: deprecations/pending-removal-in-3.20.rst:42 +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 +#: 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 "" @@ -449,6 +510,214 @@ msgid "" "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 "" + +#: 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.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: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" @@ -520,10 +789,6 @@ msgid "" msgstr "" #: deprecations/pending-removal-in-future.rst:38 -msgid "Delegation of ``int()`` to ``__trunc__()`` method." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:39 msgid "" "Passing a complex number as the *real* or *imag* argument in " "the :func:`complex` constructor is now deprecated; it should only be passed " @@ -531,7 +796,7 @@ msgid "" "in :gh:`109218`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:44 +#: deprecations/pending-removal-in-future.rst:43 msgid "" ":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants " "are deprecated and replaced by :data:`calendar.JANUARY` " @@ -539,80 +804,87 @@ msgid "" "in :gh:`103636`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:49 +#: 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:51 +#: 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:54 -msgid ":mod:`datetime`:" -msgstr "" - -#: deprecations/pending-removal-in-future.rst:56 +#: deprecations/pending-removal-in-future.rst:55 msgid "" ":meth:`~datetime.datetime.utcnow`: use " "``datetime.datetime.now(tz=datetime.UTC)``." msgstr "" -#: deprecations/pending-removal-in-future.rst:58 +#: 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:61 +#: deprecations/pending-removal-in-future.rst:60 msgid ":mod:`gettext`: Plural value must be an integer." msgstr "" -#: deprecations/pending-removal-in-future.rst:65 +#: 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:68 +#: deprecations/pending-removal-in-future.rst:67 msgid ":mod:`importlib.metadata`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:70 +#: deprecations/pending-removal-in-future.rst:69 msgid "``EntryPoints`` tuple interface." msgstr "" -#: deprecations/pending-removal-in-future.rst:71 +#: deprecations/pending-removal-in-future.rst:70 msgid "Implicit ``None`` on return values." msgstr "" -#: deprecations/pending-removal-in-future.rst:73 +#: 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:76 +#: 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:79 +#: 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:81 +#: 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:84 +#: 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 " @@ -621,110 +893,105 @@ msgid "" "underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:91 -msgid "" -":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:93 +#: 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:96 +#: deprecations/pending-removal-in-future.rst:101 msgid ":mod:`ssl` options and protocols:" msgstr "" -#: deprecations/pending-removal-in-future.rst:98 +#: deprecations/pending-removal-in-future.rst:103 msgid ":class:`ssl.SSLContext` without protocol argument is deprecated." msgstr "" -#: deprecations/pending-removal-in-future.rst:99 +#: 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." msgstr "" -#: deprecations/pending-removal-in-future.rst:102 +#: deprecations/pending-removal-in-future.rst:107 msgid "``ssl.OP_NO_SSL*`` options" msgstr "" -#: deprecations/pending-removal-in-future.rst:103 +#: deprecations/pending-removal-in-future.rst:108 msgid "``ssl.OP_NO_TLS*`` options" msgstr "" -#: deprecations/pending-removal-in-future.rst:104 +#: deprecations/pending-removal-in-future.rst:109 msgid "``ssl.PROTOCOL_SSLv3``" msgstr "" -#: deprecations/pending-removal-in-future.rst:105 +#: deprecations/pending-removal-in-future.rst:110 msgid "``ssl.PROTOCOL_TLS``" msgstr "" -#: deprecations/pending-removal-in-future.rst:106 +#: deprecations/pending-removal-in-future.rst:111 msgid "``ssl.PROTOCOL_TLSv1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:107 +#: deprecations/pending-removal-in-future.rst:112 msgid "``ssl.PROTOCOL_TLSv1_1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:108 +#: deprecations/pending-removal-in-future.rst:113 msgid "``ssl.PROTOCOL_TLSv1_2``" msgstr "" -#: deprecations/pending-removal-in-future.rst:109 +#: deprecations/pending-removal-in-future.rst:114 msgid "``ssl.TLSVersion.SSLv3``" msgstr "" -#: deprecations/pending-removal-in-future.rst:110 +#: deprecations/pending-removal-in-future.rst:115 msgid "``ssl.TLSVersion.TLSv1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:111 +#: deprecations/pending-removal-in-future.rst:116 msgid "``ssl.TLSVersion.TLSv1_1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:113 +#: deprecations/pending-removal-in-future.rst:118 msgid ":mod:`threading` methods:" msgstr "" -#: deprecations/pending-removal-in-future.rst:115 +#: deprecations/pending-removal-in-future.rst:120 msgid "" ":meth:`!threading.Condition.notifyAll`: " "use :meth:`~threading.Condition.notify_all`." msgstr "" -#: deprecations/pending-removal-in-future.rst:116 +#: 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:117 +#: deprecations/pending-removal-in-future.rst:122 msgid "" ":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: " "use :attr:`threading.Thread.daemon` attribute." msgstr "" -#: deprecations/pending-removal-in-future.rst:119 +#: deprecations/pending-removal-in-future.rst:124 msgid "" ":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: " "use :attr:`threading.Thread.name` attribute." msgstr "" -#: deprecations/pending-removal-in-future.rst:121 +#: deprecations/pending-removal-in-future.rst:126 msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`." msgstr "" -#: deprecations/pending-removal-in-future.rst:122 +#: deprecations/pending-removal-in-future.rst:127 msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`." msgstr "" -#: deprecations/pending-removal-in-future.rst:124 +#: deprecations/pending-removal-in-future.rst:129 msgid ":class:`typing.Text` (:gh:`92332`)." msgstr "" -#: deprecations/pending-removal-in-future.rst:126 +#: 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 " @@ -732,69 +999,69 @@ msgid "" "Python 3.17. (Contributed by Jelle Zijlstra in :gh:`105499`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:131 +#: 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:134 +#: 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:136 +#: deprecations/pending-removal-in-future.rst:141 msgid "``splitattr()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:137 +#: deprecations/pending-removal-in-future.rst:142 msgid "``splithost()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:138 +#: deprecations/pending-removal-in-future.rst:143 msgid "``splitnport()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:139 +#: deprecations/pending-removal-in-future.rst:144 msgid "``splitpasswd()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:140 +#: deprecations/pending-removal-in-future.rst:145 msgid "``splitport()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:141 +#: deprecations/pending-removal-in-future.rst:146 msgid "``splitquery()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:142 +#: deprecations/pending-removal-in-future.rst:147 msgid "``splittag()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:143 +#: deprecations/pending-removal-in-future.rst:148 msgid "``splittype()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:144 +#: deprecations/pending-removal-in-future.rst:149 msgid "``splituser()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:145 +#: deprecations/pending-removal-in-future.rst:150 msgid "``splitvalue()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:146 +#: deprecations/pending-removal-in-future.rst:151 msgid "``to_bytes()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:148 +#: 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:151 +#: 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 " @@ -802,25 +1069,60 @@ msgid "" "``elem is not None`` tests instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:156 +#: deprecations/pending-removal-in-future.rst:161 msgid "" ":func:`sys._clear_type_cache` is deprecated: " "use :func:`sys._clear_internal_caches` instead." msgstr "" -#: deprecations/index.rst:15 +#: 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`: " +"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`: " +":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." @@ -828,217 +1130,211 @@ msgstr "" #: deprecations/c-api-pending-removal-in-3.15.rst:10 msgid "" -":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: " -"Use :c:type:`wchar_t` instead." -msgstr "" - -#: deprecations/c-api-pending-removal-in-3.15.rst:12 -msgid "" ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:14 +#: 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:17 +#: 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:19 +#: 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:22 +#: 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:24 +#: deprecations/c-api-pending-removal-in-3.15.rst:22 msgid "" -":c:func:`Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") " +":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:27 +#: deprecations/c-api-pending-removal-in-3.15.rst:25 msgid "" -":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") " +":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:32 +#: deprecations/c-api-pending-removal-in-3.15.rst:30 msgid "" -":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") " +":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:38 +#: deprecations/c-api-pending-removal-in-3.15.rst:36 msgid "" -":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " +":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:41 +#: deprecations/c-api-pending-removal-in-3.15.rst:39 msgid "" -":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " +":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:44 +#: deprecations/c-api-pending-removal-in-3.15.rst:42 msgid "" -":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " +":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:48 +#: 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:52 +#: 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:54 +#: 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:56 +#: 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:58 +#: 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.15.rst:60 +#: 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:62 +#: deprecations/c-api-pending-removal-in-3.15.rst:60 msgid "" -":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" +":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:65 +#: 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." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:68 +#: deprecations/c-api-pending-removal-in-3.15.rst:66 msgid "Global configuration variables:" msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:70 +#: 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:73 +#: 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:76 +#: 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:79 +#: 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:82 +#: 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:85 +#: 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:88 +#: 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:91 +#: 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:94 +#: 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:97 +#: 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:100 +#: 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:103 +#: 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:106 +#: 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:109 +#: 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:113 +#: 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.15.rst:116 +#: deprecations/c-api-pending-removal-in-3.15.rst:114 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: " "Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` " @@ -1046,14 +1342,14 @@ msgid "" "instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:119 +#: 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:122 +#: deprecations/c-api-pending-removal-in-3.15.rst:120 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" "Py_HasFileSystemDefaultEncoding`: " @@ -1061,29 +1357,29 @@ msgid "" "or :c:func:`PyConfig_Get(\"filesystem_encoding\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:125 +#: 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:128 +#: 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:133 +#: deprecations/c-api-pending-removal-in-3.15.rst:131 msgid "" "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.18.rst:2 -msgid "Pending removal in Python 3.18" +#: 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 @@ -1209,6 +1505,32 @@ msgid "" "(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 "" +"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 msgid "" "The following APIs are deprecated and will be removed, although there is " diff --git a/deprecations/pending-removal-in-3.13.po b/deprecations/pending-removal-in-3.13.po index d19e7cbc17..e3e0f6b9c7 100644 --- a/deprecations/pending-removal-in-3.13.po +++ b/deprecations/pending-removal-in-3.13.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -146,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.15.po b/deprecations/pending-removal-in-3.15.po index ba61884a8e..1a7107cf92 100644 --- a/deprecations/pending-removal-in-3.15.po +++ b/deprecations/pending-removal-in-3.15.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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,10 +25,10 @@ msgstr "" #: deprecations/pending-removal-in-3.15.rst:6 msgid "" -"Setting :attr:`~module.__cached__` on a module while failing to " +"Setting ``__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`)" +"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 @@ -56,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 @@ -76,79 +76,65 @@ msgid "``load_module()`` method: use ``exec_module()`` instead." msgstr "" #: deprecations/pending-removal-in-3.15.rst:36 -msgid ":class:`locale`:" -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`.)" -msgstr "" - -#: deprecations/pending-removal-in-3.15.rst:46 msgid ":mod:`pathlib`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:48 +#: deprecations/pending-removal-in-3.15.rst:38 msgid "" -":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. " +":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:52 +#: deprecations/pending-removal-in-3.15.rst:42 msgid ":mod:`platform`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:54 +#: deprecations/pending-removal-in-3.15.rst:44 msgid "" -":func:`~platform.java_ver` has been deprecated since Python 3.13. This " +":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:58 +#: deprecations/pending-removal-in-3.15.rst:48 msgid ":mod:`sysconfig`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:60 +#: deprecations/pending-removal-in-3.15.rst:50 msgid "" "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:63 +#: deprecations/pending-removal-in-3.15.rst:53 msgid ":mod:`threading`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:65 +#: 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:71 +#: deprecations/pending-removal-in-3.15.rst:61 msgid ":mod:`types`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:73 +#: deprecations/pending-removal-in-3.15.rst:63 msgid "" -":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was " +":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:80 +#: deprecations/pending-removal-in-3.15.rst:70 msgid ":mod:`typing`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:82 +#: deprecations/pending-removal-in-3.15.rst:72 msgid "" "The undocumented keyword argument syntax for " "creating :class:`~typing.NamedTuple` classes (for example, ``Point = " @@ -156,7 +142,7 @@ msgid "" "3.13. Use the class-based syntax or the functional syntax instead." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:88 +#: 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 " @@ -165,32 +151,35 @@ msgid "" "TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:95 +#: deprecations/pending-removal-in-3.15.rst:85 msgid "" -"The :func:`typing.no_type_check_decorator` decorator function has been " +"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:100 +#: 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:102 +#: deprecations/pending-removal-in-3.15.rst:94 msgid "" -"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, " -"and :meth:`~wave.Wave_read.getmarkers` methods of " +"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:107 +#: deprecations/pending-removal-in-3.15.rst:98 msgid ":mod:`zipimport`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:109 +#: 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. (Contributed " -"by Jiahao Li in :gh:`125746`.)" +":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.17.po b/deprecations/pending-removal-in-3.17.po index 5a3b4d734f..1c5cb08f82 100644 --- a/deprecations/pending-removal-in-3.17.po +++ b/deprecations/pending-removal-in-3.17.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,16 +20,27 @@ msgid "Pending removal in Python 3.17" msgstr "" #: deprecations/pending-removal-in-3.17.rst:4 -msgid ":mod:`collections.abc`:" +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:8 -#: deprecations/pending-removal-in-3.17.rst:36 +#: 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 " @@ -39,8 +49,8 @@ msgid "" "bytearray | memoryview``)." msgstr "" -#: deprecations/pending-removal-in-3.17.rst:14 -#: deprecations/pending-removal-in-3.17.rst:42 +#: 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`. " @@ -51,18 +61,39 @@ msgid "" "or by static type checkers)." msgstr "" -#: deprecations/pending-removal-in-3.17.rst:22 -#: deprecations/pending-removal-in-3.17.rst:50 +#: 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:26 +#: 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:28 +#: 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 " @@ -72,7 +103,7 @@ msgid "" "of relying on private implementation details." msgstr "" -#: deprecations/pending-removal-in-3.17.rst:33 +#: 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." diff --git a/deprecations/pending-removal-in-3.18.po b/deprecations/pending-removal-in-3.18.po new file mode 100644 index 0000000000..ae3c87f1bb --- /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 index 41783a8153..4acbc6cae2 100644 --- a/deprecations/pending-removal-in-3.19.po +++ b/deprecations/pending-removal-in-3.19.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -30,3 +29,64 @@ msgid "" "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 0000000000..691e20f4c6 --- /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 8b2f001eb0..a3be5d3514 100644 --- a/deprecations/pending-removal-in-future.po +++ b/deprecations/pending-removal-in-future.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -89,10 +89,6 @@ msgid "" msgstr "" #: deprecations/pending-removal-in-future.rst:38 -msgid "Delegation of ``int()`` to ``__trunc__()`` method." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:39 msgid "" "Passing a complex number as the *real* or *imag* argument in " "the :func:`complex` constructor is now deprecated; it should only be passed " @@ -100,7 +96,7 @@ msgid "" "in :gh:`109218`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:44 +#: deprecations/pending-removal-in-future.rst:43 msgid "" ":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants " "are deprecated and replaced by :data:`calendar.JANUARY` " @@ -108,84 +104,95 @@ msgid "" "in :gh:`103636`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:49 +#: 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:51 +#: 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:54 +#: deprecations/pending-removal-in-future.rst:53 msgid ":mod:`datetime`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:56 +#: deprecations/pending-removal-in-future.rst:55 msgid "" ":meth:`~datetime.datetime.utcnow`: use " "``datetime.datetime.now(tz=datetime.UTC)``." msgstr "" -#: deprecations/pending-removal-in-future.rst:58 +#: 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:61 +#: deprecations/pending-removal-in-future.rst:60 msgid ":mod:`gettext`: Plural value must be an integer." msgstr "" -#: deprecations/pending-removal-in-future.rst:63 +#: deprecations/pending-removal-in-future.rst:62 msgid ":mod:`importlib`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:65 +#: 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:68 +#: deprecations/pending-removal-in-future.rst:67 msgid ":mod:`importlib.metadata`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:70 +#: deprecations/pending-removal-in-future.rst:69 msgid "``EntryPoints`` tuple interface." msgstr "" -#: deprecations/pending-removal-in-future.rst:71 +#: deprecations/pending-removal-in-future.rst:70 msgid "Implicit ``None`` on return values." msgstr "" -#: deprecations/pending-removal-in-future.rst:73 +#: 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:76 +#: 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:79 +#: 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:81 +#: 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:84 +#: 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 " @@ -194,110 +201,105 @@ msgid "" "underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:91 -msgid "" -":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:93 +#: 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:96 +#: deprecations/pending-removal-in-future.rst:101 msgid ":mod:`ssl` options and protocols:" msgstr "" -#: deprecations/pending-removal-in-future.rst:98 +#: deprecations/pending-removal-in-future.rst:103 msgid ":class:`ssl.SSLContext` without protocol argument is deprecated." msgstr "" -#: deprecations/pending-removal-in-future.rst:99 +#: 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." msgstr "" -#: deprecations/pending-removal-in-future.rst:102 +#: deprecations/pending-removal-in-future.rst:107 msgid "``ssl.OP_NO_SSL*`` options" msgstr "" -#: deprecations/pending-removal-in-future.rst:103 +#: deprecations/pending-removal-in-future.rst:108 msgid "``ssl.OP_NO_TLS*`` options" msgstr "" -#: deprecations/pending-removal-in-future.rst:104 +#: deprecations/pending-removal-in-future.rst:109 msgid "``ssl.PROTOCOL_SSLv3``" msgstr "" -#: deprecations/pending-removal-in-future.rst:105 +#: deprecations/pending-removal-in-future.rst:110 msgid "``ssl.PROTOCOL_TLS``" msgstr "" -#: deprecations/pending-removal-in-future.rst:106 +#: deprecations/pending-removal-in-future.rst:111 msgid "``ssl.PROTOCOL_TLSv1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:107 +#: deprecations/pending-removal-in-future.rst:112 msgid "``ssl.PROTOCOL_TLSv1_1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:108 +#: deprecations/pending-removal-in-future.rst:113 msgid "``ssl.PROTOCOL_TLSv1_2``" msgstr "" -#: deprecations/pending-removal-in-future.rst:109 +#: deprecations/pending-removal-in-future.rst:114 msgid "``ssl.TLSVersion.SSLv3``" msgstr "" -#: deprecations/pending-removal-in-future.rst:110 +#: deprecations/pending-removal-in-future.rst:115 msgid "``ssl.TLSVersion.TLSv1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:111 +#: deprecations/pending-removal-in-future.rst:116 msgid "``ssl.TLSVersion.TLSv1_1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:113 +#: deprecations/pending-removal-in-future.rst:118 msgid ":mod:`threading` methods:" msgstr "" -#: deprecations/pending-removal-in-future.rst:115 +#: deprecations/pending-removal-in-future.rst:120 msgid "" ":meth:`!threading.Condition.notifyAll`: " "use :meth:`~threading.Condition.notify_all`." msgstr "" -#: deprecations/pending-removal-in-future.rst:116 +#: 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:117 +#: deprecations/pending-removal-in-future.rst:122 msgid "" ":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: " "use :attr:`threading.Thread.daemon` attribute." msgstr "" -#: deprecations/pending-removal-in-future.rst:119 +#: deprecations/pending-removal-in-future.rst:124 msgid "" ":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: " "use :attr:`threading.Thread.name` attribute." msgstr "" -#: deprecations/pending-removal-in-future.rst:121 +#: deprecations/pending-removal-in-future.rst:126 msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`." msgstr "" -#: deprecations/pending-removal-in-future.rst:122 +#: deprecations/pending-removal-in-future.rst:127 msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`." msgstr "" -#: deprecations/pending-removal-in-future.rst:124 +#: deprecations/pending-removal-in-future.rst:129 msgid ":class:`typing.Text` (:gh:`92332`)." msgstr "" -#: deprecations/pending-removal-in-future.rst:126 +#: 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 " @@ -305,69 +307,69 @@ msgid "" "Python 3.17. (Contributed by Jelle Zijlstra in :gh:`105499`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:131 +#: 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:134 +#: 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:136 +#: deprecations/pending-removal-in-future.rst:141 msgid "``splitattr()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:137 +#: deprecations/pending-removal-in-future.rst:142 msgid "``splithost()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:138 +#: deprecations/pending-removal-in-future.rst:143 msgid "``splitnport()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:139 +#: deprecations/pending-removal-in-future.rst:144 msgid "``splitpasswd()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:140 +#: deprecations/pending-removal-in-future.rst:145 msgid "``splitport()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:141 +#: deprecations/pending-removal-in-future.rst:146 msgid "``splitquery()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:142 +#: deprecations/pending-removal-in-future.rst:147 msgid "``splittag()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:143 +#: deprecations/pending-removal-in-future.rst:148 msgid "``splittype()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:144 +#: deprecations/pending-removal-in-future.rst:149 msgid "``splituser()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:145 +#: deprecations/pending-removal-in-future.rst:150 msgid "``splitvalue()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:146 +#: deprecations/pending-removal-in-future.rst:151 msgid "``to_bytes()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:148 +#: 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:151 +#: 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 " @@ -375,7 +377,7 @@ msgid "" "``elem is not None`` tests instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:156 +#: deprecations/pending-removal-in-future.rst:161 msgid "" ":func:`sys._clear_type_cache` is deprecated: " "use :func:`sys._clear_internal_caches` instead." diff --git a/deprecations/soft-deprecations.po b/deprecations/soft-deprecations.po new file mode 100644 index 0000000000..6502835627 --- /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/extending/extending.po b/extending/extending.po index 3b8200b9fd..a827799baf 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: 2025-10-17 09:58+0200\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,285 +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." -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 -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 : -#: 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." -msgstr "" - -#: extending/extending.rst:82 -msgid "" -"For backward compatibility, :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. If using the limited C " -"API version 3.13 or newer, the implicit includes are:" -msgstr "" - -#: extending/extending.rst:87 -msgid "````" -msgstr "" - -#: extending/extending.rst:88 -msgid "```` (on Windows)" -msgstr "" - -#: extending/extending.rst:89 -msgid "````" -msgstr "" - -#: extending/extending.rst:90 -msgid "````" -msgstr "" - -#: extending/extending.rst:91 -msgid "````" -msgstr "" - -#: extending/extending.rst:92 -msgid "````" -msgstr "" - -#: extending/extending.rst:93 -msgid "````" -msgstr "" - -#: extending/extending.rst:94 -msgid "```` (if present)" -msgstr "" - -#: extending/extending.rst:96 -msgid "" -"If :c:macro:`Py_LIMITED_API` is not defined, or is set to version 3.12 or " -"older, the headers below are also included:" -msgstr "" - -#: extending/extending.rst:99 -msgid "````" -msgstr "" - -#: extending/extending.rst:100 -msgid "```` (on POSIX)" +msgid "Using the C API: Assorted topics" msgstr "" -#: extending/extending.rst:102 +#: extending/extending.rst:10 msgid "" -"If :c:macro:`Py_LIMITED_API` is not defined, or is set to version 3.10 or " -"older, the headers below are also included:" -msgstr "" - -#: extending/extending.rst:105 -msgid "````" -msgstr "" - -#: extending/extending.rst:106 -msgid "````" -msgstr "" - -#: extending/extending.rst:107 -msgid "````" +"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 "" -#: extending/extending.rst:108 -msgid "````" -msgstr "" - -#: extending/extending.rst:110 -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:126 -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:131 -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:134 -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:143 -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:153 -msgid "Intermezzo: Errors and Exceptions" +#: extending/extending.rst:19 +#, fuzzy +msgid "Errors and Exceptions" msgstr "Intermezzo : les erreurs et les exceptions" -#: extending/extending.rst:155 +#: 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 " @@ -315,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:164 +#: extending/extending.rst:30 msgid "" "The Python API defines a number of functions to set various types of " "exceptions." @@ -323,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:166 +#: 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 " @@ -337,7 +75,7 @@ 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:172 +#: 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 " @@ -352,7 +90,7 @@ msgstr "" "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:179 +#: 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, " @@ -367,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:185 +#: 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 " @@ -391,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:195 +#: 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 " @@ -406,7 +144,7 @@ msgstr "" "cause de l'erreur : la plupart des opérations peuvent échouer pour tout un " "tas de raisons.)" -#: extending/extending.rst:201 +#: 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 " @@ -421,7 +159,7 @@ msgstr "" "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:207 +#: 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 " @@ -437,7 +175,7 @@ msgstr "" "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:213 +#: 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 " @@ -449,7 +187,7 @@ 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:217 +#: 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 " @@ -459,7 +197,7 @@ msgstr "" "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:221 +#: extending/extending.rst:87 #, fuzzy msgid "" "The choice of which exception to raise is entirely yours. There are " @@ -485,7 +223,7 @@ msgstr "" "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:231 +#: extending/extending.rst:97 #, fuzzy msgid "" "You can also define a new exception that is unique to your module. The " @@ -495,26 +233,26 @@ 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:237 +#: extending/extending.rst:103 msgid "" "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 "" -#: extending/extending.rst:242 +#: 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:245 +#: 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:284 +#: extending/extending.rst:150 #, fuzzy msgid "" "Note that the Python name for the exception object is :exc:`!spam.error`. " @@ -527,7 +265,7 @@ msgstr "" "de :exc:`Exception` (à moins qu'une autre classe ne lui soit fournie à la " "place de ``NULL``), voir :ref:`bltin-exceptions`." -#: extending/extending.rst:289 +#: 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 " @@ -545,7 +283,7 @@ 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:296 +#: 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` " @@ -553,7 +291,7 @@ msgid "" "ensure that this will happen at most once per process." msgstr "" -#: extending/extending.rst:301 +#: extending/extending.rst:167 #, fuzzy msgid "" "We discuss the use of :c:macro:`PyMODINIT_FUNC` as a function return type " @@ -562,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:304 +#: extending/extending.rst:170 #, fuzzy msgid "" "The :exc:`!spam.error` exception can be raised in your extension module " @@ -571,249 +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:327 -msgid "Back to the Example" -msgstr "Retour vers l'exemple" - -#: extending/extending.rst:329 -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:335 -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``)." - -#: extending/extending.rst:343 -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`::" +#: extending/extending.rst:193 +msgid "Embedding an extension" 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:348 -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:353 -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:356 -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:364 -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:372 -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:374 -#, 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:385 -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:390 -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:394 -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:400 -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:408 -#, 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:419 -#, 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:423 -msgid "" -":c:func:`!PyInit_spam` is called when each interpreter imports its " -"module :mod:`!spam` for the first time. (See below for comments about " -"embedding Python.) A pointer to the module definition must be returned " -"via :c:func:`PyModuleDef_Init`, so that the import machinery can create the " -"module and store it in ``sys.modules``." -msgstr "" - -#: extending/extending.rst:428 -#, 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 ::" - -#: extending/extending.rst:483 -msgid "" -"If you declare a global variable or a local static one, the module may " -"experience unintended side-effects on re-initialisation, for example when " -"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`). If module state is not yet " -"fully :ref:`isolated `, authors should consider " -"marking the module as having no support for subinterpreters " -"(via :c:macro:`Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED`)." -msgstr "" - -#: extending/extending.rst:492 +#: extending/extending.rst:195 #, 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." - -#: extending/extending.rst:500 -msgid "Compilation and Linkage" -msgstr "Compilation et liaison" - -#: extending/extending.rst:502 -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:509 -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 "" @@ -825,7 +330,7 @@ msgstr "" "distribution source décompressée, ajoutez une ligne au " "fichier :file:`Modules/Setup.local` décrivant votre fichier :" -#: extending/extending.rst:520 +#: 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/` " @@ -840,7 +345,7 @@ msgstr "" "« :program:`make` Makefile » (c'est nécessaire chaque fois que vous modifiez " "le fichier :file:`Setup`)." -#: extending/extending.rst:526 +#: 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:" @@ -849,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:537 +#: extending/extending.rst:223 msgid "Calling Python Functions from C" msgstr "Appeler des fonctions Python en C" -#: extending/extending.rst:539 +#: 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 " @@ -872,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:547 +#: 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 " @@ -887,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:553 +#: 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 " @@ -904,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:583 +#: 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 section :ref:`parsetuple`." +"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`." -#: extending/extending.rst:588 +#: 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`` " @@ -929,7 +436,7 @@ msgstr "" "dans ce contexte). Plus d'informations à ce sujet dans la " "section :ref:`refcounts`." -#: extending/extending.rst:595 +#: 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, " @@ -952,7 +459,7 @@ msgstr "" "format se compose de zéro ou plusieurs codes de format entre parenthèses. " "Par exemple ::" -#: extending/extending.rst:615 +#: 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 " @@ -968,7 +475,7 @@ msgstr "" "qui est décrémenté (avec :c:func:`Py_DECREF`) immédiatement après " "l'appel :c:func:`PyObject_CallObject`." -#: extending/extending.rst:622 +#: 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 " @@ -983,7 +490,7 @@ msgstr "" "avec :c:func:`Py_DECREF` le résultat, même (surtout !) si vous n'êtes pas " "intéressé par sa valeur." -#: extending/extending.rst:628 +#: 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 " @@ -1003,7 +510,7 @@ msgstr "" "souhaitable, l'exception doit être effacée en " "appelant :c:func:`PyErr_Clear`. Par exemple ::" -#: extending/extending.rst:641 +#: 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 " @@ -1025,7 +532,7 @@ msgstr "" "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:660 +#: 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 " @@ -1037,7 +544,7 @@ 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:664 +#: 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 " @@ -1049,15 +556,26 @@ msgstr "" "arguments nommés. Comme dans l'exemple ci-dessus, nous " "utilisons :c:func:`Py_BuildValue` pour construire le dictionnaire. ::" -#: extending/extending.rst:682 +#: extending/extending.rst:370 msgid "Extracting Parameters in Extension Functions" msgstr "Extraire des paramètres dans des fonctions d'extension" -#: extending/extending.rst:686 -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:690 +#: 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, " @@ -1071,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:696 +#: 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 " @@ -1084,7 +616,7 @@ msgstr "" "plantera probablement ou au moins écrasera des bits aléatoires en mémoire. " "Donc soyez prudent !" -#: extending/extending.rst:701 +#: 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!" @@ -1092,21 +624,44 @@ 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:704 +#: extending/extending.rst:410 msgid "Some example calls::" msgstr "Quelques exemples d'appels ::" -#: extending/extending.rst:774 +#: extending/extending.rst:479 msgid "Keyword Parameters for Extension Functions" msgstr "Paramètres nommés pour des fonctions d'extension" -#: extending/extending.rst:778 +#: 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:783 +#: 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 " @@ -1128,7 +683,7 @@ msgstr "" "renvoie faux et lève une exception appropriée." # suit un : -#: extending/extending.rst:793 +#: 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 " @@ -1138,7 +693,7 @@ msgstr "" "arguments nommés ! Ceux-ci doivent apparaître dans *kwlist*, dans le cas " "contraire une exception :exc:`TypeError` est levée." -#: extending/extending.rst:799 +#: extending/extending.rst:515 msgid "" "Here is an example module which uses keywords, based on an example by Geoff " "Philbrick (philbrick@hks.com)::" @@ -1146,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:853 +#: extending/extending.rst:556 msgid "Building Arbitrary Values" msgstr "Créer des valeurs arbitraires" -#: extending/extending.rst:855 +#: extending/extending.rst:558 msgid "" "This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is " "declared as follows::" @@ -1158,7 +713,7 @@ msgstr "" "Cette fonction est le complément de :c:func:`PyArg_ParseTuple`. Elle est " "déclarée comme suit ::" -#: extending/extending.rst:860 +#: 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 " @@ -1171,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:865 +#: 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 " @@ -1192,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:873 +#: 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:899 +#: extending/extending.rst:602 msgid "Reference Counts" msgstr "Compteurs de références" -#: extending/extending.rst:901 +#: 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 " @@ -1217,7 +772,7 @@ msgstr "" "essentiellement la même signification et nous limiterons la discussion " "suivante au cas du C." -#: extending/extending.rst:907 +#: extending/extending.rst:610 #, fuzzy msgid "" "Every block of memory allocated with :c:func:`malloc` should eventually be " @@ -1245,7 +800,7 @@ msgstr "" "données non initialisées — « *core dumps* », résultats erronés, plantages " "mystérieux." -#: extending/extending.rst:918 +#: 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, " @@ -1276,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:931 +#: 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. " @@ -1295,7 +850,7 @@ msgstr "" "à 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:939 +#: 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 " @@ -1325,7 +880,7 @@ msgstr "" "portable sera disponible pour C. D'ici là, nous devons utiliser les " "compteurs de références." -#: extending/extending.rst:951 +#: 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 " @@ -1351,7 +906,7 @@ 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:962 +#: 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 " @@ -1364,11 +919,11 @@ msgstr "" "interfaces de configuration et la possibilité de désactiver le détecteur au " "moment de l'exécution." -#: extending/extending.rst:971 +#: extending/extending.rst:674 msgid "Reference Counting in Python" msgstr "Comptage de références en Python" -#: extending/extending.rst:973 +#: 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 " @@ -1386,7 +941,7 @@ msgstr "" "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:980 +#: 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 " @@ -1409,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:989 +#: 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`. " @@ -1424,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:995 +#: 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 " @@ -1443,7 +1000,7 @@ 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:1003 +#: 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 " @@ -1457,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:1013 +#: extending/extending.rst:716 msgid "Ownership Rules" msgstr "Règles concernant la possession de références" -#: extending/extending.rst:1015 +#: 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 " @@ -1472,7 +1029,7 @@ 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:1019 +#: 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 " @@ -1491,7 +1048,7 @@ msgstr "" "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:1027 +#: extending/extending.rst:730 msgid "" "Many functions that extract objects from other objects also transfer " "ownership with the reference, for " @@ -1509,7 +1066,7 @@ msgstr "" "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:1034 +#: 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 " @@ -1519,7 +1076,7 @@ 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:1038 +#: 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 " @@ -1539,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:1046 +#: 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 " @@ -1554,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:1052 +#: 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 " @@ -1564,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:1060 +#: extending/extending.rst:763 msgid "Thin Ice" msgstr "Terrain dangereux" -#: extending/extending.rst:1062 +#: 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 " @@ -1580,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:1066 +#: 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 " @@ -1590,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:1078 +#: 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. " @@ -1600,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:1082 +#: extending/extending.rst:785 #, fuzzy msgid "" "Let's follow the control flow into :c:func:`PyList_SetItem`. The list owns " @@ -1625,7 +1182,7 @@ msgstr "" "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:1096 +#: extending/extending.rst:799 #, fuzzy msgid "" "Since it is written in Python, the :meth:`!__del__` method can execute " @@ -1644,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:1104 +#: 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::" @@ -1653,7 +1210,7 @@ msgstr "" "simple : incrémentez temporairement le compteur de références. La version " "correcte de la fonction est ::" -#: extending/extending.rst:1118 +#: extending/extending.rst:821 #, fuzzy msgid "" "This is a true story. An older version of Python contained variants of this " @@ -1665,7 +1222,7 @@ msgstr "" "débogueur C pour comprendre pourquoi il arrivait que ses " "méthodes :meth:`__del__` échouent…" -#: extending/extending.rst:1122 +#: extending/extending.rst:825 #, fuzzy msgid "" "The second case of problems with a borrowed reference is a variant involving " @@ -1690,11 +1247,11 @@ msgstr "" "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:1146 +#: extending/extending.rst:849 msgid "NULL Pointers" msgstr "Pointeurs ``NULL``" -#: extending/extending.rst:1148 +#: 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 " @@ -1716,7 +1273,7 @@ msgstr "" "devait tester pour ``NULL``, il y aurait beaucoup de tests redondants et le " "code s'exécuterait plus lentement." -#: extending/extending.rst:1156 +#: 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 " @@ -1726,7 +1283,7 @@ msgstr "" "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:1160 +#: 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` " @@ -1736,7 +1293,7 @@ msgstr "" "pointeurs ``NULL``. Cependant, leurs variantes :c:func:`Py_XINCREF` " "et :c:func:`Py_XDECREF` le font." -#: extending/extending.rst:1164 +#: 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 " @@ -1751,17 +1308,18 @@ msgstr "" "des tests redondants. Il n'y a pas de variantes avec la vérification " "``NULL``." -#: extending/extending.rst:1170 +#: 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:1174 +#: extending/extending.rst:877 msgid "" "It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python " "user." @@ -1769,11 +1327,11 @@ msgstr "" "C'est une grave erreur de laisser un pointeur ``NULL`` « s'échapper » vers " "l'utilisateur Python." -#: extending/extending.rst:1185 +#: extending/extending.rst:888 msgid "Writing Extensions in C++" msgstr "Écrire des extensions en C++" -#: extending/extending.rst:1187 +#: 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 " @@ -1797,11 +1355,11 @@ msgstr "" "``__cplusplus`` est défini (tous les compilateurs C++ récents définissent ce " "symbole)." -#: extending/extending.rst:1201 +#: 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:1206 +#: 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 " @@ -1821,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:1214 +#: 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 " @@ -1851,14 +1409,15 @@ 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:1226 +#: 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 " @@ -1869,7 +1428,7 @@ msgstr "" "*devraient* être accessibles à partir d'autres modules d'extension doivent " "être exportés d'une manière différente." -#: extending/extending.rst:1233 +#: 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 " @@ -1890,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:1241 +#: 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 " @@ -1907,7 +1466,7 @@ msgstr "" "différentes manières entre le module fournissant le code et les modules " "clients." -#: extending/extending.rst:1247 +#: 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 " @@ -1924,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:1254 +#: extending/extending.rst:954 msgid "" "In particular, Capsules used to expose C APIs should be given a name " "following this convention::" @@ -1932,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:1259 +#: 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 " @@ -1945,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:1264 +#: 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 " @@ -1964,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:1272 +#: 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 "" @@ -1983,7 +1542,7 @@ msgstr "" "Cette fonction :c:func:`PySpam_System` est également exportée vers d'autres " "modules d'extension." -#: extending/extending.rst:1279 +#: extending/extending.rst:980 #, fuzzy msgid "" "The function :c:func:`!PySpam_System` is a plain C function, declared " @@ -1992,20 +1551,20 @@ msgstr "" "La fonction :c:func:`PySpam_System` est une simple fonction C, déclarée " "``static`` comme tout le reste ::" -#: extending/extending.rst:1288 +#: 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:1302 +#: 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:1306 +#: extending/extending.rst:1007 msgid "two more lines must be added::" msgstr "on doit ajouter deux lignes supplémentaires ::" -#: extending/extending.rst:1311 +#: extending/extending.rst:1012 #, fuzzy msgid "" "The ``#define`` is used to tell the header file that it is being included in " @@ -2018,7 +1577,7 @@ msgstr "" "Enfin, la fonction d'initialisation du module doit prendre en charge " "l'initialisation du tableau de pointeurs de l'API C ::" -#: extending/extending.rst:1334 +#: extending/extending.rst:1035 #, fuzzy msgid "" "Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " @@ -2027,7 +1586,7 @@ 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:1337 +#: extending/extending.rst:1038 msgid "" "The bulk of the work is in the header file :file:`spammodule.h`, which looks " "like this::" @@ -2035,7 +1594,7 @@ msgstr "" "L'essentiel du travail se trouve dans le fichier d'en-" "tête :file:`spammodule.h`, qui ressemble à ceci ::" -#: extending/extending.rst:1388 +#: extending/extending.rst:1089 #, fuzzy msgid "" "All that a client module must do in order to have access to the " @@ -2047,7 +1606,7 @@ msgstr "" "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:1402 +#: 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 " @@ -2058,7 +1617,7 @@ msgstr "" "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:1406 +#: 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 " @@ -2075,19 +1634,11 @@ msgstr "" "Capsules (fichiers :file:`Include/pycapsule.h` et :file:`Objects/" "pycapsule.c` dans la distribution du code source Python)." -#: extending/extending.rst:1414 +#: extending/extending.rst:1115 msgid "Footnotes" msgstr "Notes" -#: extending/extending.rst:1415 -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:1418 +#: extending/extending.rst:1116 msgid "" "The metaphor of \"borrowing\" a reference is not completely correct: the " "owner still has a copy of the reference." @@ -2095,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:1421 +#: 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 " @@ -2105,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:1425 +#: 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." @@ -2114,6 +1665,371 @@ 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 " diff --git a/extending/first-extension-module.po b/extending/first-extension-module.po new file mode 100644 index 0000000000..3fef01c153 --- /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 683842f572..44e1293d40 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: 2025-10-17 09:58+0200\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,11 +42,12 @@ 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 "" @@ -54,7 +58,7 @@ msgstr "" "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`." @@ -63,16 +67,37 @@ msgstr "" "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. Some :ref:`third party tools ` " -"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 " @@ -81,11 +106,34 @@ msgstr "" "approches plus simples et plus élaborées pour créer des extensions C et C++ " "pour Python." -#: extending/index.rst:35 -msgid "Creating extensions without third party tools" -msgstr "Création d'extensions sans outils tiers" +#: extending/index.rst:65 +msgid "" +"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 "" + +#: extending/index.rst:74 +msgid "" +"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 "" + +#: extending/index.rst:79 +msgid ":ref:`first-extension-module`" +msgstr "" + +#: extending/index.rst:83 +msgid "Guides for intermediate topics" +msgstr "" -#: extending/index.rst:37 +#: 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 " @@ -97,15 +145,31 @@ msgstr "" "ces outils, plus que d'être une méthode recommandée pour créer votre propre " "extension C." -#: extending/index.rst:44 -msgid ":pep:`489` -- Multi-phase extension module initialization" +#: 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:57 +#: 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:59 +#: 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 " @@ -117,6 +181,13 @@ msgstr "" "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 `_" diff --git a/extending/newtypes.po b/extending/newtypes.po index 7384749275..ae9e06d7b9 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: 2025-10-17 09:58+0200\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" @@ -814,13 +814,17 @@ msgid "" msgstr "" #: 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:572 +#: extending/newtypes.rst:574 #, fuzzy msgid "" "The only further addition is that ``tp_dealloc`` needs to clear any weak " @@ -830,11 +834,11 @@ msgstr "" "référence faible (en appelant :c:func:`PyObject_ClearWeakRefs`) si le champ " "est non ``NULL`` ::" -#: extending/newtypes.rst:586 +#: extending/newtypes.rst:588 msgid "More Suggestions" msgstr "Plus de suggestions" -#: extending/newtypes.rst:588 +#: 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` " @@ -849,7 +853,7 @@ msgstr "" "``tp_richcompare``). Vous trouverez des exemples de la fonction que vous " "voulez implémenter." -#: extending/newtypes.rst:594 +#: 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 " @@ -859,21 +863,21 @@ msgstr "" "du type que vous implémentez, utilisez la " "fonction :c:func:`PyObject_TypeCheck`. Voici un exemple de son utilisation ::" -#: extending/newtypes.rst:604 +#: extending/newtypes.rst:606 msgid "Download CPython source releases." msgstr "Télécharger les versions sources de *CPython*." -#: extending/newtypes.rst:605 +#: extending/newtypes.rst:607 msgid "https://www.python.org/downloads/source/" msgstr "https://www.python.org/downloads/source/" -#: extending/newtypes.rst:607 +#: 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:608 +#: extending/newtypes.rst:610 msgid "https://github.com/python/cpython" msgstr "https://github.com/python/cpython" diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index d2ae1596db..7f6a8bcaa3 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: 2025-10-17 09:58+0200\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,11 +33,11 @@ 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 " @@ -58,7 +58,7 @@ msgstr "" "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, " @@ -78,7 +78,7 @@ msgstr "" "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 " @@ -91,7 +91,7 @@ msgstr "" "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:" @@ -99,7 +99,7 @@ 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`` " @@ -109,7 +109,7 @@ msgstr "" "``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`` " @@ -120,7 +120,7 @@ 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 define and execute the :mod:`!custom` module: this is the " @@ -131,11 +131,11 @@ msgstr "" "Comment initialiser le module :mod:`custom` : c'est la fonction " "``PyInit_custom`` et la structure associée ``custommodule``." -#: extending/newtypes_tutorial.rst:63 +#: extending/newtypes_tutorial.rst:58 msgid "The first bit is::" msgstr "Commençons par ::" -#: extending/newtypes_tutorial.rst:69 +#: 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 " @@ -154,7 +154,7 @@ msgstr "" "ainsi de permettre l'ajout de champs en :ref:`mode débogage `." # suit un : -#: extending/newtypes_tutorial.rst:78 +#: 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." @@ -163,7 +163,7 @@ msgstr "" "Attention à ne pas l'ajouter par accident : certains compilateurs pourraient " "s'en plaindre." -#: extending/newtypes_tutorial.rst:81 +#: 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 " @@ -173,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:90 +#: 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:103 +#: 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 " @@ -189,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:107 +#: 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 " @@ -201,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:112 +#: 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:116 +#: extending/newtypes_tutorial.rst:111 msgid "" "This line is mandatory boilerplate to initialize the ``ob_base`` field " "mentioned above. ::" @@ -213,7 +213,7 @@ msgstr "" "Cette ligne, obligatoire, initialise le champ ``ob_base`` mentionné " "précédemment. ::" -#: extending/newtypes_tutorial.rst:121 +#: 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:" @@ -222,7 +222,7 @@ msgstr "" "défaut de nos objets, ainsi que dans quelques messages d'erreur, par " "exemple :" -#: extending/newtypes_tutorial.rst:131 +#: extending/newtypes_tutorial.rst:126 #, fuzzy msgid "" "Note that the name is a dotted name that includes both the module name and " @@ -238,7 +238,7 @@ msgstr "" "Nommer correctement son type, avec le point, est important pour le rendre " "compatible avec :mod:`pydoc` et :mod:`pickle`. ::" -#: extending/newtypes_tutorial.rst:140 +#: extending/newtypes_tutorial.rst:135 #, fuzzy msgid "" "This is so that Python knows how much memory to allocate when creating " @@ -251,7 +251,7 @@ msgstr "" "zéro." # suit un : -#: extending/newtypes_tutorial.rst:146 +#: extending/newtypes_tutorial.rst:141 #, fuzzy msgid "" "If you want your type to be subclassable from Python, and your type has the " @@ -276,12 +276,12 @@ msgstr "" "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:156 +#: 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:160 +#: 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, " @@ -292,14 +292,14 @@ msgstr "" "de membres, vous pouvez la combiner à d'autres constantes avec un *OU* " "binaire." -#: extending/newtypes_tutorial.rst:164 +#: 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`. ::" -#: extending/newtypes_tutorial.rst:168 +#: extending/newtypes_tutorial.rst:163 #, fuzzy msgid "" "To enable object creation, we have to provide " @@ -314,7 +314,7 @@ msgstr "" "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:175 +#: extending/newtypes_tutorial.rst:170 #, fuzzy msgid "" "Everything else in the file should be familiar, except for some code " @@ -323,7 +323,7 @@ msgstr "" "Le reste du fichier doit vous être familier, en dehors du code " "de :c:func:`PyInit_custom` ::" -#: extending/newtypes_tutorial.rst:182 +#: extending/newtypes_tutorial.rst:177 #, fuzzy msgid "" "This initializes the :class:`!Custom` type, filling in a number of members " @@ -334,7 +334,7 @@ msgstr "" "valeurs par défaut, tel que :attr:`ob_type` qui valait initialement " "``NULL``. ::" -#: extending/newtypes_tutorial.rst:190 +#: extending/newtypes_tutorial.rst:185 #, fuzzy msgid "" "This adds the type to the module dictionary. This allows us to " @@ -343,7 +343,7 @@ 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:198 +#: extending/newtypes_tutorial.rst:193 #, fuzzy msgid "" "That's it! All that remains is to build it; put the above code in a file " @@ -352,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:203 +#: 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:210 +#: 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:216 +#: extending/newtypes_tutorial.rst:211 #, fuzzy msgid "" "in a shell should produce a file :file:`custom.so` in a subdirectory and " @@ -373,11 +373,11 @@ msgstr "" "devriez pouvoir faire ``import custom`` et jouer avec des objets " "personnalisés." -#: extending/newtypes_tutorial.rst:220 +#: 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:222 +#: 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." @@ -386,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:227 +#: 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:229 +#: extending/newtypes_tutorial.rst:224 #, fuzzy msgid "" "Let's extend the basic example to add some data and methods. Let's also " @@ -401,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:236 +#: 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:238 +#: extending/newtypes_tutorial.rst:233 #, fuzzy msgid "" "The :class:`!Custom` type now has three data attributes in its C struct, " @@ -418,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:242 +#: 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:251 +#: 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::" @@ -431,11 +431,11 @@ 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:263 +#: 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:267 +#: extending/newtypes_tutorial.rst:262 #, fuzzy msgid "" "This method first clears the reference counts of the two Python " @@ -454,7 +454,7 @@ 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:277 +#: extending/newtypes_tutorial.rst:272 #, fuzzy msgid "" "The explicit cast to ``CustomObject *`` above is needed because we defined " @@ -470,20 +470,20 @@ msgstr "" "``PyObject *``. Sinon, le compilateur émet un avertissement. C'est du " "polymorphisme orienté objet, en C !" -#: extending/newtypes_tutorial.rst:285 +#: 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:298 +#: 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:302 +#: 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::" @@ -491,11 +491,11 @@ 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:326 +#: 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:330 +#: extending/newtypes_tutorial.rst:325 #, fuzzy msgid "" "The ``tp_new`` handler is responsible for creating (as opposed to " @@ -516,7 +516,7 @@ msgstr "" "le gestionnaire ``tp_new`` pour initialiser les attributs ``first`` et " "``last`` à des valeurs par défaut non ``NULL``." -#: extending/newtypes_tutorial.rst:338 +#: 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 " @@ -533,7 +533,7 @@ msgstr "" "arguments aux méthodes d'initialisation (alias ``tp_init`` en C ou " "``__init__`` en Python)." -#: extending/newtypes_tutorial.rst:346 +#: extending/newtypes_tutorial.rst:341 msgid "" "``tp_new`` shouldn't call ``tp_init`` explicitly, as the interpreter will do " "it itself." @@ -541,7 +541,7 @@ msgstr "" "``tp_new`` ne doit pas appeler ``tp_init`` explicitement, car l'interpréteur " "le fera lui-même." -#: extending/newtypes_tutorial.rst:349 +#: extending/newtypes_tutorial.rst:344 msgid "" "The ``tp_new`` implementation calls the :c:member:`~PyTypeObject.tp_alloc` " "slot to allocate memory::" @@ -550,7 +550,7 @@ msgstr "" "l'emplacement :c:member:`~PyTypeObject.tp_alloc` pour allouer de la " "mémoire ::" -#: extending/newtypes_tutorial.rst:354 +#: extending/newtypes_tutorial.rst:349 msgid "" "Since memory allocation may fail, we must check " "the :c:member:`~PyTypeObject.tp_alloc` result against ``NULL`` before " @@ -560,7 +560,7 @@ msgstr "" "résultat :c:member:`~PyTypeObject.tp_alloc` par rapport à ``NULL`` avant de " "continuer." -#: extending/newtypes_tutorial.rst:358 +#: 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 " @@ -572,7 +572,7 @@ 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:364 +#: extending/newtypes_tutorial.rst:359 #, fuzzy msgid "" "If you are creating a co-operative :c:member:`~PyTypeObject.tp_new` (one " @@ -598,7 +598,7 @@ msgstr "" "pas créer d'instances de telles sous-classes sans obtenir " "une :exc:`TypeError`.)" -#: extending/newtypes_tutorial.rst:374 +#: extending/newtypes_tutorial.rst:369 msgid "" "We also define an initialization function which accepts arguments to provide " "initial values for our instance::" @@ -606,11 +606,11 @@ 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:404 +#: 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:408 +#: extending/newtypes_tutorial.rst:403 #, fuzzy msgid "" "The :c:member:`~PyTypeObject.tp_init` slot is exposed in Python as " @@ -624,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:413 +#: extending/newtypes_tutorial.rst:408 #, fuzzy msgid "" "Unlike the ``tp_new`` handler, there is no guarantee that ``tp_init`` is " @@ -644,7 +644,7 @@ msgstr "" "pourrait être tenté, par exemple, d'affecter le membre ``first`` comme " "ceci ::" -#: extending/newtypes_tutorial.rst:427 +#: extending/newtypes_tutorial.rst:422 #, fuzzy msgid "" "But this would be risky. Our type doesn't restrict the type of the " @@ -661,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:434 +#: 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 " @@ -671,11 +671,11 @@ 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:438 +#: 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:440 +#: extending/newtypes_tutorial.rst:435 #, fuzzy msgid "" "when we know that deallocation of the object [#]_ will neither detach " @@ -686,7 +686,7 @@ msgstr "" "libérera pas le :term:`GIL` ni ne provoquera de rappel dans le code de notre " "type ;" -#: extending/newtypes_tutorial.rst:443 +#: 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 " @@ -696,7 +696,7 @@ msgstr "" "gestionnaire :c:member:`~PyTypeObject.tp_dealloc` sur un type qui ne prend " "pas en charge le ramasse-miettes cyclique [#]_." -#: extending/newtypes_tutorial.rst:446 +#: 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::" @@ -705,14 +705,14 @@ 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:459 +#: 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` ::" -#: extending/newtypes_tutorial.rst:463 +#: 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 " @@ -722,7 +722,7 @@ msgstr "" "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:467 +#: 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 " @@ -741,7 +741,7 @@ msgstr "" "les membres peuvent être définis sur ``NULL`` si les attributs sont " "supprimés." -#: extending/newtypes_tutorial.rst:474 +#: extending/newtypes_tutorial.rst:469 #, fuzzy msgid "" "We define a single method, :meth:`!Custom.name`, that outputs the objects " @@ -750,7 +750,7 @@ 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:492 +#: extending/newtypes_tutorial.rst:487 #, fuzzy msgid "" "The method is implemented as a C function that takes a :class:`!Custom` " @@ -768,7 +768,7 @@ msgstr "" "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:504 +#: extending/newtypes_tutorial.rst:499 #, fuzzy msgid "" "Note that we have to check for the possibility that our :attr:`!first` " @@ -783,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:510 +#: extending/newtypes_tutorial.rst:505 msgid "" "Now that we've defined the method, we need to create an array of method " "definitions::" @@ -791,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:520 +#: 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*)" @@ -799,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:523 +#: 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:527 +#: 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 " @@ -818,7 +818,7 @@ msgstr "" "macro :c:macro:`Py_TPFLAGS_BASETYPE` à notre définition d'indicateur de " "classe ::" -#: extending/newtypes_tutorial.rst:534 +#: extending/newtypes_tutorial.rst:529 #, fuzzy msgid "" "We rename :c:func:`!PyInit_custom` to :c:func:`!PyInit_custom2`, update the " @@ -829,22 +829,22 @@ 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:538 +#: 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:548 +#: extending/newtypes_tutorial.rst:543 msgid "and then we re-install so that we can ``import custom2``:" msgstr "" -#: extending/newtypes_tutorial.rst:555 +#: 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:557 +#: extending/newtypes_tutorial.rst:552 #, fuzzy msgid "" "In this section, we'll provide finer control over how the :attr:`!first` " @@ -860,7 +860,7 @@ msgstr "" "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:566 +#: extending/newtypes_tutorial.rst:561 #, fuzzy msgid "" "To provide greater control, over the :attr:`!first` and :attr:`!last` " @@ -872,7 +872,7 @@ msgstr "" "mutateur (*setter*) personnalisées. Voici les fonctions pour obtenir et " "définir l'attribut :attr:`first` ::" -#: extending/newtypes_tutorial.rst:599 +#: extending/newtypes_tutorial.rst:594 #, fuzzy msgid "" "The getter function is passed a :class:`!Custom` object and a \"closure\", " @@ -890,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:605 +#: extending/newtypes_tutorial.rst:600 #, fuzzy msgid "" "The setter function is passed the :class:`!Custom` object, the new value, " @@ -903,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:610 +#: 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:620 +#: 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:624 +#: 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 " @@ -922,12 +922,12 @@ msgstr "" "mentionnée ci-dessus. Dans ce cas, nous n'utilisons pas de fermeture, nous " "passons donc simplement ``NULL``." -#: extending/newtypes_tutorial.rst:627 +#: 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:635 +#: 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::" @@ -936,7 +936,7 @@ msgstr "" "gestionnaire :c:member:`~PyTypeObject.tp_init` pour autoriser uniquement le " "passage des chaînes [#]_ ::" -#: extending/newtypes_tutorial.rst:665 +#: 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 " @@ -953,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:672 +#: 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 " @@ -964,11 +964,11 @@ msgstr "" "précédemment, et nous ajoutons une définition supplémentaire au " "fichier :file:`setup.py`." -#: extending/newtypes_tutorial.rst:678 +#: extending/newtypes_tutorial.rst:673 msgid "Supporting cyclic garbage collection" msgstr "Prise en charge du ramasse-miettes cyclique" -#: extending/newtypes_tutorial.rst:680 +#: 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. " @@ -979,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:690 +#: 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 " @@ -992,7 +992,7 @@ msgstr "" "cyclique de Python finira par comprendre que la liste est un déchet et la " "libérera." -#: extending/newtypes_tutorial.rst:695 +#: extending/newtypes_tutorial.rst:690 #, fuzzy msgid "" "In the second version of the :class:`!Custom` example, we allowed any kind " @@ -1009,7 +1009,7 @@ msgstr "" "peuvent ajouter des attributs arbitraires. Pour l'une de ces deux raisons, " "les objets :class:`Custom` peuvent produire des cycles :" -#: extending/newtypes_tutorial.rst:709 +#: extending/newtypes_tutorial.rst:704 #, fuzzy msgid "" "To allow a :class:`!Custom` instance participating in a reference cycle to " @@ -1022,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:716 +#: extending/newtypes_tutorial.rst:711 msgid "" "First, the traversal method lets the cyclic GC know about subobjects that " "could participate in cycles::" @@ -1031,7 +1031,7 @@ msgstr "" "miettes cyclique de connaître les sous-objets qui pourraient conduire à des " "cycles ::" -#: extending/newtypes_tutorial.rst:737 +#: extending/newtypes_tutorial.rst:732 #, fuzzy msgid "" "For each subobject that can participate in cycles, we need to call " @@ -1046,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:743 +#: 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 " @@ -1057,7 +1057,7 @@ msgstr "" "quantité de code générique dans ``Custom_traverse`` ::" # suit un : -#: extending/newtypes_tutorial.rst:757 +#: 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`." @@ -1065,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:760 +#: extending/newtypes_tutorial.rst:755 msgid "" "Second, we need to provide a method for clearing any subobjects that can " "participate in cycles::" @@ -1073,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:772 +#: 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 " @@ -1091,11 +1091,11 @@ msgstr "" "références)." # suit un : -#: extending/newtypes_tutorial.rst:780 +#: 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:787 +#: 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-" @@ -1105,7 +1105,7 @@ msgstr "" "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:791 +#: 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. " @@ -1123,14 +1123,14 @@ msgstr "" "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:806 +#: 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:810 +#: extending/newtypes_tutorial.rst:805 msgid "" "That's pretty much it. If we had written " "custom :c:member:`~PyTypeObject.tp_alloc` " @@ -1144,11 +1144,11 @@ msgstr "" "pour le ramasse-miettes cyclique. La plupart des extensions utilisent les " "versions fournies automatiquement." -#: extending/newtypes_tutorial.rst:816 +#: extending/newtypes_tutorial.rst:811 msgid "Subclassing other types" msgstr "Sous-classement d'autres types" -#: extending/newtypes_tutorial.rst:818 +#: 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 " @@ -1161,7 +1161,7 @@ msgstr "" "peut être difficile de partager ces structures :c:type:`PyTypeObject` entre " "modules d'extension." -#: extending/newtypes_tutorial.rst:823 +#: extending/newtypes_tutorial.rst:818 #, fuzzy msgid "" "In this example we will create a :class:`!SubList` type that inherits from " @@ -1174,7 +1174,7 @@ msgstr "" "avec les listes natives, mais aura une méthode " "supplémentaire :meth:`increment` qui augmente un compteur interne :" -#: extending/newtypes_tutorial.rst:843 +#: extending/newtypes_tutorial.rst:838 #, fuzzy msgid "" "As you can see, the source code closely resembles the :class:`!Custom` " @@ -1185,7 +1185,7 @@ msgstr "" "exemples :class:`Custom` des sections précédentes. Analysons les principales " "différences ::" -#: extending/newtypes_tutorial.rst:851 +#: 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 " @@ -1195,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:855 +#: extending/newtypes_tutorial.rst:850 #, fuzzy msgid "" "When a Python object is a :class:`!SubList` instance, its ``PyObject *`` " @@ -1206,7 +1206,7 @@ msgstr "" "``PyObject *`` peut être trans-typé en toute sécurité vers ``PyListObject " "*`` et ``SubListObject *`` ::" -#: extending/newtypes_tutorial.rst:868 +#: extending/newtypes_tutorial.rst:863 #, fuzzy msgid "" "We see above how to call through to the :meth:`~object.__init__` method of " @@ -1215,7 +1215,7 @@ msgstr "" "Nous voyons ci-dessus comment appeler la méthode :attr:`__init__` du type " "père." -#: extending/newtypes_tutorial.rst:871 +#: extending/newtypes_tutorial.rst:866 msgid "" "This pattern is important when writing a type with " "custom :c:member:`~PyTypeObject.tp_new` " @@ -1232,7 +1232,7 @@ msgstr "" "laisser la classe mère gérer ça en appelant sa " "propre :c:member:`~PyTypeObject.tp_new`." -#: extending/newtypes_tutorial.rst:877 +#: extending/newtypes_tutorial.rst:872 #, fuzzy msgid "" "The :c:type:`PyTypeObject` struct supports " @@ -1248,7 +1248,7 @@ msgstr "" "à :c:type:`PyList_Type` ; cela doit être fait plus tard dans la fonction " "d'initialisation du module ::" -#: extending/newtypes_tutorial.rst:898 +#: 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 " @@ -1263,7 +1263,7 @@ msgstr "" "avec :c:func:`PyType_GenericNew` – la fonction d'allocation du type père " "sera héritée." -#: extending/newtypes_tutorial.rst:904 +#: extending/newtypes_tutorial.rst:899 #, fuzzy msgid "" "After that, calling :c:func:`PyType_Ready` and adding the type object to the " @@ -1272,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:909 +#: extending/newtypes_tutorial.rst:904 msgid "Footnotes" msgstr "Notes" -#: extending/newtypes_tutorial.rst:910 +#: 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." @@ -1284,7 +1284,7 @@ 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:913 +#: 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." @@ -1293,7 +1293,7 @@ msgstr "" "gestionnaire :c:member:`~PyTypeObject.tp_dealloc` dans cet exemple, car " "notre type ne prend pas en charge le ramasse-miettes." -#: extending/newtypes_tutorial.rst:916 +#: 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 " @@ -1310,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:922 +#: 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 " diff --git a/extending/windows.po b/extending/windows.po index a2f1a05e12..b19c0b5fe6 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: 2025-10-17 09:58+0200\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" @@ -94,7 +94,7 @@ msgstr "" 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,7 +155,7 @@ 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 " @@ -181,7 +181,7 @@ 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 " @@ -202,7 +202,7 @@ msgstr "" "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. " @@ -214,17 +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:101 +#: 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:110 +#: extending/windows.rst:107 msgid "Using DLLs in Practice" msgstr "Utiliser les DLL en pratique" -#: extending/windows.rst:115 +#: 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." @@ -233,12 +233,12 @@ msgstr "" "d'autres compilateurs pourrait fonctionner, ou pas. Le reste de cette " "section est spécifique à MSVC++." -#: extending/windows.rst:118 +#: extending/windows.rst:112 msgid "" "When creating DLLs in Windows, you can use the CPython library in two ways:" msgstr "" -#: extending/windows.rst:120 +#: extending/windows.rst:114 msgid "" "By default, inclusion of :file:`PC/pyconfig.h` directly or " "via :file:`Python.h` triggers an implicit, configure-aware link with the " @@ -247,7 +247,7 @@ msgid "" "with the :ref:`Limited API ` enabled." msgstr "" -#: extending/windows.rst:144 +#: extending/windows.rst:138 #, fuzzy msgid "" "To build two DLLs, spam and ni (which uses C functions found in spam), you " @@ -258,7 +258,7 @@ msgstr "" "ni (qui utilisent des fonctions C trouvées dans spam), vous pouvez utiliser " "ces commandes ::" -#: extending/windows.rst:132 +#: extending/windows.rst:126 #, fuzzy msgid "" "The first command created three files: :file:`spam.obj`, :file:`spam.dll` " @@ -272,7 +272,7 @@ msgstr "" "(telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver le " "code Python grâce à :file:`pythonXY.lib`." -#: extending/windows.rst:155 +#: 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 " @@ -282,13 +282,13 @@ msgstr "" "qui sait comment trouver les fonctions nécessaires dans spam, ainsi qu'à " "partir de l'exécutable Python." -#: extending/windows.rst:141 +#: 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:150 +#: 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 " @@ -301,7 +301,7 @@ msgstr "" "(telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver le " "code Python grâce à :file:`pythonXY.lib`." -#: extending/windows.rst:159 +#: 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 " @@ -314,7 +314,7 @@ msgstr "" "``void _declspec(dllexport) initspam(void)`` ou ``PyObject " "_declspec(dllexport) *NiGetSpamData(void)``." -#: extending/windows.rst:164 +#: extending/windows.rst:158 #, fuzzy msgid "" "Developer Studio will throw in a lot of import libraries that you do not " diff --git a/faq/design.po b/faq/design.po index bfa619a753..868ff11715 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: 2025-10-17 09:58+0200\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" @@ -822,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 " @@ -836,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 " @@ -853,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." @@ -861,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 " @@ -874,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 " @@ -890,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 " @@ -915,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 " @@ -942,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 " @@ -954,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.::" @@ -967,7 +970,7 @@ 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 " @@ -979,7 +982,7 @@ msgstr "" "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 " @@ -990,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 " @@ -1003,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 " @@ -1021,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 " @@ -1039,7 +1042,7 @@ msgstr "" "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 " @@ -1049,7 +1052,7 @@ 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, " @@ -1063,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 " @@ -1077,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 " @@ -1097,7 +1100,7 @@ msgstr "" "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 " @@ -1109,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 " @@ -1127,7 +1130,7 @@ 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` " @@ -1144,7 +1147,7 @@ msgstr "" "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." @@ -1152,7 +1155,7 @@ 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 " @@ -1173,7 +1176,7 @@ 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 " @@ -1195,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 " @@ -1210,11 +1213,11 @@ 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 " @@ -1233,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 " @@ -1247,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 " @@ -1257,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 " @@ -1273,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 " @@ -1291,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::" @@ -1300,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, " @@ -1324,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 " @@ -1341,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 " @@ -1355,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``. " @@ -1374,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 " @@ -1385,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 " @@ -1399,19 +1402,19 @@ 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 " @@ -1426,13 +1429,13 @@ msgstr "" "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::" @@ -1440,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 " @@ -1454,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 " @@ -1466,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::" @@ -1480,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 " @@ -1497,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::" @@ -1505,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 " @@ -1515,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." diff --git a/faq/general.po b/faq/general.po index 0e454d7664..b2234f9917 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: 2025-10-17 09:58+0200\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" @@ -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 à " diff --git a/faq/programming.po b/faq/programming.po index c7bd39919c..c7bbaecf65 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: 2025-10-17 09:58+0200\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,18 +24,19 @@ 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." @@ -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,7 +340,7 @@ 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:" @@ -348,12 +348,12 @@ msgstr "" "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`" -#: 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`" -#: 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,11 +738,11 @@ 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 " @@ -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,14 +799,14 @@ 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:`~sequence.append`, the content of the mutable " @@ -813,11 +818,11 @@ msgstr "" "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." -#: 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." -#: 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,7 +1035,7 @@ 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::" @@ -1034,15 +1043,15 @@ 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 " @@ -1053,11 +1062,11 @@ msgstr "" "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 " @@ -1070,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 " @@ -1084,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 " @@ -1096,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:" @@ -1104,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 -- " @@ -1116,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!" @@ -1124,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::" @@ -1142,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::" @@ -1172,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 ``... " @@ -1182,13 +1192,13 @@ 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 " @@ -1198,17 +1208,17 @@ msgstr "" "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 " @@ -1226,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 " @@ -1236,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 " @@ -1254,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 " @@ -1265,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::" @@ -1277,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 " @@ -1287,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 " @@ -1301,13 +1311,13 @@ 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::" @@ -1316,7 +1326,7 @@ msgstr "" "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." @@ -1324,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`. " @@ -1356,7 +1366,7 @@ msgstr "" "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 " @@ -1372,29 +1382,31 @@ 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 " @@ -1404,16 +1416,17 @@ msgstr "" "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 " @@ -1422,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 " @@ -1445,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." @@ -1457,17 +1470,17 @@ 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 " @@ -1476,7 +1489,7 @@ 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 " @@ -1490,7 +1503,7 @@ 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." @@ -1498,16 +1511,16 @@ msgstr "" "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 +#: 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 " @@ -1525,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." @@ -1533,45 +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 +#: 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 " @@ -1579,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`." @@ -1607,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." @@ -1616,7 +1630,7 @@ 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)." @@ -1625,7 +1639,7 @@ msgstr "" "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)." @@ -1633,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 " @@ -1643,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 " @@ -1653,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 " @@ -1663,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." @@ -1671,7 +1685,7 @@ 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 " @@ -1690,7 +1704,7 @@ msgstr "" "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, " @@ -1704,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 " @@ -1725,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 `_." @@ -1733,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 " @@ -1752,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::" @@ -1761,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`)" -#: 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 ``+=`` " @@ -1777,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." @@ -1794,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 " @@ -1807,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, " @@ -1820,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 " @@ -1838,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 " @@ -1849,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." @@ -1865,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::" @@ -1888,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." @@ -1905,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 " @@ -1943,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 " @@ -1956,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 " @@ -1976,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 " @@ -2008,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::" @@ -2016,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::" @@ -2025,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." @@ -2033,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, " +"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 " @@ -2070,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 " @@ -2080,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, " @@ -2098,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::" @@ -2106,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." @@ -2114,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::" @@ -2126,7 +2147,7 @@ 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 " @@ -2145,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 " @@ -2161,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 " @@ -2178,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?" @@ -2186,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 " @@ -2198,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, " @@ -2230,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. " @@ -2248,11 +2270,11 @@ 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 " @@ -2262,11 +2284,11 @@ msgstr "" "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, " @@ -2279,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?" @@ -2291,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 " @@ -2307,12 +2330,14 @@ 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 " "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 " @@ -2321,7 +2346,7 @@ msgstr "" "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 " @@ -2338,7 +2363,7 @@ msgstr "" "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::" @@ -2346,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 " @@ -2365,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 " @@ -2375,7 +2401,7 @@ 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 " @@ -2393,7 +2419,7 @@ 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 " @@ -2408,7 +2434,7 @@ msgstr "" "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:`!" @@ -2419,13 +2445,13 @@ msgstr "" "``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." 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?" @@ -2433,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 " @@ -2450,18 +2476,19 @@ msgstr "" "``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. " @@ -2469,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." @@ -2483,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::" @@ -2492,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 " @@ -2503,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 " @@ -2516,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::" @@ -2528,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." @@ -2537,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." @@ -2549,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::" @@ -2561,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 " @@ -2599,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 " @@ -2617,7 +2646,7 @@ 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." @@ -2625,17 +2654,17 @@ 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 " @@ -2646,19 +2675,19 @@ msgstr "" "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 " @@ -2673,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 " @@ -2691,7 +2720,7 @@ msgstr "" "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 " @@ -2704,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 " @@ -2713,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 " @@ -2728,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 " @@ -2748,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 " @@ -2760,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)``." @@ -2772,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 " @@ -2785,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 " @@ -2795,7 +2824,7 @@ 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 "" "Assignments create new names but do not change object identity. After the " @@ -2805,7 +2834,7 @@ msgstr "" "objets. Après l'affectation ``nouveau = ancien``, ``nouveau is ancien`` vaut " "toujours ``True``." -#: faq/programming.rst:1873 +#: faq/programming.rst:1881 #, fuzzy msgid "" "Putting an object in a container that stores object references does not " @@ -2817,7 +2846,7 @@ 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 "" "If an object is a singleton, it means that only one instance of that object " @@ -2828,7 +2857,7 @@ msgstr "" "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 " @@ -2841,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:" @@ -2856,7 +2885,7 @@ msgstr "" "utiliser correctement les tests d'identité dans certaines situations " "particulières :" -#: faq/programming.rst:1908 +#: faq/programming.rst:1916 #, fuzzy msgid "" "As recommended by :pep:`8`, an identity test is the preferred way to check " @@ -2868,7 +2897,7 @@ msgstr "" "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 "" "Detecting optional arguments can be tricky when ``None`` is a valid input " @@ -2882,7 +2911,7 @@ msgstr "" "« sentinelle », distinct de toute valeur acceptable. Voici par exemple " "comment écrire une méthode qui émule :meth:`dict.pop` :" -#: faq/programming.rst:1930 +#: faq/programming.rst:1938 #, fuzzy msgid "" "Container implementations sometimes need to augment equality tests with " @@ -2894,7 +2923,7 @@ msgstr "" "souhaité avec les objets comme ``float('NaN')`` qui ne sont pas égaux à eux-" "mêmes." -#: faq/programming.rst:1934 +#: faq/programming.rst:1942 #, fuzzy msgid "" "For example, here is the implementation of :meth:`!" @@ -2903,13 +2932,13 @@ msgstr "" "Par exemple, l'implémentation " "de :meth:`collections.abc.Sequence.__contains__` est ::" -#: faq/programming.rst:1945 +#: 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:1947 +#: faq/programming.rst:1955 #, fuzzy msgid "" "When subclassing an immutable type, override the :meth:`~object.__new__` " @@ -2923,7 +2952,7 @@ msgstr "" "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:1952 +#: faq/programming.rst:1960 msgid "" "All of these immutable classes have a different signature than their parent " "class:" @@ -2931,15 +2960,15 @@ msgstr "" "Toutes les classes d'objets immuables suivantes ont des signatures de " "constructeur différentes de leur classe mère :" -#: faq/programming.rst:1978 +#: faq/programming.rst:1986 msgid "The classes can be used like this:" msgstr "Ces classes s'utilisent comme ceci :" -#: faq/programming.rst:1995 +#: 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:1997 +#: faq/programming.rst:2005 msgid "" "The two principal tools for caching methods " "are :func:`functools.cached_property` and :func:`functools.lru_cache`. The " @@ -2951,17 +2980,18 @@ msgstr "" "valeurs au niveau de l'instance, et :func:`functools.lru_cache`, qui le fait " "au niveau de la classe." -#: faq/programming.rst:2002 +#: 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:2006 +#: 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 " @@ -2972,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:2011 +#: 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 "" @@ -2983,7 +3014,7 @@ msgstr "" "l'instance, sauf à passer par des circonvolutions pour que la référence soit " "faible." -#: faq/programming.rst:2015 +#: 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 " @@ -2997,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:2020 +#: faq/programming.rst:2028 msgid "This example shows the various techniques::" msgstr "Voici une démonstration des différentes techniques ::" -#: faq/programming.rst:2044 +#: 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 " @@ -3012,11 +3044,11 @@ msgstr "" "``cached_property`` ne peut pas fonctionner car elle ne peut pas détecter " "les mutations pour invalider le cache." -#: faq/programming.rst:2049 +#: 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__` " +"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 "" @@ -3024,15 +3056,15 @@ msgstr "" "méthodes ``__eq__`` et ``__hash__`` pour que le cache soit à même de " "détecter toute modification des attributs ::" -#: faq/programming.rst:2075 +#: faq/programming.rst:2083 msgid "Modules" msgstr "Modules" -#: faq/programming.rst:2078 +#: faq/programming.rst:2086 msgid "How do I create a .pyc file?" msgstr "Comment créer des fichiers ``.pyc`` ?" -#: faq/programming.rst:2080 +#: 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 " @@ -3050,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:2088 +#: 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 " @@ -3065,11 +3097,12 @@ 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:2093 +#: 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 "" @@ -3079,9 +3112,10 @@ msgstr "" "dans ce sous-répertoire, à moins que la variable " "d'environnement :envvar:`PYTHONDONTWRITEBYTECODE` soit définie." -#: faq/programming.rst:2098 +#: faq/programming.rst:2106 +#, fuzzy msgid "" -"Running Python on a top level script is not considered an import and no " +"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 " @@ -3095,7 +3129,7 @@ msgstr "" "console), un fichier ``.pyc`` est créé pour ``xyz`` mais pas pour ``foo`` " "car ``foo.py`` n'est pas importé." -#: faq/programming.rst:2105 +#: 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 " @@ -3105,7 +3139,7 @@ msgstr "" "``.pyc`` pour un module qui n'est pas importé — il existe les " "modules :mod:`py_compile` et :mod:`compileall`." -#: faq/programming.rst:2109 +#: 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::" @@ -3114,17 +3148,18 @@ msgstr "" "manuellement. Il est ainsi possible d'appeler la fonction ``compile()`` de " "manière interactive ::" -#: faq/programming.rst:2115 +#: 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:2119 +#: 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 " @@ -3136,11 +3171,11 @@ msgstr "" "en exécutant ``compileall.py`` avec le chemin du dossier contenant les " "fichiers Python à compiler ::" -#: faq/programming.rst:2128 +#: faq/programming.rst:2136 msgid "How do I find the current module name?" msgstr "Comment obtenir le nom du module actuel ?" -#: faq/programming.rst:2130 +#: 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 " @@ -3155,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:2145 +#: 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:2147 +#: faq/programming.rst:2155 msgid "Suppose you have the following modules:" msgstr "Considérons les modules suivants :" -#: faq/programming.rst:2149 +#: faq/programming.rst:2157 msgid ":file:`foo.py`::" msgstr ":file:`foo.py` ::" -#: faq/programming.rst:2154 +#: faq/programming.rst:2162 msgid ":file:`bar.py`::" msgstr ":file:`bar.py` ::" -#: faq/programming.rst:2159 +#: 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:2161 +#: faq/programming.rst:2169 msgid "main imports ``foo``" msgstr "*main* importe *foo* ;" -#: faq/programming.rst:2162 +#: faq/programming.rst:2170 msgid "Empty globals for ``foo`` are created" msgstr "Les variables globales (vides) de *foo* sont créées ;" -#: faq/programming.rst:2163 +#: faq/programming.rst:2171 msgid "``foo`` is compiled and starts executing" msgstr "*foo* est compilé et commence à s'exécuter ;" -#: faq/programming.rst:2164 +#: faq/programming.rst:2172 msgid "``foo`` imports ``bar``" msgstr "*foo* importe *bar* ;" -#: faq/programming.rst:2165 +#: faq/programming.rst:2173 msgid "Empty globals for ``bar`` are created" msgstr "Les variables globales (vides) de *bar* sont créées ;" -#: faq/programming.rst:2166 +#: faq/programming.rst:2174 msgid "``bar`` is compiled and starts executing" msgstr "*bar* est compilé et commence à s'exécuter ;" -#: faq/programming.rst:2167 +#: faq/programming.rst:2175 msgid "" "``bar`` imports ``foo`` (which is a no-op since there already is a module " "named ``foo``)" @@ -3207,7 +3242,7 @@ msgstr "" "*bar* importe *foo* (en réalité, rien ne passe car il y a déjà un module " "appelé *foo*) ;" -#: faq/programming.rst:2168 +#: faq/programming.rst:2176 msgid "" "The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set " "``bar.foo_var = foo.foo_var``" @@ -3216,7 +3251,7 @@ msgstr "" "globales de *foo* pour procéder à l'affectation ``bar.foo_var = " "foo.foo_var``." -#: faq/programming.rst:2170 +#: 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." @@ -3224,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:2173 +#: 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." @@ -3232,11 +3267,11 @@ 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:2176 +#: 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:2178 +#: faq/programming.rst:2186 msgid "" "Guido van Rossum recommends avoiding all uses of ``from " "import ...``, and placing all code inside functions. Initializations of " @@ -3250,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:2183 +#: 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:2185 +#: faq/programming.rst:2193 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" @@ -3265,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:2187 +#: faq/programming.rst:2195 msgid "``import`` statements" msgstr "les instructions ``import``" -#: faq/programming.rst:2188 +#: 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:2190 +#: 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." @@ -3284,7 +3319,7 @@ msgstr "" "van Rossum désapprouve cette approche car les importations se trouvent à un " "endroit bizarre, mais cela fonctionne." -#: faq/programming.rst:2193 +#: faq/programming.rst:2201 msgid "" "Matthias Urlichs recommends restructuring your code so that the recursive " "import is not necessary in the first place." @@ -3292,16 +3327,16 @@ msgstr "" "Matthias Urlichs conseille de restructurer le code pour éviter les " "importations récursives." -#: faq/programming.rst:2196 +#: faq/programming.rst:2204 msgid "These solutions are not mutually exclusive." msgstr "Ces solutions peuvent être combinées." -#: faq/programming.rst:2200 +#: 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:2202 +#: faq/programming.rst:2210 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" @@ -3309,7 +3344,7 @@ msgstr "" "Utilisez plutôt la fonction :func:`~importlib.import_module` " "de :mod:`importlib` ::" -#: faq/programming.rst:2209 +#: faq/programming.rst:2217 msgid "" "When I edit an imported module and reimport it, the changes don't show up. " "Why does this happen?" @@ -3317,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:2211 +#: 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 " @@ -3332,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:2221 +#: 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:2226 +#: 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 " @@ -3352,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:2239 +#: faq/programming.rst:2247 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" @@ -3360,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" diff --git a/glossary.po b/glossary.po index 56a50a057d..d5b1786d31 100644 --- a/glossary.po +++ b/glossary.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-10-05 22:23-0600\n" "Last-Translator: James Adjinwa \n" "Language-Team: FRENCH \n" @@ -98,18 +98,18 @@ msgstr "annotation" #: glossary.rst:42 msgid "" -"A function that can be called to retrieve the :term:`annotations " -"` of an object. This function is accessible as " -"the :attr:`~object.__annotate__` attribute of functions, classes, and " -"modules. Annotate functions are a subset of :term:`evaluate functions " -"`." +"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:46 +#: glossary.rst:47 msgid "annotation" msgstr "annotation" -#: glossary.rst:48 +#: 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`." @@ -118,7 +118,7 @@ msgstr "" "fonction ou une valeur de retour. Elle est utilisée par convention " "comme :term:`type hint`." -#: glossary.rst:52 +#: glossary.rst:53 #, fuzzy msgid "" "Annotations of local variables cannot be accessed at runtime, but " @@ -132,7 +132,7 @@ msgstr "" "spécial :attr:`__annotations__` des modules, classes et fonctions, " "respectivement." -#: glossary.rst:57 +#: glossary.rst:58 #, fuzzy msgid "" "See :term:`variable annotation`, :term:`function " @@ -145,11 +145,11 @@ msgstr "" "décrivent cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur les " "bonnes pratiques concernant les annotations." -#: glossary.rst:61 +#: glossary.rst:62 msgid "argument" msgstr "argument" -#: glossary.rst:63 +#: glossary.rst:64 msgid "" "A value passed to a :term:`function` (or :term:`method`) when calling the " "function. There are two kinds of argument:" @@ -157,7 +157,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:66 +#: 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 " @@ -169,7 +169,7 @@ msgstr "" "fonction. Par exemple, ``3`` et ``5`` sont tous les deux des arguments " "nommés dans l'appel à :func:`complex` ici ::" -#: glossary.rst:74 +#: 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 " @@ -181,7 +181,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:83 +#: 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. " @@ -194,7 +194,7 @@ msgstr "" "argument, et c'est la valeur résultante de l'expression qui sera affectée à " "la variable locale." -#: glossary.rst:88 +#: glossary.rst:89 msgid "" "See also the :term:`parameter` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -204,11 +204,11 @@ msgstr "" "question :ref:`Différence entre argument et paramètre ` de la FAQ et la :pep:`362`." -#: glossary.rst:91 +#: glossary.rst:92 msgid "asynchronous context manager" msgstr "gestionnaire de contexte asynchrone" -#: glossary.rst:93 +#: glossary.rst:94 msgid "" "An object which controls the environment seen in an :keyword:`async with` " "statement by defining :meth:`~object.__aenter__` " @@ -219,11 +219,11 @@ msgstr "" "méthodes :meth:`~object.__aenter__` et :meth:`~object.__aexit__`. A été " "Introduit par la :pep:`492`." -#: glossary.rst:96 +#: glossary.rst:97 msgid "asynchronous generator" msgstr "générateur asynchrone" -#: glossary.rst:98 +#: 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 " @@ -236,7 +236,7 @@ msgstr "" "expressions :keyword:`yield` produisant ainsi uns série de valeurs " "utilisables dans une boucle :keyword:`async for`." -#: glossary.rst:103 +#: 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 " @@ -247,7 +247,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:107 +#: glossary.rst:108 msgid "" "An asynchronous generator function may contain :keyword:`await` expressions " "as well as :keyword:`async for`, and :keyword:`async with` statements." @@ -255,17 +255,17 @@ 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:110 +#: glossary.rst:111 msgid "asynchronous generator iterator" msgstr "itérateur de générateur asynchrone" -#: glossary.rst:112 +#: 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:114 +#: 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 " @@ -277,7 +277,7 @@ msgstr "" "le corps de la fonction du générateur asynchrone jusqu'au " "prochain :keyword:`yield`." -#: glossary.rst:119 +#: glossary.rst:120 #, fuzzy msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " @@ -293,11 +293,11 @@ msgstr "" "par :meth:`~object.__anext__`, elle repart de là où elle s'était arrêtée. " "Voir les :pep:`492` et :pep:`525`." -#: glossary.rst:124 +#: glossary.rst:125 msgid "asynchronous iterable" msgstr "itérable asynchrone" -#: glossary.rst:126 +#: 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__` " @@ -307,11 +307,11 @@ msgstr "" "méthode :meth:`~object.__aiter__` doit renvoyer un :term:`asynchronous " "iterator`. A été introduit par la :pep:`492`." -#: glossary.rst:129 +#: glossary.rst:130 msgid "asynchronous iterator" msgstr "itérateur asynchrone" -#: glossary.rst:131 +#: glossary.rst:132 msgid "" "An object that implements the :meth:`~object.__aiter__` " "and :meth:`~object.__anext__` methods. :meth:`~object.__anext__` must " @@ -328,21 +328,35 @@ msgstr "" "exception :exc:`StopAsyncIteration` pour signifier la fin de l'itération. A " "été introduit par la :pep:`492`." -#: glossary.rst:136 -msgid "attached thread state" +#: glossary.rst:137 +msgid "atomic operation" msgstr "" #: glossary.rst:139 +msgid "" +"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 "" + +#: 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:141 +#: 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:145 +#: 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 " @@ -351,21 +365,21 @@ msgid "" "blocking C calls and by the bytecode interpreter in between calls." msgstr "" -#: glossary.rst:152 +#: 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 " +"threaded builds ` of Python, threads can concurrently " +"hold an attached thread state, allowing for true parallelism of the bytecode " "interpreter." msgstr "" -#: glossary.rst:158 +#: glossary.rst:167 msgid "attribute" msgstr "attribut" -#: glossary.rst:160 +#: 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 " @@ -375,7 +389,7 @@ 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:165 +#: 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 " @@ -389,11 +403,11 @@ msgstr "" "accessible à l'aide d'une expression pointée et on devra y accéder " "avec :func:`getattr`." -#: glossary.rst:170 +#: glossary.rst:179 msgid "awaitable" msgstr "attendable (*awaitable*)" -#: glossary.rst:172 +#: 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. " @@ -403,11 +417,11 @@ msgstr "" "être une :term:`coroutine` ou un objet avec une " "méthode :meth:`~object.__await__`. Voir aussi la :pep:`492`." -#: glossary.rst:175 +#: glossary.rst:184 msgid "BDFL" msgstr "BDFL" -#: glossary.rst:177 +#: glossary.rst:186 msgid "" "Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." @@ -416,11 +430,11 @@ msgstr "" "Pseudonyme de `Guido van Rossum `_, le " "créateur de Python." -#: glossary.rst:179 +#: glossary.rst:188 msgid "binary file" msgstr "fichier binaire" -#: glossary.rst:181 +#: glossary.rst:190 #, fuzzy msgid "" "A :term:`file object` able to read and write :term:`bytes-like objects " @@ -435,7 +449,7 @@ msgstr "" "``'rb+'``), :data:`sys.stdin.buffer`, :data:`sys.stdout.buffer`, les " "instances de :class:`io.BytesIO` ou de :class:`gzip.GzipFile`." -#: glossary.rst:188 +#: glossary.rst:197 msgid "" "See also :term:`text file` for a file object able to read and " "write :class:`str` objects." @@ -443,11 +457,11 @@ msgstr "" "Consultez :term:`fichier texte`, un objet fichier capable de lire et " "d'écrire des objets :class:`str`." -#: glossary.rst:190 +#: glossary.rst:199 msgid "borrowed reference" msgstr "référence empruntée" -#: glossary.rst:192 +#: glossary.rst:201 #, fuzzy msgid "" "In Python's C API, a borrowed reference is a reference to an object, where " @@ -461,7 +475,7 @@ msgstr "" "qui conduit à la disparition de la dernière :term:`référence forte` vers " "l'objet." -#: glossary.rst:198 +#: 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 " @@ -476,11 +490,11 @@ msgstr "" "aussi la fonction :c:func:`Py_NewRef`, qui crée une " "nouvelle :term:`référence forte`." -#: glossary.rst:203 +#: glossary.rst:212 msgid "bytes-like object" msgstr "objet octet-compatible" -#: glossary.rst:205 +#: glossary.rst:214 msgid "" "An object that supports the :ref:`bufferobjects` and can export a " "C-:term:`contiguous` buffer. This includes " @@ -497,7 +511,7 @@ msgstr "" "sur des données binaires, comme la compression, la sauvegarde dans un " "fichier binaire ou l'envoi sur le réseau." -#: glossary.rst:212 +#: 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 " @@ -514,11 +528,11 @@ msgstr "" "(« *objets octets-compatibles en lecture seule* »), par exemple " "des :class:`bytes` ou des :class:`memoryview` d'un objet :class:`bytes`." -#: glossary.rst:220 +#: glossary.rst:229 msgid "bytecode" msgstr "code intermédiaire (*bytecode*)" -#: glossary.rst:222 +#: 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 " @@ -539,7 +553,7 @@ 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:232 +#: glossary.rst:241 msgid "" "A list of bytecode instructions can be found in the documentation " "for :ref:`the dis module `." @@ -547,11 +561,11 @@ msgstr "" "La documentation du :ref:`module dis ` fournit une liste des " "instructions du code intermédiaire." -#: glossary.rst:234 +#: glossary.rst:243 msgid "callable" msgstr "appelable (*callable*)" -#: glossary.rst:236 +#: 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::" @@ -559,7 +573,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:241 +#: 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 " @@ -569,11 +583,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:244 +#: glossary.rst:253 msgid "callback" msgstr "fonction de rappel (*callback*)" -#: glossary.rst:246 +#: glossary.rst:255 msgid "" "A subroutine function which is passed as an argument to be executed at some " "point in the future." @@ -581,11 +595,11 @@ msgstr "" "Une fonction (classique, par opposition à une coroutine) passée en argument " "pour être exécutée plus tard." -#: glossary.rst:248 +#: glossary.rst:257 msgid "class" msgstr "classe" -#: glossary.rst:250 +#: glossary.rst:259 msgid "" "A template for creating user-defined objects. Class definitions normally " "contain method definitions which operate on instances of the class." @@ -594,11 +608,11 @@ msgstr "" "classe (*class*) contient normalement des définitions de méthodes qui " "agissent sur les instances de la classe." -#: glossary.rst:253 +#: glossary.rst:262 msgid "class variable" msgstr "variable de classe" -#: glossary.rst:255 +#: 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)." @@ -606,12 +620,12 @@ 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:257 +#: glossary.rst:266 #, fuzzy msgid "closure variable" msgstr "variable de classe" -#: glossary.rst:259 +#: 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 " @@ -620,14 +634,14 @@ msgid "" "if the variable is only being read." msgstr "" -#: glossary.rst:264 +#: 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:275 +#: 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 " @@ -636,11 +650,11 @@ msgid "" "closure variables." msgstr "" -#: glossary.rst:279 +#: glossary.rst:288 msgid "complex number" msgstr "nombre complexe" -#: glossary.rst:281 +#: 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 " @@ -663,24 +677,51 @@ 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:291 +#: 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:293 +#: glossary.rst:318 msgid "" "This term has different meanings depending on where and how it is used. Some " "common meanings:" msgstr "" -#: glossary.rst:296 +#: glossary.rst:321 msgid "" "The temporary state or environment established by a :term:`context manager` " "via a :keyword:`with` statement." msgstr "" -#: glossary.rst:298 +#: glossary.rst:323 msgid "" "The collection of key­value bindings associated with a " "particular :class:`contextvars.Context` object and accessed " @@ -688,38 +729,38 @@ msgid "" "variable`." msgstr "" -#: glossary.rst:302 +#: glossary.rst:327 msgid "" "A :class:`contextvars.Context` object. Also see :term:`current context`." msgstr "" -#: glossary.rst:304 +#: glossary.rst:329 #, fuzzy msgid "context management protocol" msgstr "gestionnaire de contexte" -#: glossary.rst:306 +#: 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:308 +#: glossary.rst:333 msgid "context manager" msgstr "gestionnaire de contexte" -#: glossary.rst:310 +#: 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`." msgstr "" -#: glossary.rst:313 +#: glossary.rst:338 msgid "context variable" msgstr "variable de contexte" -#: glossary.rst:315 +#: 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. " @@ -727,11 +768,11 @@ msgid "" "asynchronous tasks." msgstr "" -#: glossary.rst:319 +#: glossary.rst:344 msgid "contiguous" msgstr "contigu" -#: glossary.rst:323 +#: 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 " @@ -751,11 +792,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:331 +#: glossary.rst:356 msgid "coroutine" msgstr "coroutine" -#: glossary.rst:333 +#: 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 " @@ -768,11 +809,11 @@ msgstr "" "être implémentées en utilisant l'instruction :keyword:`async def`. Voir " "aussi la :pep:`492`." -#: glossary.rst:338 +#: glossary.rst:363 msgid "coroutine function" msgstr "fonction coroutine" -#: glossary.rst:340 +#: 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 " @@ -784,11 +825,11 @@ msgstr "" "mots clés :keyword:`await`, :keyword:`async for` ainsi que :keyword:`async " "with`. A été introduit par la :pep:`492`." -#: glossary.rst:345 +#: glossary.rst:370 msgid "CPython" msgstr "CPython" -#: glossary.rst:347 +#: glossary.rst:372 msgid "" "The canonical implementation of the Python programming language, as " "distributed on `python.org `_. The term \"CPython\" " @@ -800,11 +841,11 @@ msgstr "" "est utilisé dans certains contextes lorsqu'il est nécessaire de distinguer " "cette implémentation des autres comme *Jython* ou *IronPython*." -#: glossary.rst:351 +#: glossary.rst:376 msgid "current context" msgstr "" -#: glossary.rst:353 +#: 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 " @@ -814,11 +855,11 @@ msgid "" "current context whenever the task starts or resumes execution." msgstr "" -#: glossary.rst:359 +#: glossary.rst:384 msgid "cyclic isolate" msgstr "" -#: glossary.rst:361 +#: 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 " @@ -827,11 +868,44 @@ msgid "" "reclaimed." msgstr "" -#: glossary.rst:365 +#: 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:412 msgid "decorator" msgstr "décorateur" -#: glossary.rst:367 +#: glossary.rst:414 msgid "" "A function returning another function, usually applied as a function " "transformation using the ``@wrapper`` syntax. Common examples for " @@ -842,7 +916,7 @@ msgstr "" "``@wrapper``, dont les exemples typiques sont : :func:`classmethod` " "et :func:`staticmethod`." -#: glossary.rst:371 +#: glossary.rst:418 msgid "" "The decorator syntax is merely syntactic sugar, the following two function " "definitions are semantically equivalent::" @@ -850,7 +924,7 @@ msgstr "" "La syntaxe des décorateurs est simplement du sucre syntaxique, les " "définitions des deux fonctions suivantes sont sémantiquement équivalentes ::" -#: glossary.rst:382 +#: 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 " @@ -861,11 +935,11 @@ msgstr "" "et :ref:`définitions de classes ` pour en savoir plus sur les " "décorateurs." -#: glossary.rst:385 +#: glossary.rst:432 msgid "descriptor" msgstr "descripteur" -#: glossary.rst:387 +#: glossary.rst:434 #, fuzzy msgid "" "Any object which defines the " @@ -891,7 +965,7 @@ msgstr "" "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:398 +#: glossary.rst:445 msgid "" "For more information about descriptors' methods, see :ref:`descriptors` or " "the :ref:`Descriptor How To Guide `." @@ -900,11 +974,11 @@ msgstr "" "consultez :ref:`descriptors` ou le :ref:`guide pour l'utilisation des " "descripteurs `." -#: glossary.rst:400 +#: glossary.rst:447 msgid "dictionary" msgstr "dictionnaire" -#: glossary.rst:402 +#: glossary.rst:449 #, fuzzy msgid "" "An associative array, where arbitrary keys are mapped to values. The keys " @@ -915,11 +989,11 @@ msgstr "" "n'importe quel objet possédant les méthodes :meth:`__hash__` " "et :meth:`__eq__`. En Perl, les dictionnaires sont appelés \"*hash*\"." -#: glossary.rst:406 +#: glossary.rst:453 msgid "dictionary comprehension" msgstr "dictionnaire en compréhension (ou dictionnaire en intension)" -#: glossary.rst:408 +#: 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 " @@ -931,11 +1005,11 @@ 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:412 +#: glossary.rst:459 msgid "dictionary view" msgstr "vue de dictionnaire" -#: glossary.rst:414 +#: 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 " @@ -949,11 +1023,11 @@ msgstr "" "change. Pour transformer une vue en vraie liste, utilisez " "``list(dictview)``. Voir :ref:`dict-views`." -#: glossary.rst:420 +#: glossary.rst:467 msgid "docstring" msgstr "chaîne de documentation (*docstring*)" -#: glossary.rst:422 +#: glossary.rst:469 #, fuzzy msgid "" "A string literal which appears as the first expression in a class, function " @@ -968,11 +1042,11 @@ 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:428 +#: glossary.rst:475 msgid "duck-typing" msgstr "typage canard (*duck-typing*)" -#: glossary.rst:430 +#: 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 " @@ -996,23 +1070,23 @@ msgstr "" "*duck-typing* utilise plutôt :func:`hasattr` ou la " "programmation :term:`EAFP`." -#: glossary.rst:439 +#: glossary.rst:486 #, fuzzy msgid "dunder" msgstr "chercheur" -#: glossary.rst:441 +#: 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:444 +#: glossary.rst:491 msgid "EAFP" msgstr "EAFP" -#: glossary.rst:446 +#: 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 " @@ -1029,23 +1103,23 @@ msgstr "" "et :keyword:`except`. Cette technique de programmation contraste avec le " "style :term:`LBYL` utilisé couramment dans les langages tels que C." -#: glossary.rst:452 +#: glossary.rst:499 #, fuzzy msgid "evaluate function" msgstr "fonction clé" -#: glossary.rst:454 +#: 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:457 +#: glossary.rst:504 msgid "expression" msgstr "expression" -#: glossary.rst:459 +#: 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, " @@ -1065,11 +1139,11 @@ msgstr "" "expressions, tel que :keyword:`while`. Les affectations sont également des " "instructions et non des expressions." -#: glossary.rst:466 +#: glossary.rst:513 msgid "extension module" msgstr "module d'extension" -#: glossary.rst:468 +#: 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." @@ -1077,16 +1151,16 @@ 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:470 +#: glossary.rst:517 msgid "f-string" msgstr "f-string" -#: glossary.rst:471 +#: glossary.rst:518 #, fuzzy msgid "f-strings" msgstr "f-string" -#: glossary.rst:473 +#: glossary.rst:520 #, fuzzy msgid "" "String literals prefixed with ``f`` or ``F`` are commonly called \"f-" @@ -1097,11 +1171,11 @@ msgstr "" "raccourci pour :ref:`formatted string literals `. Voir " "la :pep:`498`." -#: glossary.rst:476 +#: glossary.rst:523 msgid "file object" msgstr "objet fichier" -#: glossary.rst:478 +#: glossary.rst:525 #, fuzzy msgid "" "An object exposing a file-oriented API (with methods such as :meth:`!read` " @@ -1119,7 +1193,7 @@ msgstr "" "réseau…). Les objets fichiers sont aussi appelés :dfn:`file-like-objects` " "ou :dfn:`streams`." -#: glossary.rst:486 +#: glossary.rst:533 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -1134,19 +1208,19 @@ msgstr "" "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:491 +#: glossary.rst:538 msgid "file-like object" msgstr "objet fichier-compatible" -#: glossary.rst:493 +#: glossary.rst:540 msgid "A synonym for :term:`file object`." msgstr "Synonyme de :term:`objet fichier`." -#: glossary.rst:494 +#: glossary.rst:541 msgid "filesystem encoding and error handler" msgstr "encodage du système de fichiers et gestionnaire d'erreurs associé" -#: glossary.rst:496 +#: 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." @@ -1155,7 +1229,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:499 +#: 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 " @@ -1165,7 +1239,7 @@ msgstr "" "les octets jusqu'à 128. Si ce n'est pas le cas, certaines fonctions de l'API " "lèvent :exc:`UnicodeError`." -#: glossary.rst:503 +#: glossary.rst:550 msgid "" "The :func:`sys.getfilesystemencoding` " "and :func:`sys.getfilesystemencodeerrors` functions can be used to get the " @@ -1175,7 +1249,7 @@ msgstr "" "fonctions :func:`sys.getfilesystemencoding` " "et :func:`sys.getfilesystemencodeerrors`." -#: glossary.rst:507 +#: glossary.rst:554 msgid "" "The :term:`filesystem encoding and error handler` are configured at Python " "startup by the :c:func:`PyConfig_Read` function: " @@ -1189,15 +1263,15 @@ msgstr "" "et :c:member:`~PyConfig.filesystem_errors` dans les membres " "de :c:type:`PyConfig`." -#: glossary.rst:512 +#: glossary.rst:559 msgid "See also the :term:`locale encoding`." msgstr "Voir aussi :term:`encodage régional`." -#: glossary.rst:513 +#: glossary.rst:560 msgid "finder" msgstr "chercheur" -#: glossary.rst:515 +#: glossary.rst:562 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." @@ -1205,7 +1279,7 @@ msgstr "" "Objet qui essaie de trouver un :term:`chargeur ` pour le module en " "cours d'importation." -#: glossary.rst:518 +#: glossary.rst:565 #, fuzzy msgid "" "There are two types of finder: :term:`meta path finders ` " @@ -1217,17 +1291,17 @@ msgstr "" "avec :data:`sys.meta_path` ; les :term:`chercheurs d'entrée dans path ` à utiliser avec :data:`sys.path_hooks`." -#: glossary.rst:522 +#: 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:523 +#: glossary.rst:570 msgid "floor division" msgstr "division entière" -#: glossary.rst:525 +#: glossary.rst:572 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -1241,11 +1315,11 @@ msgstr "" "4`` vaut ``-3`` car l'arrondi se fait à l'entier inférieur. Voir " "la :pep:`328`." -#: glossary.rst:530 +#: glossary.rst:577 msgid "free threading" msgstr "" -#: glossary.rst:532 +#: glossary.rst:579 msgid "" "A threading model where multiple threads can run Python bytecode " "simultaneously within the same interpreter. This is in contrast to " @@ -1253,12 +1327,26 @@ msgid "" "Python bytecode at a time. See :pep:`703`." msgstr "" -#: glossary.rst:536 +#: 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:538 +#: 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 " @@ -1268,11 +1356,11 @@ msgid "" "variable`." msgstr "" -#: glossary.rst:543 +#: glossary.rst:597 msgid "function" msgstr "fonction" -#: glossary.rst:545 +#: 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 " @@ -1284,15 +1372,15 @@ msgstr "" "corps de la fonction. Voir aussi :term:`paramètre`, :term:`méthode` " "et :ref:`function`." -#: glossary.rst:549 +#: glossary.rst:603 msgid "function annotation" msgstr "annotation de fonction" -#: glossary.rst:551 +#: 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:553 +#: 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 " @@ -1303,13 +1391,13 @@ msgstr "" "devrait prendre deux arguments :class:`int` et devrait également avoir une " "valeur de retour de type :class:`int` ::" -#: glossary.rst:561 +#: 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`." -#: glossary.rst:563 +#: glossary.rst:617 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality. Also see :ref:`annotations-howto` for best practices on " @@ -1319,11 +1407,11 @@ msgstr "" "qui décrivent cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur " "les bonnes pratiques concernant les annotations." -#: glossary.rst:567 +#: glossary.rst:621 msgid "__future__" msgstr "__future__" -#: glossary.rst:569 +#: glossary.rst:623 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " @@ -1343,11 +1431,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:580 +#: glossary.rst:634 msgid "garbage collection" msgstr "ramasse-miettes" -#: glossary.rst:582 +#: 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 " @@ -1360,11 +1448,11 @@ msgstr "" "et casser les références circulaires. Le ramasse-miettes peut être contrôlé " "en utilisant le module :mod:`gc`." -#: glossary.rst:588 +#: glossary.rst:642 msgid "generator" msgstr "générateur" -#: glossary.rst:590 +#: 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 " @@ -1376,7 +1464,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:595 +#: 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 " @@ -1387,15 +1475,15 @@ msgstr "" "cas où le sens voulu n'est pas clair, utiliser les termes complets lève " "l’ambiguïté." -#: glossary.rst:598 +#: glossary.rst:652 msgid "generator iterator" msgstr "itérateur de générateur" -#: glossary.rst:600 +#: glossary.rst:654 msgid "An object created by a :term:`generator` function." msgstr "Objet créé par une fonction :term:`générateur`." -#: glossary.rst:602 +#: glossary.rst:656 #, fuzzy msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " @@ -1409,11 +1497,11 @@ msgstr "" "il en était (contrairement à une fonction qui prendrait un nouveau départ à " "chaque invocation)." -#: glossary.rst:609 +#: glossary.rst:663 msgid "generator expression" msgstr "expression génératrice" -#: glossary.rst:611 +#: glossary.rst:665 #, fuzzy msgid "" "An :term:`expression` that returns an :term:`iterator`. It looks like a " @@ -1426,11 +1514,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:618 +#: glossary.rst:672 msgid "generic function" msgstr "fonction générique" -#: glossary.rst:620 +#: 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 " @@ -1440,7 +1528,7 @@ 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:624 +#: glossary.rst:678 msgid "" "See also the :term:`single dispatch` glossary entry, " "the :func:`functools.singledispatch` decorator, and :pep:`443`." @@ -1448,11 +1536,11 @@ msgstr "" "Voir aussi :term:`single dispatch`, le " "décorateur :func:`functools.singledispatch` et la :pep:`443`." -#: glossary.rst:626 +#: glossary.rst:680 msgid "generic type" msgstr "type générique" -#: glossary.rst:628 +#: glossary.rst:682 msgid "" "A :term:`type` that can be parameterized; typically a :ref:`container " "class` such as :class:`list` or :class:`dict`. Used " @@ -1463,7 +1551,7 @@ msgstr "" "les :term:`indications de type ` et les :term:`annotations " "`." -#: glossary.rst:633 +#: glossary.rst:687 msgid "" "For more details, see :ref:`generic alias types`, :pep:`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` " @@ -1473,19 +1561,19 @@ msgstr "" "genericalias>` et le module :mod:`typing`. On trouvera l'historique de " "cette fonctionnalité dans les :pep:`483`, :pep:`484` et :pep:`585`." -#: glossary.rst:635 +#: glossary.rst:689 msgid "GIL" msgstr "GIL" -#: glossary.rst:637 +#: glossary.rst:691 msgid "See :term:`global interpreter lock`." msgstr "Voir :term:`global interpreter lock`." -#: glossary.rst:638 +#: glossary.rst:692 msgid "global interpreter lock" msgstr "verrou global de l'interpréteur" -#: glossary.rst:640 +#: 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 " @@ -1505,7 +1593,7 @@ msgstr "" "en anglais), au détriment malheureusement de beaucoup du parallélisme " "possible sur les machines ayant plusieurs processeurs." -#: glossary.rst:649 +#: 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 " @@ -1517,7 +1605,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:654 +#: 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 " @@ -1527,18 +1615,32 @@ msgid "" "core CPUs efficiently. For more details, see :pep:`703`." msgstr "" -#: glossary.rst:661 +#: 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:664 +#: 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:666 +#: 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-" @@ -1549,11 +1651,11 @@ msgstr "" "source correspondant pour déterminer sa validité. Voir :ref:`pyc-" "invalidation`." -#: glossary.rst:669 +#: glossary.rst:731 msgid "hashable" msgstr "hachable" -#: glossary.rst:671 +#: glossary.rst:733 #, fuzzy msgid "" "An object is *hashable* if it has a hash value which never changes during " @@ -1567,7 +1669,7 @@ msgstr "" "hachables dont la comparaison par ``__eq__`` est vraie doivent avoir la même " "empreinte." -#: glossary.rst:677 +#: 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." @@ -1576,7 +1678,7 @@ msgstr "" "en tant que membre d'un ensemble (type *set*), car ces structures de données " "utilisent ce *hash*." -#: glossary.rst:680 +#: 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 " @@ -1593,11 +1695,11 @@ 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:687 +#: glossary.rst:749 msgid "IDLE" msgstr "IDLE" -#: glossary.rst:689 +#: 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 " @@ -1607,40 +1709,43 @@ msgstr "" "Python. :ref:`IDLE ` est un éditeur basique et un interpréteur livré " "avec la distribution standard de Python." -#: glossary.rst:692 +#: glossary.rst:754 msgid "immortal" msgstr "" -#: glossary.rst:694 +#: glossary.rst:756 msgid "" "*Immortal objects* are a CPython implementation detail introduced " "in :pep:`683`." msgstr "" -#: glossary.rst:697 +#: 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:701 +#: 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:703 +#: glossary.rst:765 msgid "immutable" msgstr "immuable" -#: glossary.rst:705 +#: 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 " @@ -1648,11 +1753,11 @@ msgstr "" "important quand une valeur de *hash* constante est requise, typiquement en " "clé de dictionnaire." -#: glossary.rst:710 +#: glossary.rst:774 msgid "import path" msgstr "chemin des importations" -#: glossary.rst:712 +#: 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 " @@ -1665,21 +1770,21 @@ msgstr "" "pour les sous-paquets, elle peut aussi venir de l'attribut ``__path__`` du " "paquet parent." -#: glossary.rst:717 +#: glossary.rst:781 msgid "importing" msgstr "importation" -#: glossary.rst:719 +#: 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:721 +#: glossary.rst:785 msgid "importer" msgstr "importateur" -#: glossary.rst:723 +#: glossary.rst:787 msgid "" "An object that both finds and loads a module; both a :term:`finder` " "and :term:`loader` object." @@ -1687,11 +1792,39 @@ msgstr "" "Objet qui trouve et charge un module, en même temps un :term:`chercheur " "` et un :term:`chargeur `." -#: glossary.rst:725 +#: 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:727 +#: glossary.rst:804 #, fuzzy msgid "" "Python has an interactive interpreter which means you can enter statements " @@ -1708,11 +1841,11 @@ msgstr "" "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:734 +#: glossary.rst:811 msgid "interpreted" msgstr "interprété" -#: glossary.rst:736 +#: 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. " @@ -1729,11 +1862,11 @@ msgstr "" "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`." -#: glossary.rst:743 +#: glossary.rst:820 msgid "interpreter shutdown" msgstr "arrêt de l'interpréteur" -#: glossary.rst:745 +#: 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 " @@ -1754,7 +1887,7 @@ msgstr "" "fonctionner, (typiquement les modules des bibliothèques ou le mécanisme de " "*warning*)." -#: glossary.rst:754 +#: glossary.rst:831 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." @@ -1762,11 +1895,11 @@ 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:756 +#: glossary.rst:833 msgid "iterable" msgstr "itérable" -#: glossary.rst:758 +#: glossary.rst:835 #, fuzzy msgid "" "An object capable of returning its members one at a time. Examples of " @@ -1784,7 +1917,7 @@ msgstr "" "ou :meth:`__getitem__` qui implémente la sémantique d'une :term:`séquence " "`." -#: glossary.rst:766 +#: glossary.rst:843 #, fuzzy msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " @@ -1809,11 +1942,11 @@ msgstr "" "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:776 +#: glossary.rst:853 msgid "iterator" msgstr "itérateur" -#: glossary.rst:778 +#: glossary.rst:855 #, fuzzy msgid "" "An object representing a stream of data. Repeated calls to the " @@ -1849,26 +1982,36 @@ msgstr "" "même objet itérateur épuisé utilisé dans son itération précédente, le " "faisant ressembler à un conteneur vide." -#: glossary.rst:793 +#: glossary.rst:870 msgid "More information can be found in :ref:`typeiter`." msgstr "Vous trouverez davantage d'informations dans :ref:`typeiter`." -#: glossary.rst:797 +#: 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." +"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:802 +#: 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:804 +#: 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 " @@ -1879,7 +2022,7 @@ 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:809 +#: glossary.rst:890 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They " @@ -1891,10 +2034,11 @@ msgstr "" "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:815 +#: 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 " +"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`, " @@ -1912,19 +2056,19 @@ msgstr "" "Voir :ref:`le guide pour le tri ` pour des exemples de " "création et d'utilisation de fonctions clefs." -#: glossary.rst:822 +#: glossary.rst:903 msgid "keyword argument" msgstr "argument nommé" -#: glossary.rst:1139 +#: glossary.rst:1292 msgid "See :term:`argument`." msgstr "Voir :term:`argument`." -#: glossary.rst:825 +#: glossary.rst:906 msgid "lambda" msgstr "lambda" -#: glossary.rst:827 +#: 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 " @@ -1935,11 +2079,11 @@ msgstr "" "syntaxe pour créer des fonctions lambda est : ``lambda [parameters]: " "expression``" -#: glossary.rst:830 +#: glossary.rst:911 msgid "LBYL" msgstr "LBYL" -#: glossary.rst:832 +#: 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` " @@ -1951,13 +2095,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:837 +#: 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 " @@ -1967,19 +2113,19 @@ msgstr "" "l'accès. Ce problème peut être résolu avec des verrous (*locks*) ou avec " "l'approche EAFP." -#: glossary.rst:842 +#: glossary.rst:924 msgid "lexical analyzer" msgstr "" -#: glossary.rst:845 +#: glossary.rst:927 msgid "Formal name for the *tokenizer*; see :term:`token`." msgstr "" -#: glossary.rst:846 +#: glossary.rst:928 msgid "list" msgstr "liste" -#: glossary.rst:848 +#: glossary.rst:930 #, fuzzy msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " @@ -1990,11 +2136,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:851 +#: glossary.rst:933 msgid "list comprehension" msgstr "liste en compréhension (ou liste en intension)" -#: glossary.rst:853 +#: 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 " @@ -2010,11 +2156,46 @@ msgstr "" "optionnelle. Si elle est omise, tous les éléments du ``range(256)`` seront " "utilisés." -#: glossary.rst:859 +#: 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:861 +#: glossary.rst:966 #, fuzzy msgid "" "An object that loads a module. It must define the :meth:`!exec_module` " @@ -2028,24 +2209,24 @@ msgstr "" "et :class:`importlib.ABC.Loader` pour sa :term:`classe mère abstraite " "`." -#: glossary.rst:867 +#: glossary.rst:972 msgid ":ref:`finders-and-loaders`" msgstr "" -#: glossary.rst:868 +#: glossary.rst:973 msgid ":class:`importlib.abc.Loader`" msgstr "" -#: glossary.rst:869 +#: glossary.rst:974 #, fuzzy msgid ":pep:`302`" msgstr "Voir la :pep:`1`." -#: glossary.rst:870 +#: glossary.rst:975 msgid "locale encoding" msgstr "encodage régional" -#: glossary.rst:872 +#: 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) " @@ -2055,42 +2236,42 @@ msgstr "" "modifié par :func:`locale.setlocale(locale.LC_CTYPE, new_locale) " "`." -#: glossary.rst:875 +#: 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:877 +#: 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:879 +#: 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:881 +#: 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:882 +#: glossary.rst:987 msgid "magic method" msgstr "méthode magique" -#: glossary.rst:886 +#: glossary.rst:991 msgid "An informal synonym for :term:`special method`." msgstr "Un synonyme informel de :term:`special method`." -#: glossary.rst:887 +#: glossary.rst:992 msgid "mapping" msgstr "tableau de correspondances (*mapping* en anglais)" # Obligé de garder l'ordre des références... -#: glossary.rst:889 +#: glossary.rst:994 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`collections.abc.Mapping` " @@ -2109,11 +2290,11 @@ msgstr "" "correspondances : :class:`dict`, :class:`collections.defaultdict`, :class:`collections.OrderedDict` " "et :class:`collections.Counter`." -#: glossary.rst:895 +#: glossary.rst:1000 msgid "meta path finder" msgstr "chercheur dans les méta-chemins" -#: glossary.rst:897 +#: 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 `." -#: glossary.rst:901 +#: glossary.rst:1006 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -2132,11 +2313,11 @@ msgstr "" "Voir :class:`importlib.abc.MetaPathFinder` pour les méthodes que les " "chercheurs dans les méta-chemins doivent implémenter." -#: glossary.rst:903 +#: glossary.rst:1008 msgid "metaclass" msgstr "métaclasse" -#: glossary.rst:905 +#: 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 " @@ -2160,15 +2341,15 @@ msgstr "" "*multi-threads*, suivre la création d'objets, implémenter des singletons et " "bien d'autres tâches." -#: glossary.rst:915 +#: glossary.rst:1020 msgid "More information can be found in :ref:`metaclasses`." msgstr "Plus d'informations sont disponibles dans : :ref:`metaclasses`." -#: glossary.rst:916 +#: glossary.rst:1021 msgid "method" msgstr "méthode" -#: glossary.rst:918 +#: 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 " @@ -2180,11 +2361,11 @@ msgstr "" "premier :term:`argument` (qui, par convention, est habituellement nommé " "``self``). Voir :term:`function` et :term:`nested scope`." -#: glossary.rst:922 +#: glossary.rst:1027 msgid "method resolution order" msgstr "ordre de résolution des méthodes" -#: glossary.rst:924 +#: glossary.rst:1029 #, fuzzy msgid "" "Method Resolution Order is the order in which base classes are searched for " @@ -2198,11 +2379,11 @@ msgstr "" "2.3/mro/>`_ pour plus de détails sur l'algorithme utilisé par l'interpréteur " "Python depuis la version 2.3." -#: glossary.rst:927 +#: glossary.rst:1032 msgid "module" msgstr "module" -#: glossary.rst:929 +#: 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 " @@ -2212,15 +2393,15 @@ msgstr "" "modules ont un espace de nommage et peuvent contenir n'importe quels objets " "Python. Charger des modules est appelé :term:`importer `." -#: glossary.rst:933 +#: glossary.rst:1038 msgid "See also :term:`package`." msgstr "Voir aussi :term:`paquet`." -#: glossary.rst:934 +#: glossary.rst:1039 msgid "module spec" msgstr "spécificateur de module" -#: glossary.rst:936 +#: glossary.rst:1041 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -2229,36 +2410,37 @@ msgstr "" "utilisées pour charger un module. C'est une instance de la " "classe :class:`importlib.machinery.ModuleSpec`." -#: glossary.rst:939 +#: glossary.rst:1044 #, fuzzy msgid "See also :ref:`module-specs`." msgstr "Voir aussi :term:`module`." -#: glossary.rst:940 +#: glossary.rst:1045 msgid "MRO" msgstr "MRO" -#: glossary.rst:942 +#: glossary.rst:1047 msgid "See :term:`method resolution order`." msgstr "Voir :term:`ordre de résolution des méthodes`." -#: glossary.rst:943 +#: glossary.rst:1048 msgid "mutable" msgstr "mutable" -#: glossary.rst:945 +#: 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:947 +#: glossary.rst:1055 msgid "named tuple" msgstr "*n*-uplet nommé" -#: glossary.rst:949 +#: 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 " @@ -2269,7 +2451,7 @@ msgstr "" "accessibles en utilisant des attributs nommés. Les types et classes peuvent " "avoir aussi d'autres caractéristiques." -#: glossary.rst:953 +#: 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 " @@ -2279,7 +2461,7 @@ msgstr "" "retournées par :func:`time.localtime` et :func:`os.stat`. Un autre exemple " "est :data:`sys.float_info` ::" -#: glossary.rst:964 +#: glossary.rst:1072 #, fuzzy msgid "" "Some named tuples are built-in types (such as the above examples). " @@ -2299,11 +2481,11 @@ 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:972 +#: glossary.rst:1080 msgid "namespace" msgstr "espace de nommage" -#: glossary.rst:974 +#: 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 " @@ -2328,11 +2510,11 @@ msgstr "" "que ces fonctions sont implémentées respectivement dans les " "modules :mod:`random` et :mod:`itertools`." -#: glossary.rst:984 +#: glossary.rst:1092 msgid "namespace package" msgstr "paquet-espace de nommage" -#: glossary.rst:986 +#: glossary.rst:1094 #, fuzzy msgid "" "A :term:`package` which serves only as a container for subpackages. " @@ -2344,27 +2526,41 @@ msgstr "" "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:991 +#: 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:994 +#: glossary.rst:1102 msgid "" "For more information, see :pep:`420` and :ref:`reference-namespace-package`." msgstr "" -#: glossary.rst:996 +#: glossary.rst:1104 msgid "See also :term:`module`." msgstr "Voir aussi :term:`module`." -#: glossary.rst:997 +#: 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:999 +#: 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 " @@ -2382,11 +2578,11 @@ 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:1006 +#: glossary.rst:1121 msgid "new-style class" msgstr "nouvelle classe" -#: glossary.rst:1008 +#: glossary.rst:1123 #, fuzzy msgid "" "Old name for the flavor of classes now used for all class objects. In " @@ -2402,11 +2598,25 @@ msgstr "" "propriétés, :meth:`__getattribute__`, les méthodes de classe et les méthodes " "statiques." -#: glossary.rst:1013 +#: 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:1015 +#: 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`." @@ -2416,12 +2626,12 @@ msgstr "" "l'ancêtre commun à absolument toutes les :term:`nouvelles classes `." -#: glossary.rst:1018 +#: glossary.rst:1142 #, fuzzy msgid "optimized scope" msgstr "portée imbriquée" -#: glossary.rst:1020 +#: 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 " @@ -2432,11 +2642,30 @@ msgid "" "to optimized scopes." msgstr "" -#: glossary.rst:1027 +#: 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:1029 +#: 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__`` " @@ -2446,15 +2675,30 @@ msgstr "" "paquets. Techniquement, un paquet est un module qui possède un attribut " "``__path__``." -#: glossary.rst:1033 +#: 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:1034 +#: 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:1036 +#: 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 " @@ -2464,7 +2708,7 @@ 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:1040 +#: glossary.rst:1183 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -2476,7 +2720,7 @@ msgstr "" "`. C'est le type de paramètre par défaut. Par exemple, *foo* et " "*bar* dans l'exemple suivant ::" -#: glossary.rst:1049 +#: 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 ``/`` " @@ -2488,7 +2732,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:1058 +#: 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-" @@ -2502,7 +2746,7 @@ msgstr "" "liste des paramètres avant eux. Par exemple, *kw_only1* et *kw_only2* dans " "le code suivant ::" -#: glossary.rst:1066 +#: 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 " @@ -2515,7 +2759,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:1074 +#: 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 " @@ -2527,7 +2771,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:1080 +#: glossary.rst:1223 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." @@ -2535,7 +2779,7 @@ 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:1083 +#: glossary.rst:1226 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -2547,11 +2791,26 @@ msgstr "" "parameter>` dans la FAQ, la classe :class:`inspect.Parameter`, la " "section :ref:`function` et la :pep:`362`." -#: glossary.rst:1087 +#: 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:1089 +#: glossary.rst:1242 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." @@ -2560,11 +2819,11 @@ msgstr "" "path* en anglais, d'où le *path*) que le :term:`chercheur basé sur les " "chemins ` consulte pour trouver des modules à importer." -#: glossary.rst:1091 +#: glossary.rst:1244 msgid "path entry finder" msgstr "chercheur de chemins" -#: glossary.rst:1093 +#: 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 " @@ -2575,7 +2834,7 @@ msgstr "" "recherche dans path `) qui sait où trouver des modules " "lorsqu'on lui donne une :term:`entrée de path `." -#: glossary.rst:1097 +#: glossary.rst:1250 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -2583,11 +2842,11 @@ msgstr "" "Voir :class:`importlib.abc.PathEntryFinder` pour les méthodes qu'un " "chercheur d'entrée dans *path* doit implémenter." -#: glossary.rst:1099 +#: glossary.rst:1252 msgid "path entry hook" msgstr "point d'entrée pour la recherche dans *path*" -#: glossary.rst:1101 +#: glossary.rst:1254 #, fuzzy msgid "" "A callable on the :data:`sys.path_hooks` list which returns a :term:`path " @@ -2598,11 +2857,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:1104 +#: glossary.rst:1257 msgid "path based finder" msgstr "chercheur basé sur les chemins" -#: glossary.rst:1106 +#: glossary.rst:1259 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -2611,11 +2870,11 @@ msgstr "" "défaut qui cherche des modules dans un :term:`chemin des importations " "`." -#: glossary.rst:1108 +#: glossary.rst:1261 msgid "path-like object" msgstr "objet simili-chemin" -#: glossary.rst:1110 +#: 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 " @@ -2636,11 +2895,11 @@ msgstr "" "type :class:`str` ou :class:`bytes` à la place. A été Introduit par " "la :pep:`519`." -#: glossary.rst:1118 +#: glossary.rst:1271 msgid "PEP" msgstr "PEP" -#: glossary.rst:1120 +#: 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 " @@ -2653,7 +2912,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:1126 +#: 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 " @@ -2668,15 +2927,15 @@ msgstr "" "l’établissement d’un consensus au sein de la communauté et de documenter les " "opinions contradictoires." -#: glossary.rst:1132 +#: glossary.rst:1285 msgid "See :pep:`1`." msgstr "Voir la :pep:`1`." -#: glossary.rst:1133 +#: glossary.rst:1286 msgid "portion" msgstr "portion" -#: glossary.rst:1135 +#: 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`." @@ -2685,15 +2944,15 @@ msgstr "" "fichier zip) qui contribue à l'espace de nommage d'un paquet, tel que défini " "dans la :pep:`420`." -#: glossary.rst:1137 +#: glossary.rst:1290 msgid "positional argument" msgstr "argument positionnel" -#: glossary.rst:1140 +#: glossary.rst:1293 msgid "provisional API" msgstr "API provisoire" -#: glossary.rst:1142 +#: 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 " @@ -2712,7 +2971,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:1151 +#: 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 " @@ -2723,7 +2982,7 @@ msgstr "" "possible sera fait pour tenter de résoudre les problèmes en conservant la " "rétrocompatibilité." -#: glossary.rst:1155 +#: 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. " @@ -2733,19 +2992,19 @@ msgstr "" "le temps, sans se bloquer longtemps sur des erreurs d'architecture. Voir " "la :pep:`411` pour plus de détails." -#: glossary.rst:1158 +#: glossary.rst:1311 msgid "provisional package" msgstr "paquet provisoire" -#: glossary.rst:1160 +#: glossary.rst:1313 msgid "See :term:`provisional API`." msgstr "Voir :term:`provisional API`." -#: glossary.rst:1161 +#: glossary.rst:1314 msgid "Python 3000" msgstr "Python 3000" -#: glossary.rst:1163 +#: 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 " @@ -2754,11 +3013,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:1166 +#: glossary.rst:1319 msgid "Pythonic" msgstr "*Pythonique*" -#: glossary.rst:1168 +#: 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 " @@ -2774,16 +3033,16 @@ msgstr "" "possibilité, donc les gens qui ne sont pas habitués à Python utilisent " "parfois un compteur numérique à la place ::" -#: glossary.rst:1178 +#: 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:1182 +#: glossary.rst:1335 msgid "qualified name" msgstr "nom qualifié" -#: glossary.rst:1184 +#: 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 " @@ -2795,7 +3054,7 @@ 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:1201 +#: 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. " @@ -2806,11 +3065,29 @@ msgstr "" "par des points) vers le module, incluant tous les paquets parents. Par " "exemple : ``email.mime.text`` ::" -#: glossary.rst:1208 +#: 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:1210 +#: glossary.rst:1375 #, fuzzy msgid "" "The number of references to an object. When the reference count of an " @@ -2828,18 +3105,18 @@ msgstr "" "fonction :func:`sys.getrefcount` pour obtenir le nombre de références à un " "objet donné." -#: glossary.rst:1219 +#: 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:1223 +#: glossary.rst:1388 msgid "regular package" msgstr "paquet classique" -#: glossary.rst:1225 +#: glossary.rst:1390 msgid "" "A traditional :term:`package`, such as a directory containing an " "``__init__.py`` file." @@ -2847,25 +3124,58 @@ msgstr "" ":term:`paquet` traditionnel, tel qu'un dossier contenant un fichier " "``__init__.py``." -#: glossary.rst:1228 +#: glossary.rst:1393 msgid "See also :term:`namespace package`." msgstr "Voir aussi :term:`paquet-espace de nommage `." -#: glossary.rst:1229 +#: glossary.rst:1394 +msgid "reentrant" +msgstr "" + +#: glossary.rst:1396 +msgid "" +"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: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 "" -#: glossary.rst:1231 +#: glossary.rst:1415 msgid "" "An acronym for the \"read–eval–print loop\", another name for " "the :term:`interactive` interpreter shell." msgstr "" -#: glossary.rst:1233 +#: glossary.rst:1417 msgid "__slots__" msgstr "__slots__" -#: glossary.rst:1235 +#: 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, " @@ -2880,11 +3190,11 @@ msgstr "" "nombre d'instances dans une application devient un sujet critique pour la " "mémoire." -#: glossary.rst:1240 +#: glossary.rst:1424 msgid "sequence" msgstr "séquence" -#: glossary.rst:1242 +#: glossary.rst:1426 #, fuzzy msgid "" "An :term:`iterable` which supports efficient element access using integer " @@ -2905,7 +3215,7 @@ msgstr "" "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:1251 +#: glossary.rst:1435 #, fuzzy msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " @@ -2924,11 +3234,11 @@ msgstr "" "et :meth:`__reversed__`. Les types qui implémentent cette interface étendue " "peuvent s'enregistrer explicitement en utilisant :func:`~abc.register`." -#: glossary.rst:1261 +#: glossary.rst:1445 msgid "set comprehension" msgstr "ensemble en compréhension (ou ensemble en intension)" -#: glossary.rst:1263 +#: 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 " @@ -2940,11 +3250,11 @@ msgstr "" "'abracadabra' if c not in 'abc'}`` génère l'ensemble contenant les lettres " "« r » et « d » ``{'r', 'd'}``. Voir :ref:`comprehensions`." -#: glossary.rst:1267 +#: glossary.rst:1451 msgid "single dispatch" msgstr "distribution simple" -#: glossary.rst:1269 +#: glossary.rst:1453 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2953,51 +3263,46 @@ msgstr "" "générique>`, où l'implémentation est choisie en fonction du type d'un seul " "argument." -#: glossary.rst:1271 +#: glossary.rst:1455 msgid "slice" msgstr "tranche" -#: glossary.rst:1273 +#: 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:1277 +#: glossary.rst:1462 msgid "soft deprecated" msgstr "" -#: glossary.rst:1279 +#: 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:1283 +#: glossary.rst:1468 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." msgstr "" -#: glossary.rst:1286 +#: glossary.rst:1471 msgid "" "See `PEP 387: Soft Deprecation `_." msgstr "" -#: glossary.rst:1288 +#: glossary.rst:1473 msgid "special method" msgstr "méthode spéciale" -#: glossary.rst:1292 +#: 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 " @@ -3009,11 +3314,11 @@ msgstr "" "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:1296 +#: glossary.rst:1481 msgid "standard library" msgstr "" -#: glossary.rst:1298 +#: glossary.rst:1483 msgid "" "The collection of :term:`packages `, :term:`modules ` " "and :term:`extension modules ` distributed as a part of " @@ -3022,17 +3327,17 @@ msgid "" "criteria. Documentation can be found at :ref:`library-index`." msgstr "" -#: glossary.rst:1304 +#: glossary.rst:1489 msgid "" "See also :data:`sys.stdlib_module_names` for a list of all possible standard " "library module names." msgstr "" -#: glossary.rst:1306 +#: glossary.rst:1491 msgid "statement" msgstr "instruction" -#: glossary.rst:1308 +#: 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 " @@ -3043,30 +3348,30 @@ msgstr "" "constructions basées sur un mot-clé, comme :keyword:`if`, :keyword:`while` " "ou :keyword:`for`." -#: glossary.rst:1311 +#: glossary.rst:1496 msgid "static type checker" msgstr "" -#: glossary.rst:1313 +#: 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." msgstr "" -#: glossary.rst:1316 +#: glossary.rst:1501 msgid "stdlib" msgstr "" -#: glossary.rst:1318 +#: glossary.rst:1503 msgid "An abbreviation of :term:`standard library`." msgstr "" -#: glossary.rst:1319 +#: glossary.rst:1504 msgid "strong reference" msgstr "référence forte" -#: glossary.rst:1321 +#: glossary.rst:1506 #, fuzzy msgid "" "In Python's C API, a strong reference is a reference to an object which is " @@ -3078,7 +3383,7 @@ msgstr "" "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:1327 +#: 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 " @@ -3089,21 +3394,51 @@ 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:1332 +#: glossary.rst:1517 msgid "See also :term:`borrowed reference`." msgstr "Voir aussi :term:`référence empruntée`." -#: glossary.rst:1333 +#: 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:1334 +#: glossary.rst:1539 #, fuzzy msgid "t-strings" msgstr "f-string" -#: glossary.rst:1336 +#: glossary.rst:1541 #, fuzzy msgid "" "String literals prefixed with ``t`` or ``T`` are commonly called \"t-" @@ -3113,11 +3448,11 @@ msgstr "" "raccourci pour :ref:`formatted string literals `. Voir " "la :pep:`498`." -#: glossary.rst:1339 +#: glossary.rst:1544 msgid "text encoding" msgstr "encodages de texte" -#: glossary.rst:1341 +#: 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 " @@ -3127,7 +3462,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:1345 +#: 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\"." @@ -3136,7 +3471,7 @@ msgstr "" "« encoder » et recréer la chaîne à partir de la suite d'octets s'appelle " "« décoder »." -#: glossary.rst:1348 +#: glossary.rst:1553 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." @@ -3145,11 +3480,11 @@ msgstr "" "sérialisation de texte, que l'on regroupe sous l'expression « encodages de " "texte »." -#: glossary.rst:1351 +#: glossary.rst:1556 msgid "text file" msgstr "fichier texte" -#: glossary.rst:1353 +#: 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 " @@ -3166,7 +3501,7 @@ msgstr "" "``'w'``), :data:`sys.stdin`, :data:`sys.stdout` et les instances " "de :class:`io.StringIO`." -#: glossary.rst:1360 +#: glossary.rst:1565 msgid "" "See also :term:`binary file` for a file object able to read and " "write :term:`bytes-like objects `." @@ -3175,32 +3510,32 @@ msgstr "" "capable de lire et d'écrire des :term:`objets octets-compatibles `." -#: glossary.rst:1362 +#: glossary.rst:1567 msgid "thread state" msgstr "" -#: glossary.rst:1365 +#: 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:1369 +#: 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:1373 +#: 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:1377 +#: 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 " @@ -3209,34 +3544,52 @@ msgid "" "given moment." msgstr "" -#: glossary.rst:1383 +#: glossary.rst:1588 msgid "" "See :ref:`Thread State and the Global Interpreter Lock ` for more " "information." msgstr "" -#: glossary.rst:1385 +#: 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:1388 +#: 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:1393 +#: 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:1396 +#: glossary.rst:1614 msgid "triple-quoted string" msgstr "chaîne entre triple guillemets" -#: glossary.rst:1398 +#: 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 " @@ -3255,11 +3608,11 @@ msgstr "" "``\\``. Elle est ainsi particulièrement utile pour les chaînes de " "documentation (*docstrings*)." -#: glossary.rst:1405 +#: glossary.rst:1623 msgid "type" msgstr "type" -#: glossary.rst:1407 +#: glossary.rst:1625 #, fuzzy msgid "" "The type of a Python object determines what kind of object it is; every " @@ -3271,15 +3624,15 @@ msgstr "" "objets ont un type. Le type d'un objet peut être obtenu via son " "attribut :attr:`~instance.__class__` ou via ``type(obj)``." -#: glossary.rst:1411 +#: glossary.rst:1629 msgid "type alias" msgstr "alias de type" -#: glossary.rst:1413 +#: 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:1415 +#: glossary.rst:1633 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -3287,20 +3640,20 @@ msgstr "" "Les alias de types sont utiles pour simplifier les :term:`indications de " "types `. Par exemple ::" -#: glossary.rst:1422 +#: glossary.rst:1640 msgid "could be made more readable like this::" msgstr "pourrait être rendu plus lisible comme ceci ::" -#: glossary.rst:1443 +#: 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:1430 +#: glossary.rst:1648 msgid "type hint" msgstr "indication de type" -#: glossary.rst:1432 +#: 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." @@ -3309,7 +3662,7 @@ msgstr "" "variable, un attribut de classe, un paramètre de fonction ou une valeur de " "retour." -#: glossary.rst:1435 +#: glossary.rst:1653 #, fuzzy msgid "" "Type hints are optional and are not enforced by Python but they are useful " @@ -3321,7 +3674,7 @@ msgstr "" "statique et aident les IDE à compléter et à réusiner (*code refactoring* en " "anglais) le code." -#: glossary.rst:1439 +#: 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`." @@ -3330,11 +3683,11 @@ msgstr "" "fonctions, mais pas de variables locales, peuvent être consultées en " "utilisant :func:`typing.get_type_hints`." -#: glossary.rst:1444 +#: glossary.rst:1662 msgid "universal newlines" msgstr "retours à la ligne universels" -#: glossary.rst:1446 +#: 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 " @@ -3348,22 +3701,22 @@ msgstr "" "``'\\r'``. Voir la :pep:`278` et la :pep:`3116`, ainsi que la " "fonction :func:`bytes.splitlines` pour d'autres usages." -#: glossary.rst:1451 +#: glossary.rst:1669 msgid "variable annotation" msgstr "annotation de variable" -#: glossary.rst:1453 +#: 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:1455 +#: 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:1460 +#: glossary.rst:1678 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -3372,13 +3725,13 @@ msgstr "" "des :term:`indications de types ` : par exemple, cette variable " "devrait prendre des valeurs de type :class:`int` ::" -#: glossary.rst:1466 +#: 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`." -#: glossary.rst:1468 +#: 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 " @@ -3389,11 +3742,11 @@ msgstr "" "aussi :ref:`annotations-howto` sur les bonnes pratiques concernant les " "annotations." -#: glossary.rst:1472 +#: glossary.rst:1690 msgid "virtual environment" msgstr "environnement virtuel" -#: glossary.rst:1474 +#: glossary.rst:1692 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -3405,15 +3758,15 @@ msgstr "" "des paquets sans interférer avec d'autres applications Python fonctionnant " "sur le même système." -#: glossary.rst:1479 +#: glossary.rst:1697 msgid "See also :mod:`venv`." msgstr "Voir aussi :mod:`venv`." -#: glossary.rst:1480 +#: glossary.rst:1698 msgid "virtual machine" msgstr "machine virtuelle" -#: glossary.rst:1482 +#: glossary.rst:1700 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -3422,23 +3775,23 @@ msgstr "" "(*virtual machine*) de Python exécute le :term:`code intermédiaire " "` produit par le compilateur de *bytecode*." -#: glossary.rst:1484 +#: glossary.rst:1702 #, fuzzy msgid "walrus operator" msgstr "itérateur asynchrone" -#: glossary.rst:1486 +#: 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:1489 +#: glossary.rst:1707 msgid "Zen of Python" msgstr "Le zen de Python" -#: glossary.rst:1491 +#: 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 " @@ -3448,6 +3801,25 @@ 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`." diff --git a/howto/a-conceptual-overview-of-asyncio.po b/howto/a-conceptual-overview-of-asyncio.po index f2d1ad9733..878910a847 100644 --- a/howto/a-conceptual-overview-of-asyncio.po +++ b/howto/a-conceptual-overview-of-asyncio.po @@ -6,18 +6,17 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\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`" +msgid "A conceptual overview of :mod:`!asyncio`" msgstr "" #: howto/a-conceptual-overview-of-asyncio.rst:7 @@ -82,16 +81,17 @@ msgid "" msgstr "" #: howto/a-conceptual-overview-of-asyncio.rst:41 -msgid "Event Loop" +#, 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. It's like an orchestra conductor. It's behind the scenes " -"managing resources. 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 " -"worker bees." +"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 @@ -107,7 +107,8 @@ msgid "" "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." +"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 @@ -147,7 +148,7 @@ 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 :data:`types.CoroutineType` (native coroutine). Note that coroutines can " +"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 "" @@ -191,25 +192,27 @@ 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`. The recommended way to create tasks is " -"via :func:`asyncio.create_task`." +"discuss :keyword:`await`." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:175 +#: 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)." +"jobs). The recommended way to create tasks is " +"via :func:`asyncio.create_task`." msgstr "" #: howto/a-conceptual-overview-of-asyncio.rst:178 msgid "" -"Since there's only one event loop (in each thread), :mod:`!asyncio` takes " -"care of associating the task with the event loop for you. As such, there's " -"no need to specify the event loop." +":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:188 +#: 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`, " @@ -218,7 +221,7 @@ msgid "" "this setup::" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:206 +#: 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 " @@ -226,7 +229,7 @@ msgid "" "example, consider this program:" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:226 +#: 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 " @@ -240,30 +243,34 @@ msgid "" "doesn't happen. But that's no reason to be reckless!" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:242 +#: howto/a-conceptual-overview-of-asyncio.rst:245 msgid "await" msgstr "await" -#: howto/a-conceptual-overview-of-asyncio.rst:244 +#: 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:250 +#: 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:253 +#: 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:265 +#: 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 " @@ -276,21 +283,25 @@ msgid "" "this case, a call to resume ``plant_a_tree()``." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:276 +#: 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:280 +#: 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:284 +#: 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 " @@ -298,7 +309,7 @@ msgid "" "invoking a regular, synchronous Python function. Consider this program::" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:309 +#: 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 " @@ -307,7 +318,7 @@ msgid "" "output:" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:322 +#: 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 " @@ -316,7 +327,7 @@ msgid "" "before resuming the coroutine ``main()``." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:336 +#: 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 " @@ -327,20 +338,22 @@ msgid "" "100ms or longer." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:346 +#: 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. That " -"might sound minor, but in a large program with many ``await`` statements and " -"a deep call stack, that overhead can add up to a meaningful performance drag." +"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:355 +#: 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:357 +#: 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 " @@ -348,15 +361,16 @@ msgid "" "own asynchronous operators." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:365 +#: howto/a-conceptual-overview-of-asyncio.rst:378 msgid "The inner workings of coroutines" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:367 -msgid ":mod:`!asyncio` leverages four components to pass around control." +#: 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:369 +#: 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, " @@ -365,7 +379,7 @@ msgid "" "first time (as opposed to being resumed), ``arg`` must be ``None``." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:405 +#: 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 " @@ -376,7 +390,7 @@ msgid "" "``... = coroutine.send(None)`` on line 16." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:415 +#: 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 " @@ -385,47 +399,47 @@ msgid "" "attached in the :attr:`~StopIteration.value` attribute." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:421 +#: howto/a-conceptual-overview-of-asyncio.rst:435 msgid "That snippet produces this output:" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:433 +#: 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:437 +#: 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:441 +#: 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:446 +#: 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. Initially " +"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. Despite that, ``yield from`` and ``await`` effectively do the " -"same thing." +"generators." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:457 +#: howto/a-conceptual-overview-of-asyncio.rst:471 msgid "Futures" msgstr "Futurs" -#: howto/a-conceptual-overview-of-asyncio.rst:459 +#: 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 " @@ -433,7 +447,7 @@ msgid "" "that something." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:464 +#: 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 " @@ -443,7 +457,7 @@ msgid "" "yellow, or green) or indicator." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:471 +#: 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 " @@ -451,7 +465,7 @@ msgid "" "class that implements this logic, which ``Task`` inherits." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:478 +#: 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 " @@ -459,18 +473,18 @@ msgid "" "interface for you to make your own conditions for waiting and resuming." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:486 +#: howto/a-conceptual-overview-of-asyncio.rst:500 msgid "A homemade asyncio.sleep" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:488 +#: 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:492 +#: 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)`` " @@ -478,7 +492,7 @@ msgid "" "elapsed, but without preventing other tasks from running." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:523 +#: 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() ` " @@ -488,7 +502,7 @@ msgid "" "elapsed and, accordingly, call ``future.set_result()``." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:542 +#: 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 " @@ -497,7 +511,7 @@ msgid "" "``asyncio.sleep`` when showcasing how to implement it!" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:548 +#: 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``, " @@ -512,11 +526,11 @@ msgid "" "true of ``asyncio.sleep``." msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:577 +#: howto/a-conceptual-overview-of-asyncio.rst:591 msgid "Here is the full program's output:" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:588 +#: 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 " @@ -525,7 +539,7 @@ msgid "" "so::" msgstr "" -#: howto/a-conceptual-overview-of-asyncio.rst:603 +#: 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 " diff --git a/howto/abi3t-migration.po b/howto/abi3t-migration.po new file mode 100644 index 0000000000..f89f363c29 --- /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 fd191a7102..a347bbc25a 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: 2025-10-17 09:58+0200\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é" diff --git a/howto/curses.po b/howto/curses.po index 7cac167de8..06b0e3d27c 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: 2025-10-17 09:58+0200\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é" @@ -307,11 +307,11 @@ msgstr "" "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 " @@ -322,7 +322,7 @@ 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 " @@ -338,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 " @@ -355,7 +355,7 @@ 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* " @@ -367,7 +367,7 @@ msgstr "" "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 " @@ -379,7 +379,7 @@ msgstr "" "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 " @@ -399,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 " @@ -418,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 " @@ -433,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 " @@ -448,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 " @@ -459,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." @@ -468,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." @@ -476,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 " @@ -486,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 " @@ -512,7 +512,7 @@ msgstr "" "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 " @@ -524,27 +524,27 @@ msgstr "" "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" @@ -552,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*" @@ -574,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 " @@ -584,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 " @@ -599,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." @@ -608,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 +/- " @@ -621,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 " @@ -640,7 +640,7 @@ 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 " @@ -657,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 " @@ -674,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 " @@ -691,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::" @@ -751,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 " @@ -761,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 " @@ -782,7 +782,7 @@ msgstr "" "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 " @@ -799,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 " @@ -818,7 +818,7 @@ 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, " @@ -835,14 +835,14 @@ msgstr "" "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 " @@ -852,7 +852,7 @@ 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 " @@ -874,11 +874,11 @@ msgstr "" "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. " @@ -890,11 +890,11 @@ msgstr "" "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 " @@ -906,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 " @@ -919,7 +919,7 @@ 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 " @@ -942,7 +942,7 @@ 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 " @@ -961,7 +961,7 @@ msgstr "" "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 " @@ -979,7 +979,7 @@ msgstr "" "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 " @@ -993,7 +993,7 @@ msgstr "" "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 " @@ -1007,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`." -#: 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 " @@ -1031,7 +1031,7 @@ msgstr "" "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, " @@ -1047,7 +1047,7 @@ 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, " @@ -1065,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 `_" @@ -1087,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 " @@ -1097,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" @@ -380,10 +380,11 @@ msgid "Equality comparisons are defined though::" msgstr "Les comparaisons d'égalité sont cependant définies ::" #: 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 " @@ -1103,153 +1104,21 @@ msgid "Finer Points" msgstr "Approfondissements" #: howto/enum.rst:971 -msgid "Supported ``__dunder__`` names" +#, fuzzy +msgid "Supported ``__dunder__`` and ``_sunder_`` names" msgstr "Noms de la forme ``__dunder__`` disponibles" #: howto/enum.rst:973 -#, 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." - -#: howto/enum.rst:976 -#, 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." - -#: howto/enum.rst:982 -msgid "Supported ``_sunder_`` names" -msgstr "Noms de la forme ``_sunder_`` disponibles" - -#: howto/enum.rst:984 -#, fuzzy -msgid ":attr:`~Enum._name_` -- name of the member" -msgstr "``_name_`` — nom du membre" - -#: howto/enum.rst:985 -#, 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:986 -#, 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:988 -#, 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:991 -#, 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:993 -msgid "" -":meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing " -"member." -msgstr "" - -#: howto/enum.rst:995 -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:1000 -#, 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:1003 -#, fuzzy msgid "" -"For :class:`Flag` classes the next value chosen will be the next highest " -"power-of-two." +"The supported ``__dunder__`` and ``_sunder_`` names can be found in " +"the :ref:`Enum API documentation `." 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:1006 -msgid "" -"Prior versions would use the last seen value instead of the highest value." -msgstr "" - -#: howto/enum.rst:1009 -msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" -msgstr "``_missing_``, ``_order_``, ``_generate_next_value_``" - -#: howto/enum.rst:1010 -msgid "``_ignore_``" -msgstr "``_ignore_``" -#: howto/enum.rst:1011 -msgid "``_add_alias_``, ``_add_value_alias_``" -msgstr "" - -#: howto/enum.rst:1013 -#, 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 : -#: howto/enum.rst:1031 -#, 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é." - -#: howto/enum.rst:1036 +#: howto/enum.rst:977 msgid "_Private__names" msgstr "*_Private__names*" -#: howto/enum.rst:1038 +#: howto/enum.rst:979 msgid "" ":ref:`Private names ` are not converted to enum " "members, but remain normal attributes." @@ -1257,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:1045 +#: howto/enum.rst:986 msgid "``Enum`` member type" msgstr "Types des membres d'une ``Enum``" -#: howto/enum.rst:1047 +#: howto/enum.rst:988 #, fuzzy msgid "" "Enum members are instances of their enum class, and are normally accessed as " @@ -1277,11 +1146,11 @@ msgstr "" "partir d'autres membres — cette pratique était déconseillée et dans " "``3.11`` :class:`Enum` ne l'autorise pas ::" -#: howto/enum.rst:1058 +#: 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:1060 +#: 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 " @@ -1291,11 +1160,11 @@ msgstr "" "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:1072 +#: howto/enum.rst:1013 msgid "Boolean value of ``Enum`` classes and members" msgstr "Valeur booléenne des classes et membres ``Enum``" -#: howto/enum.rst:1074 +#: 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 " @@ -1309,16 +1178,16 @@ msgstr "" "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:1083 +#: 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:1087 +#: howto/enum.rst:1028 msgid "``Enum`` classes with methods" msgstr "Méthodes dans les classes ``Enum``" -#: howto/enum.rst:1089 +#: 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 " @@ -1328,11 +1197,11 @@ msgstr "" "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:1100 +#: howto/enum.rst:1041 msgid "Combining members of ``Flag``" msgstr "Combinaisons de membres de ``Flag``" -#: howto/enum.rst:1102 +#: 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::" @@ -1340,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:1120 +#: howto/enum.rst:1061 msgid "``Flag`` and ``IntFlag`` minutia" msgstr "Précisions sur ``Flag`` et ``IntFlag``" -#: howto/enum.rst:1122 +#: howto/enum.rst:1063 msgid "Using the following snippet for our examples::" msgstr "En utilisant l'extrait suivant pour nos exemples ::" -#: howto/enum.rst:1133 +#: howto/enum.rst:1074 msgid "the following are true:" msgstr "ce qui suit est vrai :" -#: howto/enum.rst:1135 +#: howto/enum.rst:1076 msgid "single-bit flags are canonical" msgstr "les membres dont un seul bit est à 1 sont canoniques ;" -#: howto/enum.rst:1136 +#: 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:1137 +#: 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:1142 +#: howto/enum.rst:1083 msgid "" "negating a flag or flag set returns a new flag/flag set with the " "corresponding positive integer value::" @@ -1373,19 +1242,19 @@ msgstr "" "membre (ou composition de membres) avec la valeur entière positive " "correspondante ::" -#: howto/enum.rst:1151 +#: 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:1164 +#: 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:1175 +#: howto/enum.rst:1116 msgid "" "membership / containment checking: zero-valued flags are always considered " "to be contained::" @@ -1393,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:1181 +#: howto/enum.rst:1122 msgid "" "otherwise, only if all bits of one flag are in the other flag will True be " "returned::" @@ -1401,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:1190 +#: 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``:" @@ -1410,39 +1279,39 @@ msgstr "" "les bits hors plage/invalides sont gérés : ``STRICT``, ``CONFORM``, " "``EJECT`` et ``KEEP`` :" -#: howto/enum.rst:1193 +#: 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:1194 +#: howto/enum.rst:1135 msgid "CONFORM --> discards any invalid bits" msgstr "*CONFORM* --> ignore les bits invalides" -#: howto/enum.rst:1195 +#: 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:1196 +#: howto/enum.rst:1137 msgid "KEEP --> keep the extra bits" msgstr "*KEEP* --> garde les bits supplémentaires" -#: howto/enum.rst:1198 +#: 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:1199 +#: 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:1200 +#: 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:1202 +#: 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 " @@ -1453,12 +1322,12 @@ msgstr "" "``KEEP`` (voir ``ssl.Options`` pour un exemple de cas où ``KEEP`` est " "nécessaire)." -#: howto/enum.rst:1210 +#: 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:1212 +#: howto/enum.rst:1153 msgid "" "Enums have a custom metaclass that affects many aspects of both " "derived :class:`Enum` classes and their instances (members)." @@ -1466,11 +1335,11 @@ 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:1217 +#: howto/enum.rst:1158 msgid "Enum Classes" msgstr "Classes *Enum*" -#: howto/enum.rst:1219 +#: howto/enum.rst:1160 #, fuzzy msgid "" "The :class:`EnumType` metaclass is responsible for providing " @@ -1492,12 +1361,12 @@ msgstr "" "que :meth:`__new__`, :meth:`__getnewargs__`, :meth:`__str__` " "et :meth:`__repr__`)." -#: howto/enum.rst:1228 +#: howto/enum.rst:1169 #, fuzzy msgid "Flag Classes" msgstr "Classes *Enum*" -#: howto/enum.rst:1230 +#: 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 " @@ -1506,11 +1375,11 @@ msgid "" "considered an alias." msgstr "" -#: howto/enum.rst:1236 +#: howto/enum.rst:1177 msgid "Enum Members (aka instances)" msgstr "Membres d'une *Enum* (les instances)" -#: howto/enum.rst:1238 +#: howto/enum.rst:1179 #, fuzzy msgid "" "The most interesting thing about enum members is that they are " @@ -1525,37 +1394,37 @@ 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:1244 +#: howto/enum.rst:1185 msgid "Flag Members" msgstr "" -#: howto/enum.rst:1246 +#: 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:1252 +#: howto/enum.rst:1193 msgid "(Note that ``BLACK``, ``PURPLE``, and ``WHITE`` do not show up.)" msgstr "" -#: howto/enum.rst:1254 +#: 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:1260 +#: 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:1270 +#: howto/enum.rst:1211 msgid "Enum Cookbook" msgstr "" -#: howto/enum.rst:1273 +#: 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 " @@ -1569,11 +1438,11 @@ msgstr "" "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:1280 +#: howto/enum.rst:1221 msgid "Omitting values" msgstr "Omission de valeurs" -#: howto/enum.rst:1282 +#: 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:" @@ -1582,19 +1451,19 @@ msgstr "" "d'une énumération. Il existe plusieurs manières de définir ce type " "d'énumération simple :" -#: howto/enum.rst:1285 +#: 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:1286 +#: 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:1287 +#: 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:1288 +#: howto/enum.rst:1229 #, fuzzy msgid "" "use a tuple as the value and a custom :meth:`~object.__new__` to replace the " @@ -1603,7 +1472,7 @@ 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:1291 +#: 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 " @@ -1613,23 +1482,23 @@ 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:1297 +#: howto/enum.rst:1238 msgid "Using :class:`auto`" msgstr "Utilisation d':class:`auto`" -#: howto/enum.rst:1299 +#: howto/enum.rst:1240 msgid "Using :class:`auto` would look like::" msgstr "Voici un exemple où nous utilisons :class:`auto` ::" -#: howto/enum.rst:1311 +#: howto/enum.rst:1252 msgid "Using :class:`object`" msgstr "Utilisation d':class:`object`" -#: howto/enum.rst:1313 +#: howto/enum.rst:1254 msgid "Using :class:`object` would look like::" msgstr "Voici un exemple où nous utilisons :class:`object` ::" -#: howto/enum.rst:1323 +#: howto/enum.rst:1264 #, fuzzy msgid "" "This is also a good example of why you might want to write your " @@ -1638,25 +1507,25 @@ msgstr "" "Voici un bon exemple montrant pourquoi vouloir écrire sa " "propre :meth:`__repr__` ::" -#: howto/enum.rst:1339 +#: howto/enum.rst:1280 msgid "Using a descriptive string" msgstr "Utilisation d'une chaîne de caractères descriptive" -#: howto/enum.rst:1341 +#: 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:1353 +#: 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:1355 +#: 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:1372 +#: howto/enum.rst:1313 msgid "" "To make a more general purpose ``AutoNumber``, add ``*args`` to the " "signature::" @@ -1664,7 +1533,7 @@ msgstr "" "Pour créer une ``AutoNumber`` plus générale, ajoutons ``*args`` à la " "signature ::" -#: howto/enum.rst:1382 +#: howto/enum.rst:1323 msgid "" "Then when you inherit from ``AutoNumber`` you can write your own " "``__init__`` to handle any extra arguments::" @@ -1672,7 +1541,7 @@ msgstr "" "Ensuite, lorsque nous héritons de ``AutoNumber``, nous pouvons écrire notre " "propre ``__init__`` pour gérer les arguments supplémentaires ::" -#: howto/enum.rst:1401 +#: howto/enum.rst:1342 #, fuzzy msgid "" "The :meth:`~object.__new__` method, if defined, is used during creation of " @@ -1684,17 +1553,17 @@ msgstr "" "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:1407 +#: 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:1414 +#: howto/enum.rst:1355 msgid "OrderedEnum" msgstr "Énumération ordonnée" -#: howto/enum.rst:1416 +#: 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 " @@ -1704,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:1450 +#: howto/enum.rst:1391 msgid "DuplicateFreeEnum" msgstr "Énumération sans doublon" # name est bien corrigé par value dans upstream -#: howto/enum.rst:1452 +#: howto/enum.rst:1393 #, fuzzy msgid "" "Raises an error if a duplicate member value is found instead of creating an " @@ -1719,7 +1588,7 @@ msgstr "" "synonyme ::" # suit un : -#: howto/enum.rst:1477 +#: 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 " @@ -1730,19 +1599,19 @@ msgstr "" "changement souhaité est l'interdiction des synonymes, le " "décorateur :func:`unique` peut être utilisé à la place." -#: howto/enum.rst:1483 +#: howto/enum.rst:1425 msgid "MultiValueEnum" msgstr "" -#: howto/enum.rst:1485 +#: howto/enum.rst:1427 msgid "Supports having more than one value per member::" msgstr "" -#: howto/enum.rst:1506 +#: howto/enum.rst:1448 msgid "Planet" msgstr "Planète" -#: howto/enum.rst:1508 +#: howto/enum.rst:1450 #, fuzzy msgid "" "If :meth:`~object.__new__` or :meth:`~object.__init__` is defined, the value " @@ -1751,20 +1620,20 @@ 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:1537 +#: howto/enum.rst:1479 msgid "TimePeriod" msgstr "Intervalle de temps" -#: howto/enum.rst:1539 +#: 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:1558 +#: howto/enum.rst:1500 msgid "Subclassing EnumType" msgstr "Dérivations d'*EnumType*" -#: howto/enum.rst:1560 +#: 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 " @@ -1775,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 635081fa5f..a683f3439c 100644 --- a/howto/free-threading-extensions.po +++ b/howto/free-threading-extensions.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -71,41 +71,44 @@ msgstr "" #: 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:71 +#: howto/free-threading-extensions.rst:68 msgid "Single-Phase Initialization" msgstr "" -#: howto/free-threading-extensions.rst:73 +#: howto/free-threading-extensions.rst:70 msgid "" -"Extensions that use single-phase initialization " -"(i.e., :c:func:`PyModule_Create`) should " +"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:101 +#: howto/free-threading-extensions.rst:98 msgid "General API Guidelines" msgstr "" -#: howto/free-threading-extensions.rst:103 +#: 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:105 +#: 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:107 +#: howto/free-threading-extensions.rst:104 msgid "" "**Macros**: Accessor macros " "like :c:macro:`PyList_GET_ITEM`, :c:macro:`PyList_SET_ITEM`, and macros " @@ -115,7 +118,7 @@ msgid "" "concurrently." msgstr "" -#: howto/free-threading-extensions.rst:113 +#: 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 " @@ -123,11 +126,11 @@ msgid "" "references ` for more information." msgstr "" -#: howto/free-threading-extensions.rst:120 +#: howto/free-threading-extensions.rst:117 msgid "Container Thread Safety" msgstr "" -#: howto/free-threading-extensions.rst:122 +#: 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 " @@ -135,11 +138,11 @@ msgid "" "appending an item." msgstr "" -#: howto/free-threading-extensions.rst:130 +#: howto/free-threading-extensions.rst:127 msgid "``PyDict_Next``" msgstr "" -#: howto/free-threading-extensions.rst:132 +#: 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 " @@ -147,11 +150,11 @@ msgid "" "modified::" msgstr "" -#: howto/free-threading-extensions.rst:147 +#: howto/free-threading-extensions.rst:144 msgid "Borrowed References" msgstr "" -#: howto/free-threading-extensions.rst:151 +#: 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 " @@ -159,100 +162,100 @@ msgid "" "use :c:func:`PyList_GetItem` if the list may be modified concurrently." msgstr "" -#: howto/free-threading-extensions.rst:156 +#: 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:160 +#: howto/free-threading-extensions.rst:157 msgid "Borrowed reference API" msgstr "" -#: howto/free-threading-extensions.rst:160 +#: howto/free-threading-extensions.rst:157 msgid "Strong reference API" msgstr "" -#: howto/free-threading-extensions.rst:162 +#: howto/free-threading-extensions.rst:159 msgid ":c:func:`PyList_GetItem`" msgstr "" -#: howto/free-threading-extensions.rst:162 -#: howto/free-threading-extensions.rst:164 +#: howto/free-threading-extensions.rst:159 +#: howto/free-threading-extensions.rst:161 msgid ":c:func:`PyList_GetItemRef`" msgstr "" -#: howto/free-threading-extensions.rst:164 +#: howto/free-threading-extensions.rst:161 msgid ":c:func:`PyList_GET_ITEM`" msgstr "" -#: howto/free-threading-extensions.rst:166 +#: howto/free-threading-extensions.rst:163 msgid ":c:func:`PyDict_GetItem`" msgstr "" -#: howto/free-threading-extensions.rst:166 -#: howto/free-threading-extensions.rst:168 +#: howto/free-threading-extensions.rst:163 +#: howto/free-threading-extensions.rst:165 msgid ":c:func:`PyDict_GetItemRef`" msgstr "" -#: howto/free-threading-extensions.rst:168 +#: howto/free-threading-extensions.rst:165 msgid ":c:func:`PyDict_GetItemWithError`" msgstr "" -#: howto/free-threading-extensions.rst:170 +#: howto/free-threading-extensions.rst:167 msgid ":c:func:`PyDict_GetItemString`" msgstr "" -#: howto/free-threading-extensions.rst:170 +#: howto/free-threading-extensions.rst:167 msgid ":c:func:`PyDict_GetItemStringRef`" msgstr "" -#: howto/free-threading-extensions.rst:172 +#: howto/free-threading-extensions.rst:169 msgid ":c:func:`PyDict_SetDefault`" msgstr "" -#: howto/free-threading-extensions.rst:172 +#: howto/free-threading-extensions.rst:169 msgid ":c:func:`PyDict_SetDefaultRef`" msgstr "" -#: howto/free-threading-extensions.rst:174 +#: howto/free-threading-extensions.rst:171 msgid ":c:func:`PyDict_Next`" msgstr "" -#: howto/free-threading-extensions.rst:174 +#: howto/free-threading-extensions.rst:171 msgid "none (see :ref:`PyDict_Next`)" msgstr "" -#: howto/free-threading-extensions.rst:176 -msgid ":c:func:`PyWeakref_GetObject`" +#: howto/free-threading-extensions.rst:173 +msgid ":c:func:`!PyWeakref_GetObject`" msgstr "" -#: howto/free-threading-extensions.rst:176 -#: howto/free-threading-extensions.rst:178 +#: howto/free-threading-extensions.rst:173 +#: howto/free-threading-extensions.rst:175 msgid ":c:func:`PyWeakref_GetRef`" msgstr "" -#: howto/free-threading-extensions.rst:178 -msgid ":c:func:`PyWeakref_GET_OBJECT`" +#: howto/free-threading-extensions.rst:175 +msgid ":c:func:`!PyWeakref_GET_OBJECT`" msgstr "" -#: howto/free-threading-extensions.rst:180 +#: howto/free-threading-extensions.rst:177 msgid ":c:func:`PyImport_AddModule`" msgstr "" -#: howto/free-threading-extensions.rst:180 +#: howto/free-threading-extensions.rst:177 msgid ":c:func:`PyImport_AddModuleRef`" msgstr "" -#: howto/free-threading-extensions.rst:182 +#: howto/free-threading-extensions.rst:179 msgid ":c:func:`PyCell_GET`" msgstr "" -#: howto/free-threading-extensions.rst:182 +#: howto/free-threading-extensions.rst:179 msgid ":c:func:`PyCell_Get`" msgstr "" -#: howto/free-threading-extensions.rst:185 +#: 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. " @@ -263,29 +266,29 @@ msgid "" "references in that context is safe." msgstr "" -#: howto/free-threading-extensions.rst:193 +#: 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:201 +#: howto/free-threading-extensions.rst:198 msgid "Memory Allocation APIs" msgstr "" -#: howto/free-threading-extensions.rst:203 +#: 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 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:212 +#: 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. " @@ -293,38 +296,44 @@ msgid "" "of :c:func:`PyObject_Malloc`." msgstr "" -#: howto/free-threading-extensions.rst:219 +#: howto/free-threading-extensions.rst:216 msgid "Thread State and GIL APIs" msgstr "" -#: howto/free-threading-extensions.rst:221 +#: 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:224 +#: 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:225 +#: howto/free-threading-extensions.rst:224 msgid ":c:func:`PyEval_SaveThread` and :c:func:`PyEval_RestoreThread`" msgstr "" -#: howto/free-threading-extensions.rst:226 +#: 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:228 +#: 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:234 +#: 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 " @@ -332,25 +341,25 @@ msgid "" "garbage collector `." msgstr "" -#: howto/free-threading-extensions.rst:241 +#: howto/free-threading-extensions.rst:240 msgid "Protecting Internal Extension State" msgstr "" -#: howto/free-threading-extensions.rst:243 +#: 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:247 +#: 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:250 +#: 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 " @@ -358,11 +367,11 @@ msgid "" "language/storage_duration>`_." msgstr "" -#: howto/free-threading-extensions.rst:257 +#: howto/free-threading-extensions.rst:256 msgid "Critical Sections" msgstr "" -#: howto/free-threading-extensions.rst:261 +#: 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. " @@ -371,11 +380,11 @@ msgid "" "certain C API functions or managing shared state in the free-threaded build." msgstr "" -#: howto/free-threading-extensions.rst:268 +#: howto/free-threading-extensions.rst:267 msgid "What Are Critical Sections?" msgstr "" -#: howto/free-threading-extensions.rst:270 +#: 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 " @@ -385,28 +394,28 @@ msgid "" "acquire the underlying mutex." msgstr "" -#: howto/free-threading-extensions.rst:278 +#: howto/free-threading-extensions.rst:277 msgid "Using Critical Sections" msgstr "" -#: howto/free-threading-extensions.rst:280 +#: howto/free-threading-extensions.rst:279 msgid "The primary APIs for using critical sections are:" msgstr "" -#: howto/free-threading-extensions.rst:282 +#: 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:285 +#: 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:288 +#: 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 " @@ -414,7 +423,7 @@ msgid "" "support both build types." msgstr "" -#: howto/free-threading-extensions.rst:293 +#: 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 " @@ -422,11 +431,11 @@ msgid "" "or writing that field::" msgstr "" -#: howto/free-threading-extensions.rst:312 +#: howto/free-threading-extensions.rst:311 msgid "How Critical Sections Work" msgstr "" -#: howto/free-threading-extensions.rst:314 +#: 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 " @@ -435,51 +444,51 @@ msgid "" "then resumed when the blocking operation completes." msgstr "" -#: howto/free-threading-extensions.rst:320 +#: 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:323 +#: howto/free-threading-extensions.rst:322 msgid "Critical sections operate on a per-object basis rather than globally" msgstr "" -#: howto/free-threading-extensions.rst:325 +#: 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:328 +#: howto/free-threading-extensions.rst:327 msgid "" "Critical sections automatically release and reacquire locks around potential " "blocking operations" msgstr "" -#: howto/free-threading-extensions.rst:332 +#: howto/free-threading-extensions.rst:331 msgid "Deadlock Avoidance" msgstr "" -#: howto/free-threading-extensions.rst:334 +#: howto/free-threading-extensions.rst:333 msgid "Critical sections help avoid deadlocks in two ways:" msgstr "" -#: howto/free-threading-extensions.rst:336 +#: 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:340 +#: 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:343 +#: 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. " @@ -487,29 +496,29 @@ msgid "" "simultaneously." msgstr "" -#: howto/free-threading-extensions.rst:347 +#: howto/free-threading-extensions.rst:346 msgid "" -"Note that the locks described above are only :c:type:`!PyMutex` based locks. " +"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 " +"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 " +"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:356 +#: howto/free-threading-extensions.rst:355 msgid "Important Considerations" msgstr "" -#: howto/free-threading-extensions.rst:358 +#: 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:362 +#: 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 " @@ -519,34 +528,34 @@ msgid "" "This is similar to how the GIL can be released during blocking calls." msgstr "" -#: howto/free-threading-extensions.rst:369 +#: 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:373 +#: 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:376 +#: 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:380 +#: 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:384 +#: 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 " @@ -556,33 +565,66 @@ msgid "" msgstr "" #: howto/free-threading-extensions.rst:392 -msgid "Building Extensions for the Free-Threaded Build" +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: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:397 +#: 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:399 +#: howto/free-threading-extensions.rst:422 msgid "" -"`pypa/cibuildwheel `_ supports the " -"free-threaded build if you set `CIBW_ENABLE to cpython-freethreading " -"`_." +"`pypa/cibuildwheel `_ supports " +"building wheels for the free-threaded build of Python 3.14 and newer." msgstr "" -#: howto/free-threading-extensions.rst:404 +#: howto/free-threading-extensions.rst:426 msgid "Limited C API and Stable ABI" msgstr "" -#: howto/free-threading-extensions.rst:406 +#: 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 73ce4bffb2..247ef6de78 100644 --- a/howto/free-threading-python.po +++ b/howto/free-threading-python.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -32,55 +32,53 @@ msgstr "" #: howto/free-threading-python.rst:14 msgid "" -"The free-threaded mode is working and continues to be improved, but there is " -"some additional overhead in single-threaded workloads compared to the " -"regular build. Additionally, 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`." +"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 "" -#: howto/free-threading-python.rst:20 +#: 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 "" -#: howto/free-threading-python.rst:26 +#: 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 "" -#: howto/free-threading-python.rst:31 +#: howto/free-threading-python.rst:29 msgid "Installation" msgstr "" -#: howto/free-threading-python.rst:33 +#: 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 "" -#: howto/free-threading-python.rst:37 +#: howto/free-threading-python.rst:35 msgid "" "For information on other platforms, see the `Installing a Free-Threaded " "Python `_, a " "community-maintained installation guide for installing free-threaded Python." msgstr "" -#: howto/free-threading-python.rst:41 +#: 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 "" -#: howto/free-threading-python.rst:46 +#: howto/free-threading-python.rst:44 msgid "Identifying free-threaded Python" msgstr "" -#: howto/free-threading-python.rst:48 +#: howto/free-threading-python.rst:46 msgid "" "To check if the current interpreter supports free-threading, :option:`python " "-VV <-V>` and :data:`sys.version` contain \"free-threading build\". The " @@ -88,7 +86,7 @@ msgid "" "GIL is actually disabled in the running process." msgstr "" -#: howto/free-threading-python.rst:53 +#: 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 " @@ -96,43 +94,43 @@ msgid "" "the recommended mechanism for decisions related to the build configuration." msgstr "" -#: howto/free-threading-python.rst:60 +#: howto/free-threading-python.rst:58 msgid "The global interpreter lock in free-threaded Python" msgstr "" -#: howto/free-threading-python.rst:62 +#: 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 "" -#: howto/free-threading-python.rst:66 +#: 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 "" -#: howto/free-threading-python.rst:70 +#: 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 "" -#: howto/free-threading-python.rst:73 +#: howto/free-threading-python.rst:71 msgid "https://py-free-threading.github.io/tracking/" msgstr "" -#: howto/free-threading-python.rst:74 +#: howto/free-threading-python.rst:72 msgid "https://hugovk.github.io/free-threaded-wheels/" msgstr "" -#: howto/free-threading-python.rst:78 +#: howto/free-threading-python.rst:76 msgid "Thread safety" msgstr "" -#: howto/free-threading-python.rst:80 +#: 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 " @@ -144,134 +142,98 @@ msgid "" "current or future behavior." msgstr "" -#: howto/free-threading-python.rst:91 +#: 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 "" -#: howto/free-threading-python.rst:97 +#: howto/free-threading-python.rst:95 msgid "Known limitations" msgstr "" -#: howto/free-threading-python.rst:99 +#: howto/free-threading-python.rst:97 msgid "" "This section describes known limitations of the free-threaded CPython build." msgstr "" -#: howto/free-threading-python.rst:102 +#: howto/free-threading-python.rst:100 msgid "Immortalization" msgstr "" -#: howto/free-threading-python.rst:104 +#: 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 "" -#: 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:" +#: howto/free-threading-python.rst:107 +msgid "As of the 3.14 release, immortalization is limited to:" msgstr "" -#: howto/free-threading-python.rst:112 +#: howto/free-threading-python.rst:109 msgid "" -":ref:`function ` objects declared at the module level" -msgstr "" - -#: howto/free-threading-python.rst:113 -msgid ":ref:`method ` descriptors" +"Code constants: numeric literals, string literals, and tuple literals " +"composed of other constants." msgstr "" -#: howto/free-threading-python.rst:114 -msgid ":ref:`code ` objects" +#: howto/free-threading-python.rst:111 +msgid "Strings interned by :func:`sys.intern`." msgstr "" #: howto/free-threading-python.rst:115 -msgid ":term:`module` objects and their dictionaries" -msgstr "" - -#: howto/free-threading-python.rst:116 -msgid ":ref:`classes ` (type objects)" -msgstr "" - -#: howto/free-threading-python.rst:118 -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." -msgstr "" - -#: howto/free-threading-python.rst:122 -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." -msgstr "" - -#: howto/free-threading-python.rst:128 msgid "Frame objects" msgstr "Objets cadres" -#: howto/free-threading-python.rst:130 +#: howto/free-threading-python.rst:117 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." +"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 "" -#: howto/free-threading-python.rst:138 +#: howto/free-threading-python.rst:123 msgid "Iterators" msgstr "Itérateurs" -#: howto/free-threading-python.rst:140 +#: howto/free-threading-python.rst:125 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." +"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 "" -#: howto/free-threading-python.rst:146 +#: howto/free-threading-python.rst:131 msgid "Single-threaded performance" msgstr "" -#: howto/free-threading-python.rst:148 +#: 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. 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." -msgstr "" - -#: howto/free-threading-python.rst:161 +"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 "" + +#: howto/free-threading-python.rst:141 msgid "Behavioral changes" msgstr "" -#: howto/free-threading-python.rst:163 +#: howto/free-threading-python.rst:143 msgid "" "This section describes CPython behavioural changes with the free-threaded " "build." msgstr "" -#: howto/free-threading-python.rst:168 +#: howto/free-threading-python.rst:148 msgid "Context variables" msgstr "" -#: howto/free-threading-python.rst:170 +#: howto/free-threading-python.rst:150 msgid "" "In the free-threaded build, the " "flag :data:`~sys.flags.thread_inherit_context` is set to true by default " @@ -282,11 +244,11 @@ msgid "" "empty :class:`~contextvars.Context()`." msgstr "" -#: howto/free-threading-python.rst:180 +#: howto/free-threading-python.rst:160 msgid "Warning filters" msgstr "" -#: howto/free-threading-python.rst:182 +#: 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. " @@ -296,3 +258,196 @@ msgid "" "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" + +#: 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 "" +"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 "" + +#: howto/free-threading-python.rst:276 +msgid "Per-thread reference counting can delay freeing objects" +msgstr "" + +#: howto/free-threading-python.rst:278 +msgid "" +"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 "" + +#: howto/free-threading-python.rst:286 +msgid "heap type objects (classes created in Python)" +msgstr "" + +#: 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 "" +"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 b44f860040..8f094ef062 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -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 diff --git a/howto/index.po b/howto/index.po index 80b1e27f55..9d9cfb3b71 100644 --- a/howto/index.po +++ b/howto/index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -32,115 +32,120 @@ msgstr "" "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:42 +#: howto/index.rst:43 msgid "General:" msgstr "Général :" -#: howto/index.rst:44 +#: howto/index.rst:45 msgid ":ref:`a-conceptual-overview-of-asyncio`" msgstr "" -#: howto/index.rst:45 +#: howto/index.rst:46 msgid ":ref:`annotations-howto`" msgstr ":ref:`annotations-howto`" -#: howto/index.rst:46 +#: howto/index.rst:47 msgid ":ref:`argparse-tutorial`" msgstr ":ref:`argparse-tutorial`" -#: howto/index.rst:47 +#: howto/index.rst:48 msgid ":ref:`descriptorhowto`" msgstr ":ref:`descriptorhowto`" -#: howto/index.rst:48 +#: howto/index.rst:49 msgid ":ref:`enum-howto`" msgstr ":ref:`enum-howto`" -#: howto/index.rst:49 +#: howto/index.rst:50 msgid ":ref:`functional-howto`" msgstr ":ref:`functional-howto`" -#: howto/index.rst:50 +#: howto/index.rst:51 msgid ":ref:`ipaddress-howto`" msgstr ":ref:`ipaddress-howto`" -#: howto/index.rst:51 +#: howto/index.rst:52 msgid ":ref:`logging-howto`" msgstr ":ref:`logging-howto`" -#: howto/index.rst:52 +#: howto/index.rst:53 msgid ":ref:`logging-cookbook`" msgstr ":ref:`logging-cookbook`" -#: howto/index.rst:53 +#: howto/index.rst:54 msgid ":ref:`regex-howto`" msgstr ":ref:`regex-howto`" -#: howto/index.rst:54 +#: howto/index.rst:55 msgid ":ref:`sortinghowto`" msgstr ":ref:`sortinghowto`" -#: howto/index.rst:55 +#: howto/index.rst:56 msgid ":ref:`unicode-howto`" msgstr ":ref:`unicode-howto`" -#: howto/index.rst:56 +#: howto/index.rst:57 msgid ":ref:`urllib-howto`" msgstr ":ref:`urllib-howto`" -#: howto/index.rst:58 +#: howto/index.rst:59 msgid "Advanced development:" msgstr "Développement avancé :" -#: howto/index.rst:60 +#: howto/index.rst:61 msgid ":ref:`curses-howto`" msgstr ":ref:`curses-howto`" -#: howto/index.rst:61 +#: howto/index.rst:62 msgid ":ref:`freethreading-python-howto`" msgstr ":ref:`freethreading-python-howto`" -#: howto/index.rst:62 +#: howto/index.rst:63 msgid ":ref:`freethreading-extensions-howto`" msgstr ":ref:`freethreading-extensions-howto`" -#: howto/index.rst:63 +#: howto/index.rst:64 msgid ":ref:`isolating-extensions-howto`" msgstr ":ref:`isolating-extensions-howto`" -#: howto/index.rst:64 +#: 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 ":ref:`isolating-extensions-howto`" -#: howto/index.rst:65 +#: howto/index.rst:67 msgid ":ref:`socket-howto`" msgstr ":ref:`socket-howto`" -#: howto/index.rst:66 +#: howto/index.rst:68 msgid ":ref:`timerfd-howto`" msgstr ":ref:`timerfd-howto`" -#: howto/index.rst:67 +#: howto/index.rst:69 msgid ":ref:`cporting-howto`" msgstr ":ref:`cporting-howto`" -#: howto/index.rst:69 +#: howto/index.rst:71 msgid "Debugging and profiling:" msgstr "Débogage et profilage :" -#: howto/index.rst:71 +#: howto/index.rst:73 msgid ":ref:`gdb`" msgstr ":ref:`gdb`" -#: howto/index.rst:72 +#: howto/index.rst:74 msgid ":ref:`instrumentation`" msgstr ":ref:`instrumentation`" -#: howto/index.rst:73 +#: howto/index.rst:75 msgid ":ref:`perf_profiling`" msgstr ":ref:`perf_profiling`" -#: howto/index.rst:74 +#: howto/index.rst:76 msgid ":ref:`remote-debugging`" msgstr "" diff --git a/howto/instrumentation.po b/howto/instrumentation.po index 860e821b60..897ff71d91 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: 2025-10-17 09:58+0200\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" @@ -362,10 +362,110 @@ msgstr "" "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: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:347 +#: 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:351 +#: 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:374 +#: 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:380 +#: 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:385 +#: 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:392 +#: howto/instrumentation.rst:470 msgid "Examples" msgstr "Exemples" -#: howto/instrumentation.rst:393 +#: 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:412 +#: 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 ea79e0bc7c..625f2df79d 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: 2025-10-17 09:58+0200\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" diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index 032907b25a..ea71278697 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: 2025-10-17 09:58+0200\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é" @@ -445,8 +445,8 @@ msgstr "" #: 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:359 diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index cb22dacaab..eade5938b9 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: 2025-10-17 09:58+0200\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" @@ -1143,12 +1143,14 @@ msgstr "" "préalable :mod:`concurrent.futures`) ::" #: howto/logging-cookbook.rst:1553 -msgid "Deploying Web applications using Gunicorn and uWSGI" +#, fuzzy +msgid "Deploying web applications using Gunicorn and uWSGI" msgstr "Déploiement d’applications Web avec *Gunicorn* et *uWSGI*" #: 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 " @@ -1172,7 +1174,7 @@ msgstr "" msgid "Using file rotation" msgstr "Utilisation du roulement de fichiers" -#: howto/logging-cookbook.rst:1570 +#: howto/logging-cookbook.rst:1567 #, fuzzy msgid "" "Sometimes you want to let a log file grow to a certain size, then open a new " @@ -1190,7 +1192,7 @@ msgstr "" "d’usage, :class:`~handlers.RotatingFileHandler` est inclus dans le paquet de " "journalisation ::" -#: howto/logging-cookbook.rst:1602 +#: howto/logging-cookbook.rst:1599 msgid "" "The result should be 6 separate files, each with part of the log history for " "the application:" @@ -1198,7 +1200,7 @@ 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:1614 +#: 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 " @@ -1211,7 +1213,7 @@ msgstr "" "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:1619 +#: 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." @@ -1219,11 +1221,11 @@ 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:1627 +#: howto/logging-cookbook.rst:1624 msgid "Use of alternative formatting styles" msgstr "Utilisation d’autres styles de formatage" -#: howto/logging-cookbook.rst:1629 +#: 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 " @@ -1237,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:1635 +#: 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 " @@ -1261,7 +1263,7 @@ msgstr "" "ou :class:`string.Template`. Voici un exemple de session interactive en " "console pour montrer les possibilités :" -#: howto/logging-cookbook.rst:1669 +#: 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. " @@ -1272,7 +1274,7 @@ msgstr "" "individuel est construit. Vous pouvez toujours utiliser formatage *via* " "« % », comme ici ::" -#: howto/logging-cookbook.rst:1677 +#: 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 " @@ -1302,7 +1304,7 @@ msgstr "" "de journalisation dans le code pré-existant utilisent des chaînes au format " "« % »." -#: howto/logging-cookbook.rst:1690 +#: 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 " @@ -1316,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:1714 +#: 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 " @@ -1335,7 +1337,7 @@ msgstr "" "pas confondre avec _, le trait de soulignement unique utilisé comme alias " "pour :func:`gettext.gettext` ou ses homologues)." -#: howto/logging-cookbook.rst:1722 +#: 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 " @@ -1346,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:1744 +#: 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 " @@ -1356,7 +1358,7 @@ msgstr "" "fonctionne le formatage, utilisez bien sûr ``logger.debug()`` ou similaire " "pour journaliser avec cette approche." -#: howto/logging-cookbook.rst:1748 +#: howto/logging-cookbook.rst:1745 #, fuzzy msgid "" "One thing to note is that you pay no significant performance penalty with " @@ -1377,7 +1379,7 @@ msgstr "" "n’est que du sucre syntaxique pour un appel de constructeur à l’une des " "classes ``XXXMessage``." -#: howto/logging-cookbook.rst:1756 +#: 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::" @@ -1385,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:1785 +#: howto/logging-cookbook.rst:1782 #, fuzzy msgid "" "The above script should log the message ``Hello, world!`` when run with " @@ -1394,11 +1396,11 @@ 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:1794 +#: howto/logging-cookbook.rst:1791 msgid "Customizing ``LogRecord``" msgstr "Personnalisation de ``LogRecord``" -#: howto/logging-cookbook.rst:1796 +#: 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, " @@ -1417,7 +1419,7 @@ msgstr "" "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:1803 +#: 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." @@ -1426,7 +1428,7 @@ msgstr "" "journalisation d’un événement. Elle appelait :class:`LogRecord` directement " "pour créer une instance." -#: howto/logging-cookbook.rst:1806 +#: 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 " @@ -1440,7 +1442,7 @@ msgstr "" "*pickle* *via* un :class:`~handlers.SocketHandler`, ou sous format JSON " "*via* un :class:`~handlers.HTTPHandler`)." -#: howto/logging-cookbook.rst:1812 +#: 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." @@ -1449,7 +1451,7 @@ msgstr "" "spécial avec un :class:`LogRecord`, vous deviez faire l’une des choses " "suivantes." -#: howto/logging-cookbook.rst:1815 +#: howto/logging-cookbook.rst:1812 msgid "" "Create your own :class:`Logger` subclass, which " "overrides :meth:`Logger.makeRecord`, and set it " @@ -1461,7 +1463,7 @@ msgstr "" "de :func:`~logging.setLoggerClass` avant que les enregistreurs qui vous " "intéressaient ne soient instanciés." -#: howto/logging-cookbook.rst:1818 +#: 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 " @@ -1471,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:1822 +#: 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 " @@ -1483,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:1827 +#: 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 " @@ -1498,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:1835 +#: 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` " @@ -1515,7 +1517,7 @@ msgstr "" "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:1841 +#: 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 " @@ -1532,7 +1534,7 @@ msgstr "" "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:1848 +#: 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 " @@ -1545,7 +1547,7 @@ msgstr "" "l’enregistrement une fois créé, en utilisant un modèle similaire à celui-" "ci ::" -#: howto/logging-cookbook.rst:1861 +#: 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 " @@ -1563,17 +1565,17 @@ msgstr "" "l’utilisation d’un :class:`Filter` ne permet pas d’obtenir le résultat " "souhaité." -#: howto/logging-cookbook.rst:1873 +#: 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:1876 howto/logging-cookbook.rst:2009 +#: 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:1878 +#: 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 " @@ -1584,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:1897 +#: 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::" @@ -1592,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:1915 howto/logging-cookbook.rst:1945 +#: 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:1917 +#: 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::" @@ -1606,12 +1608,12 @@ msgstr "" "messages d’autres types de files d’attente, par exemple un connecteur " "*ZeroMQ subscribe*. Voici un exemple ::" -#: howto/logging-cookbook.rst:1935 +#: 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:1937 +#: 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 `_ de la documentation de *Django*." -#: howto/logging-cookbook.rst:2183 +#: 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:2185 +#: 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::" @@ -1682,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:2216 +#: 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:2229 +#: howto/logging-cookbook.rst:2226 msgid "A more elaborate multiprocessing example" msgstr "Exemple plus élaboré avec traitement en parallèle" -#: howto/logging-cookbook.rst:2231 +#: 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 " @@ -1706,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:2236 +#: 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 " @@ -1731,7 +1733,7 @@ msgstr "" "sont purement illustratives, mais vous devriez pouvoir adapter cet exemple à " "votre propre scénario." -#: howto/logging-cookbook.rst:2246 +#: howto/logging-cookbook.rst:2243 msgid "" "Here's the script - the docstrings and the comments hopefully explain how it " "works::" @@ -1739,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:2458 +#: 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:2460 +#: 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 " @@ -1757,7 +1759,7 @@ 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:2466 +#: 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 " @@ -1770,7 +1772,7 @@ msgstr "" "*BOM* apparaissant au début du message et n’autorisant donc aucun composant " "ASCII pur à être placé devant." -#: howto/logging-cookbook.rst:2472 +#: 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 " @@ -1785,7 +1787,7 @@ msgstr "" "Unicode arbitraire après, encodé en UTF-8, alors vous devez appliquer ce qui " "suit :" -#: howto/logging-cookbook.rst:2478 +#: howto/logging-cookbook.rst:2475 msgid "" "Attach a :class:`~logging.Formatter` instance to " "your :class:`~logging.handlers.SysLogHandler` instance, with a format string " @@ -1795,7 +1797,7 @@ msgstr "" "instance :class:`~logging.handlers.SysLogHandler`, avec une chaîne de format " "telle que ::" -#: howto/logging-cookbook.rst:2484 +#: 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'``." @@ -1803,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:2487 +#: 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 " @@ -1813,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:2491 +#: 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 " @@ -1824,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:2495 +#: 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 " @@ -1838,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:2502 +#: howto/logging-cookbook.rst:2499 msgid "Implementing structured logging" msgstr "Journalisation structurée" -#: howto/logging-cookbook.rst:2504 +#: 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 " @@ -1862,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:2528 +#: 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:2534 howto/logging-cookbook.rst:2576 +#: 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." @@ -1874,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:2537 +#: 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::" @@ -1882,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:2570 +#: 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:2585 +#: howto/logging-cookbook.rst:2582 msgid "Customizing handlers with :func:`dictConfig`" msgstr "Personnalisation des gestionnaires avec :func:`dictConfig`" -#: howto/logging-cookbook.rst:2587 +#: 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 " @@ -1909,7 +1911,7 @@ msgstr "" "personnaliser la création du gestionnaire à l’aide d’une fonction simple " "telle que ::" -#: howto/logging-cookbook.rst:2601 +#: 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 " @@ -1919,7 +1921,7 @@ msgstr "" "transmise à :func:`dictConfig`, qu’un gestionnaire de journalisation soit " "créé en appelant cette fonction ::" -#: howto/logging-cookbook.rst:2634 +#: 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 " @@ -1929,12 +1931,12 @@ msgstr "" "groupe ``pulse``, uniquement à des fins d’illustration. Rassemblons le tout " "dans un script ``chowntest.py`` ::" -#: howto/logging-cookbook.rst:2681 +#: 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:2691 +#: 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 " @@ -1949,7 +1951,7 @@ msgstr "" "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:2697 +#: 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::" @@ -1958,11 +1960,11 @@ msgstr "" "un module utilitaire ailleurs dans votre projet. Au lieu de cette ligne dans " "la configuration ::" -#: howto/logging-cookbook.rst:2702 +#: howto/logging-cookbook.rst:2699 msgid "you could use e.g.::" msgstr "vous pouvez écrire par exemple ::" -#: howto/logging-cookbook.rst:2706 +#: 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://" @@ -1975,7 +1977,7 @@ msgstr "" "l’appelable réel est résolu par :func:`dictConfig` à partir de la " "spécification ``ext://``." -#: howto/logging-cookbook.rst:2711 +#: 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 " @@ -1985,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:2715 +#: 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 " @@ -1996,11 +1998,11 @@ msgstr "" "des gestionnaires à roulement de fichiers ou un autre type de gestionnaire " "complètement différent." -#: howto/logging-cookbook.rst:2725 +#: howto/logging-cookbook.rst:2722 msgid "Using particular formatting styles throughout your application" msgstr "" -#: howto/logging-cookbook.rst:2727 +#: 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, " @@ -2011,7 +2013,7 @@ msgid "" "is constructed." msgstr "" -#: howto/logging-cookbook.rst:2734 +#: howto/logging-cookbook.rst:2731 #, fuzzy msgid "" "Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " @@ -2042,7 +2044,7 @@ msgstr "" "de journalisation dans le code pré-existant utilisent des chaînes au format " "« % »." -#: howto/logging-cookbook.rst:2746 +#: 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 " @@ -2050,7 +2052,7 @@ msgid "" "formatting." msgstr "" -#: howto/logging-cookbook.rst:2750 +#: 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 " @@ -2058,11 +2060,11 @@ msgid "" "formatting styles can be accommodated." msgstr "" -#: howto/logging-cookbook.rst:2757 +#: howto/logging-cookbook.rst:2754 msgid "Using LogRecord factories" msgstr "" -#: howto/logging-cookbook.rst:2759 +#: 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 " @@ -2077,17 +2079,17 @@ msgid "" "implementation does." msgstr "" -#: howto/logging-cookbook.rst:2770 +#: howto/logging-cookbook.rst:2767 msgid "" "Refer to the reference documentation on :func:`setLogRecordFactory` " "and :class:`LogRecord` for more information." msgstr "" -#: howto/logging-cookbook.rst:2775 +#: howto/logging-cookbook.rst:2772 msgid "Using custom message objects" msgstr "" -#: howto/logging-cookbook.rst:2777 +#: 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 " @@ -2097,7 +2099,7 @@ msgid "" "Consider the following two classes::" msgstr "" -#: howto/logging-cookbook.rst:2802 +#: 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 " @@ -2108,17 +2110,17 @@ msgid "" "using ``_`` for localization)." msgstr "" -#: howto/logging-cookbook.rst:2810 +#: howto/logging-cookbook.rst:2807 msgid "" "Examples of this approach are given below. Firstly, formatting " "with :meth:`str.format`::" msgstr "" -#: howto/logging-cookbook.rst:2824 +#: howto/logging-cookbook.rst:2821 msgid "Secondly, formatting with :class:`string.Template`::" msgstr "" -#: howto/logging-cookbook.rst:2831 +#: howto/logging-cookbook.rst:2828 #, fuzzy msgid "" "One thing to note is that you pay no significant performance penalty with " @@ -2140,11 +2142,11 @@ msgstr "" "n’est que du sucre syntaxique pour un appel de constructeur à l’une des " "classes ``XXXMessage``." -#: howto/logging-cookbook.rst:2845 +#: howto/logging-cookbook.rst:2842 msgid "Configuring filters with :func:`dictConfig`" msgstr "" -#: howto/logging-cookbook.rst:2847 +#: 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). " @@ -2159,22 +2161,22 @@ msgid "" "a :class:`~logging.Filter` instance). Here is a complete example::" msgstr "" -#: howto/logging-cookbook.rst:2900 +#: 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:2908 +#: howto/logging-cookbook.rst:2905 msgid "which shows that the filter is working as configured." msgstr "" -#: howto/logging-cookbook.rst:2910 +#: howto/logging-cookbook.rst:2907 msgid "A couple of extra points to note:" msgstr "" -#: howto/logging-cookbook.rst:2912 +#: 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 " @@ -2184,7 +2186,7 @@ msgid "" "the above example." msgstr "" -#: howto/logging-cookbook.rst:2919 +#: 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 " @@ -2193,11 +2195,11 @@ msgid "" "above." msgstr "" -#: howto/logging-cookbook.rst:2928 +#: howto/logging-cookbook.rst:2925 msgid "Customized exception formatting" msgstr "" -#: howto/logging-cookbook.rst:2930 +#: 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, " @@ -2205,22 +2207,22 @@ msgid "" "formatter class, as shown in the following example::" msgstr "" -#: howto/logging-cookbook.rst:2971 +#: howto/logging-cookbook.rst:2968 msgid "When run, this produces a file with exactly two lines:" msgstr "" -#: howto/logging-cookbook.rst:2978 +#: 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:2985 +#: howto/logging-cookbook.rst:2982 msgid "Speaking logging messages" msgstr "" -#: howto/logging-cookbook.rst:2987 +#: 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 " @@ -2237,24 +2239,24 @@ msgid "" "approach, which assumes that the ``espeak`` TTS package is available::" msgstr "" -#: howto/logging-cookbook.rst:3029 +#: 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:3031 +#: 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:3039 +#: howto/logging-cookbook.rst:3036 msgid "Buffering logging messages and outputting them conditionally" msgstr "" -#: howto/logging-cookbook.rst:3041 +#: 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 " @@ -2264,7 +2266,7 @@ msgid "" "debug information to be output as well as the error." msgstr "" -#: howto/logging-cookbook.rst:3048 +#: 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 " @@ -2277,7 +2279,7 @@ msgid "" "subclass of ``MemoryHandler`` if you want custom flushing behavior." msgstr "" -#: howto/logging-cookbook.rst:3058 +#: 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 " @@ -2286,7 +2288,7 @@ msgid "" "levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." msgstr "" -#: howto/logging-cookbook.rst:3064 +#: 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 " @@ -2298,30 +2300,30 @@ msgid "" "``logging.ERROR`` and ``100`` respectively." msgstr "" -#: howto/logging-cookbook.rst:3072 +#: howto/logging-cookbook.rst:3069 msgid "Here's the script::" msgstr "" -#: howto/logging-cookbook.rst:3135 +#: howto/logging-cookbook.rst:3132 msgid "When this script is run, the following output should be observed:" msgstr "" -#: howto/logging-cookbook.rst:3165 +#: 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:3169 +#: howto/logging-cookbook.rst:3166 msgid "You can of course use the conventional means of decoration::" msgstr "" -#: howto/logging-cookbook.rst:3179 +#: howto/logging-cookbook.rst:3176 msgid "Sending logging messages to email, with buffering" msgstr "" -#: howto/logging-cookbook.rst:3181 +#: 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 " @@ -2333,7 +2335,7 @@ msgid "" "optional arguments.)" msgstr "" -#: howto/logging-cookbook.rst:3253 +#: 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 " @@ -2341,17 +2343,17 @@ msgid "" "messages. That makes up 102 messages as specified in the script." msgstr "" -#: howto/logging-cookbook.rst:3261 +#: howto/logging-cookbook.rst:3258 msgid "Formatting times using UTC (GMT) via configuration" msgstr "" -#: howto/logging-cookbook.rst:3263 +#: 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:3272 +#: 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, " @@ -2359,21 +2361,21 @@ msgid "" "illustrated by the following complete example::" msgstr "" -#: howto/logging-cookbook.rst:3315 +#: howto/logging-cookbook.rst:3312 msgid "When this script is run, it should print something like:" msgstr "" -#: howto/logging-cookbook.rst:3322 +#: 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:3329 +#: howto/logging-cookbook.rst:3326 msgid "Using a context manager for selective logging" msgstr "" -#: howto/logging-cookbook.rst:3331 +#: 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 " @@ -2383,7 +2385,7 @@ msgid "" "scope of the context manager::" msgstr "" -#: howto/logging-cookbook.rst:3364 +#: 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 " @@ -2392,13 +2394,13 @@ msgid "" "block exit - you could do this if you don't need the handler any more." msgstr "" -#: howto/logging-cookbook.rst:3370 +#: 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:3388 +#: 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 " @@ -2411,56 +2413,56 @@ msgid "" "(like message #1) whereas message #7 doesn't (just like message #2)." msgstr "" -#: howto/logging-cookbook.rst:3398 +#: howto/logging-cookbook.rst:3395 msgid "If we run the resulting script, the result is as follows:" msgstr "" -#: howto/logging-cookbook.rst:3409 +#: 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:3417 +#: howto/logging-cookbook.rst:3414 msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" msgstr "" -#: howto/logging-cookbook.rst:3427 +#: 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:3429 +#: 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:3437 +#: howto/logging-cookbook.rst:3434 msgid "A CLI application starter template" msgstr "" -#: howto/logging-cookbook.rst:3439 +#: howto/logging-cookbook.rst:3436 msgid "Here's an example which shows how you can:" msgstr "" -#: howto/logging-cookbook.rst:3441 +#: howto/logging-cookbook.rst:3438 msgid "Use a logging level based on command-line arguments" msgstr "" -#: howto/logging-cookbook.rst:3442 +#: 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:3444 +#: howto/logging-cookbook.rst:3441 msgid "Make use of simple, minimal configuration" msgstr "" -#: howto/logging-cookbook.rst:3446 +#: 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 " @@ -2471,53 +2473,53 @@ msgid "" "``logging.INFO``. Here's one way that ``app.py`` could be written::" msgstr "" -#: howto/logging-cookbook.rst:3495 +#: 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:3508 +#: howto/logging-cookbook.rst:3505 msgid "and thus for stopping::" msgstr "" -#: howto/logging-cookbook.rst:3529 +#: howto/logging-cookbook.rst:3526 msgid "and similarly for restarting::" msgstr "" -#: howto/logging-cookbook.rst:3550 +#: 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:3563 +#: 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:3566 +#: 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:3583 +#: howto/logging-cookbook.rst:3580 msgid "And if we want less:" msgstr "" -#: howto/logging-cookbook.rst:3591 +#: 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:3597 +#: howto/logging-cookbook.rst:3594 msgid "A Qt GUI for logging" msgstr "" -#: howto/logging-cookbook.rst:3599 +#: 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-" @@ -2525,7 +2527,7 @@ msgid "" "or :pypi:`PyQt5` libraries." msgstr "" -#: howto/logging-cookbook.rst:3604 +#: 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 " @@ -2535,14 +2537,14 @@ msgid "" "logging messages at random levels with random short delays in between)." msgstr "" -#: howto/logging-cookbook.rst:3611 +#: 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:3615 +#: 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 " @@ -2550,29 +2552,29 @@ msgid "" "more detailed information." msgstr "" -#: howto/logging-cookbook.rst:3852 +#: howto/logging-cookbook.rst:3848 msgid "Logging to syslog with RFC5424 support" msgstr "" -#: howto/logging-cookbook.rst:3854 +#: 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 " +"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:3861 +#: 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:3927 +#: 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 " @@ -2581,11 +2583,11 @@ msgid "" "using something like this::" msgstr "" -#: howto/logging-cookbook.rst:3941 +#: howto/logging-cookbook.rst:3937 msgid "How to treat a logger like an output stream" msgstr "" -#: howto/logging-cookbook.rst:3943 +#: 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 " @@ -2593,17 +2595,17 @@ msgid "" "API. Here's a short script illustrating such a class:" msgstr "" -#: howto/logging-cookbook.rst:3983 +#: howto/logging-cookbook.rst:3979 msgid "When this script is run, it prints" msgstr "" -#: howto/logging-cookbook.rst:3990 +#: howto/logging-cookbook.rst:3986 msgid "" "You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and " "``sys.stderr`` by doing something like this:" msgstr "" -#: howto/logging-cookbook.rst:4000 +#: 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 " @@ -2611,25 +2613,25 @@ msgid "" "instance). Then, you'd get this kind of result:" msgstr "" -#: howto/logging-cookbook.rst:4013 +#: 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." msgstr "" -#: howto/logging-cookbook.rst:4017 +#: 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:4026 +#: howto/logging-cookbook.rst:4022 msgid "then running the script results in" msgstr "" -#: howto/logging-cookbook.rst:4044 +#: 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 " @@ -2639,17 +2641,17 @@ msgid "" "``LoggerWriter``:" msgstr "" -#: howto/logging-cookbook.rst:4069 +#: 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:4082 +#: howto/logging-cookbook.rst:4078 msgid "How to uniformly handle newlines in logging output" msgstr "" -#: howto/logging-cookbook.rst:4084 +#: 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 " @@ -2660,39 +2662,39 @@ msgid "" "handler mixin, as in the following snippet:" msgstr "" -#: howto/logging-cookbook.rst:4110 +#: howto/logging-cookbook.rst:4106 msgid "You can use the mixin as in the following script:" msgstr "" -#: howto/logging-cookbook.rst:4131 +#: 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:4143 +#: 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:4167 +#: 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:4177 +#: 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:4183 +#: howto/logging-cookbook.rst:4179 msgid "Patterns to avoid" msgstr "" -#: howto/logging-cookbook.rst:4185 +#: 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 " @@ -2700,11 +2702,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: howto/logging-cookbook.rst:4191 +#: howto/logging-cookbook.rst:4187 msgid "Opening the same log file multiple times" msgstr "" -#: howto/logging-cookbook.rst:4193 +#: 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. " @@ -2712,32 +2714,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: howto/logging-cookbook.rst:4198 +#: 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:4201 +#: 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:4204 +#: 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:4208 +#: 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:4211 +#: 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 " @@ -2746,7 +2748,7 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: howto/logging-cookbook.rst:4217 +#: 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 " @@ -2756,17 +2758,17 @@ msgid "" "being supposedly in place." msgstr "" -#: howto/logging-cookbook.rst:4224 +#: howto/logging-cookbook.rst:4220 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: howto/logging-cookbook.rst:4228 +#: howto/logging-cookbook.rst:4224 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: howto/logging-cookbook.rst:4230 +#: 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 " @@ -2777,13 +2779,13 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: howto/logging-cookbook.rst:4239 +#: howto/logging-cookbook.rst:4235 msgid "" "Adding handlers other than :class:`~logging.NullHandler` to a logger in a " "library" msgstr "" -#: howto/logging-cookbook.rst:4241 +#: 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 " @@ -2791,11 +2793,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: howto/logging-cookbook.rst:4247 +#: howto/logging-cookbook.rst:4243 msgid "Creating a lot of loggers" msgstr "" -#: howto/logging-cookbook.rst:4249 +#: 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. " @@ -2806,39 +2808,39 @@ msgid "" "occasionally slightly more fine-grained than that)." msgstr "" -#: howto/logging-cookbook.rst:4260 +#: howto/logging-cookbook.rst:4256 msgid "Other resources" msgstr "Autres ressources" -#: howto/logging-cookbook.rst:4264 +#: howto/logging-cookbook.rst:4260 msgid "Module :mod:`logging`" msgstr "Module :mod:`logging`" -#: howto/logging-cookbook.rst:4265 +#: 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:4267 +#: howto/logging-cookbook.rst:4263 msgid "Module :mod:`logging.config`" msgstr "Module :mod:`logging.config`" -#: howto/logging-cookbook.rst:4268 +#: 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:4270 +#: howto/logging-cookbook.rst:4266 msgid "Module :mod:`logging.handlers`" msgstr "Module :mod:`logging.handlers`" -#: howto/logging-cookbook.rst:4271 +#: 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:4273 +#: howto/logging-cookbook.rst:4269 msgid ":ref:`Basic Tutorial `" msgstr ":ref:`Tutoriel de découverte `" -#: howto/logging-cookbook.rst:4275 +#: howto/logging-cookbook.rst:4271 msgid ":ref:`Advanced Tutorial `" msgstr ":ref:`Tutoriel avancé `" diff --git a/howto/logging.po b/howto/logging.po index 7dd390f529..8e81e00ebb 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: 2025-10-17 09:58+0200\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,7 +64,7 @@ msgstr "Quand utiliser ``logging``" #, fuzzy msgid "" "You can access logging functionality by creating a logger via ``logger = " -"getLogger(__name__)``, and then calling the " +"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 " diff --git a/howto/perf_profiling.po b/howto/perf_profiling.po index caf5cba34d..8af98a7159 100644 --- a/howto/perf_profiling.po +++ b/howto/perf_profiling.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -16,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 @@ -29,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 " @@ -83,16 +86,52 @@ 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 <-" @@ -100,59 +139,60 @@ msgid "" "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 " @@ -162,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." 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 " @@ -184,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 " @@ -205,7 +245,7 @@ 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 " @@ -214,7 +254,7 @@ msgid "" "dwarf,16384``." msgstr "" -#: howto/perf_profiling.rst:263 +#: 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 " @@ -223,7 +263,7 @@ msgid "" "will be higher." msgstr "" -#: howto/perf_profiling.rst:269 +#: 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 " @@ -232,22 +272,22 @@ msgid "" "size to 65528 bytes (the maximum)::" msgstr "" -#: howto/perf_profiling.rst:277 +#: howto/perf_profiling.rst:304 msgid "Different compilation flags can significantly impact stack sizes:" msgstr "" -#: howto/perf_profiling.rst:279 +#: 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:280 +#: howto/perf_profiling.rst:307 msgid "" "Adding optimizations (``-O1``, ``-O2``, etc.) typically reduces stack size" msgstr "" -#: howto/perf_profiling.rst:281 +#: howto/perf_profiling.rst:308 msgid "" "Frame pointers (``-fno-omit-frame-pointer``) generally provide more reliable " "stack unwinding" diff --git a/howto/regex.po b/howto/regex.po index a5fd655b7c..90218b3792 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: 2025-10-17 09:58+0200\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 @@ -385,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 @@ -532,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" @@ -546,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 " @@ -646,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 @@ -662,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 @@ -714,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 @@ -820,10 +831,11 @@ 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`, " +"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 "" @@ -863,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 @@ -878,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:1072 +#: howto/regex.rst:418 howto/regex.rst:1074 msgid "Method/Attribute" msgstr "Méthode/Attribut" -#: howto/regex.rst:417 howto/regex.rst:1072 +#: 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 " +"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 " @@ -938,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::" @@ -953,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 ``+`` " @@ -968,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 " @@ -990,54 +1013,55 @@ 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. ::" +"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 " @@ -1048,7 +1072,7 @@ msgstr "" "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 +#: 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 " @@ -1058,7 +1082,7 @@ 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::" @@ -1067,13 +1091,14 @@ msgstr "" "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 " @@ -1082,7 +1107,7 @@ msgstr "" "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 " @@ -1094,15 +1119,17 @@ msgstr "" "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`, " +"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. ::" @@ -1115,7 +1142,7 @@ msgstr "" "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 " @@ -1127,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, " @@ -1140,11 +1167,12 @@ 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 " @@ -1165,7 +1193,7 @@ msgstr "" "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." @@ -1173,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." @@ -1194,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 " @@ -1274,7 +1302,7 @@ msgstr "" "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." @@ -1283,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 " @@ -1321,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`.)" @@ -1329,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 " @@ -1348,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." @@ -1357,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 " @@ -1368,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 " @@ -1376,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 " @@ -1389,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? ::" @@ -1397,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 " @@ -1412,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 " @@ -1427,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." @@ -1439,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; " @@ -1460,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*. " @@ -1480,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 ``[|]``." @@ -1488,11 +1519,11 @@ 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. " @@ -1504,7 +1535,7 @@ msgstr "" "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``. ::" @@ -1512,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. ::" @@ -1528,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 ``[$]``." @@ -1536,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` " @@ -1555,27 +1586,27 @@ msgstr "" "aussi aux emplacements situés immédiatement après une nouvelle ligne à " "l'intérieur de la chaîne." -#: howto/regex.rst:741 +#: 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:745 +#: howto/regex.rst:747 msgid "The same as ``\\z``. For compatibility with old Python versions." msgstr "" -#: howto/regex.rst:747 +#: howto/regex.rst:749 msgid "``\\b``" msgstr "``\\b``" -#: howto/regex.rst:748 +#: 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 " @@ -1587,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:753 +#: 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. ::" @@ -1596,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:764 +#: 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 " @@ -1616,7 +1647,7 @@ msgstr "" "ressemble à notre RE précédente, mais nous avons omis le ``'r'`` devant la " "chaîne RE. ::" -#: howto/regex.rst:778 +#: 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 " @@ -1626,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:782 +#: howto/regex.rst:784 msgid "``\\B``" msgstr "``\\B``" -#: howto/regex.rst:783 +#: 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." @@ -1639,11 +1670,11 @@ msgstr "" "dire qu'elle fait correspondre uniquement les emplacements qui ne sont pas à " "la limite d'un mot." -#: howto/regex.rst:788 +#: howto/regex.rst:790 msgid "Grouping" msgstr "Regroupement" -#: howto/regex.rst:790 +#: 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 " @@ -1659,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:803 +#: 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 " @@ -1669,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:807 +#: howto/regex.rst:809 msgid "" "Groups are marked by the ``'('``, ``')'`` metacharacters. ``'('`` and " "``')'`` have much the same meaning as they do in mathematical expressions; " @@ -1685,7 +1716,7 @@ msgstr "" "quantificateur, comme ``*``, ``+``, ``?`` ou ``{m,n}``. Par exemple, " "``(ab)*`` correspond à zéro, une ou plusieurs fois ``ab``. ::" -#: howto/regex.rst:818 +#: 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 " @@ -1707,7 +1738,7 @@ msgstr "" "groupes qui ne capturent pas l'étendue du texte avec lequel ils " "correspondent. ::" -#: howto/regex.rst:834 +#: 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 " @@ -1718,7 +1749,7 @@ msgstr "" "suffit de compter le nombre de parenthèses ouvrantes de la gauche vers la " "droite. ::" -#: howto/regex.rst:847 +#: 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 " @@ -1728,7 +1759,7 @@ msgstr "" "même temps, elle vous renvoie alors un *n*-uplet contenant les valeurs " "correspondantes pour ces groupes. ::" -#: howto/regex.rst:853 +#: 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. ::" @@ -1737,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:859 +#: 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 " @@ -1755,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:867 +#: 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:873 +#: 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 " @@ -1772,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:879 -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:881 +#: 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 " @@ -1792,7 +1824,7 @@ msgstr "" "expressions régulières. Nous allons donc commencer en examinant cette " "syntaxe." -#: howto/regex.rst:887 +#: 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 " @@ -1811,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:894 +#: 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 " @@ -1830,7 +1862,7 @@ msgstr "" "``(?:truc)`` est une autre chose (la sous-expression ``truc`` que l'on " "groupe)." -#: howto/regex.rst:902 +#: 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 " @@ -1841,7 +1873,7 @@ msgstr "" "d'interrogation est ``P``, cela signifie que c'est une extension spécifique " "à Python." -#: howto/regex.rst:907 +#: 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." @@ -1850,7 +1882,7 @@ msgstr "" "aux fonctionnalités qui simplifient le travail avec les groupes dans des RE " "complexes." -#: howto/regex.rst:910 +#: 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 " @@ -1864,7 +1896,7 @@ msgstr "" "``(?:...)``, où vous remplacez les ``...`` par n'importe quelle expression " "régulière. ::" -#: howto/regex.rst:922 +#: 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 " @@ -1886,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:931 +#: 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." @@ -1895,7 +1927,7 @@ msgstr "" "faire référence par des nombres, vous pouvez référencer des groupes par leur " "nom." -#: howto/regex.rst:934 +#: 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 " @@ -1916,7 +1948,7 @@ msgstr "" "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:949 +#: howto/regex.rst:951 msgid "" "Additionally, you can retrieve named groups as a dictionary " "with :meth:`~re.Match.groupdict`::" @@ -1924,7 +1956,7 @@ msgstr "" "De plus, vous pouvez récupérer les groupes nommés comme dictionnaire " "avec :meth:`~re.Match.groupdict` ::" -#: howto/regex.rst:956 +#: 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 " @@ -1933,7 +1965,7 @@ 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:967 +#: howto/regex.rst:969 msgid "" "It's obviously much easier to retrieve ``m.group('zonem')``, instead of " "having to remember to retrieve group 9." @@ -1941,7 +1973,7 @@ 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:970 +#: 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 " @@ -1959,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:983 -msgid "Lookahead Assertions" +#: howto/regex.rst:985 +#, fuzzy +msgid "Lookahead assertions" msgstr "Assertions prédictives" -#: howto/regex.rst:985 +#: 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 " @@ -1973,11 +2006,11 @@ msgstr "" "assertion prédictive peut s'exprimer sous deux formes, la positive et la " "négative, comme ceci :" -#: howto/regex.rst:988 +#: howto/regex.rst:990 msgid "``(?=...)``" msgstr "``(?=...)``" -#: howto/regex.rst:989 +#: howto/regex.rst:991 msgid "" "Positive lookahead assertion. This succeeds if the contained regular " "expression, represented here by ``...``, successfully matches at the current " @@ -1992,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:995 +#: howto/regex.rst:997 msgid "``(?!...)``" msgstr "``(?!...)``" -#: howto/regex.rst:996 +#: 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 " @@ -2006,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:1000 +#: 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 " @@ -2019,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:1005 +#: 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:1007 +#: howto/regex.rst:1009 msgid "``.*[.].*$``" msgstr "``.*[.].*$``" -#: howto/regex.rst:1009 +#: 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 " @@ -2043,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:1016 +#: 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:" @@ -2052,12 +2085,12 @@ msgstr "" "correspondre les noms de fichiers dont l'extension n'est pas ``bat`` ? voici " "quelques tentatives incorrectes :" -#: howto/regex.rst:1019 +#: howto/regex.rst:1021 #, fuzzy msgid "``.*[.][^b].*$``" msgstr "``.*[.].*$``" -#: howto/regex.rst:1021 +#: howto/regex.rst:1023 #, fuzzy msgid "" "The first attempt above tries to exclude ``bat`` by requiring that the first " @@ -2068,11 +2101,11 @@ msgstr "" "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:1025 +#: howto/regex.rst:1027 msgid "``.*[.]([^b]..|.[^a].|..[^t])$``" msgstr "``.*[.]([^b]..|.[^a].|..[^t])$``" -#: howto/regex.rst:1027 +#: 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 " @@ -2091,11 +2124,11 @@ msgstr "" "``sendmail.cf``. Compliquons encore une fois le motif pour essayer de le " "réparer." -#: howto/regex.rst:1035 +#: howto/regex.rst:1037 msgid "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" msgstr "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" -#: howto/regex.rst:1037 +#: 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 " @@ -2105,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:1041 +#: 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 " @@ -2117,16 +2150,16 @@ msgstr "" "à la fois ``bat`` et ``exe`` en tant qu'extensions, le modèle deviendra " "encore plus compliqué et confus." -#: howto/regex.rst:1046 +#: 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:1048 +#: howto/regex.rst:1050 #, fuzzy msgid "``.*[.](?!bat$)[^.]*$``" msgstr "``.*[.](?!bat$|exe$)[^.]*$``" -#: howto/regex.rst:1050 +#: howto/regex.rst:1052 #, fuzzy msgid "" "The negative lookahead means: if the expression ``bat`` doesn't match at " @@ -2144,7 +2177,7 @@ msgstr "" "``[^...]*`` s'assure que le motif fonctionne lorsqu'il y a plusieurs points " "dans le nom de fichier." -#: howto/regex.rst:1057 +#: 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 " @@ -2154,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:1061 +#: howto/regex.rst:1063 msgid "``.*[.](?!bat$|exe$)[^.]*$``" msgstr "``.*[.](?!bat$|exe$)[^.]*$``" -#: howto/regex.rst:1065 -msgid "Modifying Strings" +#: howto/regex.rst:1067 +#, fuzzy +msgid "Modifying strings" msgstr "Modification de chaînes" -#: howto/regex.rst:1067 +#: 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 " @@ -2173,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:1074 +#: howto/regex.rst:1076 msgid "``split()``" msgstr "``split()``" -#: howto/regex.rst:1074 +#: 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:1077 +#: howto/regex.rst:1079 msgid "``sub()``" msgstr "``sub()``" -#: howto/regex.rst:1077 +#: howto/regex.rst:1079 msgid "" "Find all substrings where the RE matches, and replace them with a different " "string" @@ -2195,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:1080 +#: howto/regex.rst:1082 msgid "``subn()``" msgstr "``subn()``" -#: howto/regex.rst:1080 +#: howto/regex.rst:1082 msgid "" "Does the same thing as :meth:`!sub`, but returns the new string and the " "number of replacements" @@ -2207,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:1087 -msgid "Splitting Strings" +#: howto/regex.rst:1089 +#, fuzzy +msgid "Splitting strings" msgstr "Découpage de chaînes" -#: howto/regex.rst:1089 +#: 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 " @@ -2228,7 +2263,7 @@ msgstr "" "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:1100 +#: 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 " @@ -2240,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:1105 +#: 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 " @@ -2254,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:1117 +#: 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 " @@ -2266,7 +2301,7 @@ msgstr "" "la RE, leurs valeurs sont également renvoyées dans la liste. Comparons les " "appels suivants ::" -#: howto/regex.rst:1129 +#: 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. ::" @@ -2274,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:1141 -msgid "Search and Replace" +#: howto/regex.rst:1143 +#, fuzzy +msgid "Search and replace" msgstr "Recherche et substitution" -#: howto/regex.rst:1143 +#: 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 " @@ -2290,7 +2326,7 @@ msgstr "" "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:1150 +#: 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 " @@ -2300,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:1154 +#: 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 " @@ -2310,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:1158 +#: 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``::" @@ -2318,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:1167 +#: 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 " @@ -2328,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:1176 +#: howto/regex.rst:1178 msgid "" "Empty matches are replaced only when they're not adjacent to a previous " "empty match. ::" @@ -2336,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:1183 +#: 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 " @@ -2354,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:1190 +#: howto/regex.rst:1192 msgid "" "This example matches the word ``section`` followed by a string enclosed in " "``{``, ``}``, and changes ``section`` to ``subsection``::" @@ -2362,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:1197 +#: 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 " @@ -2383,7 +2419,7 @@ msgstr "" "substitutions suivantes sont toutes équivalentes mais utilisent les trois " "variantes de la chaîne de remplacement. ::" -#: howto/regex.rst:1214 +#: 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-" @@ -2398,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:1220 +#: howto/regex.rst:1222 msgid "" "In the following example, the replacement function translates decimals into " "hexadecimal::" @@ -2406,7 +2442,7 @@ msgstr "" "Dans l'exemple suivant, la fonction de substitution convertit un nombre " "décimal en hexadécimal ::" -#: howto/regex.rst:1232 +#: 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 " @@ -2423,11 +2459,12 @@ msgstr "" "chaîne de caractères, par exemple ``sub(\"(?i)b+\", \"x\", \"bbbb BBBBB\")`` " "renvoie ``'x x'``." -#: howto/regex.rst:1240 -msgid "Common Problems" +#: howto/regex.rst:1242 +#, fuzzy +msgid "Common problems" msgstr "Problèmes classiques" -#: howto/regex.rst:1242 +#: 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 " @@ -2439,11 +2476,12 @@ 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:1248 -msgid "Use String Methods" +#: howto/regex.rst:1250 +#, fuzzy +msgid "Use string methods" msgstr "Utilisez les méthodes du type *string*" -#: howto/regex.rst:1250 +#: 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 " @@ -2464,7 +2502,7 @@ msgstr "" "boucle C qui a été optimisée, au lieu du gros moteur d'expressions " "régulières plus généraliste." -#: howto/regex.rst:1258 +#: 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 " @@ -2486,7 +2524,7 @@ msgstr "" "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:1267 +#: 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 " @@ -2500,7 +2538,7 @@ msgstr "" "``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:1273 +#: 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." @@ -2508,72 +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:1278 -msgid "match() versus search()" +#: howto/regex.rst:1282 +#, fuzzy +msgid "prefixmatch() (aka match) versus search()" msgstr "*match()* contre *search()*" -#: howto/regex.rst:1280 +#: howto/regex.rst:1284 +msgid "" +":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 "" + +#: howto/regex.rst:1289 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:`!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 "" -"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:1291 +#: 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:1299 -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:1308 -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:1314 -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:1316 +#: 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 " @@ -2588,7 +2602,7 @@ msgstr "" "pour faire correspondre une seule balise HTML ne fonctionne pas en raison de " "la nature gloutonne de ``.*``. ::" -#: howto/regex.rst:1330 +#: 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 ``>`` " @@ -2605,7 +2619,7 @@ msgstr "" "correspondance finale s'étend du ``'<'`` de ``''`` au ``'>'`` de ``''``, ce qui n'est pas ce que vous voulez." -#: howto/regex.rst:1337 +#: 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 " @@ -2620,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:1346 +#: 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 " @@ -2636,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:1354 +#: howto/regex.rst:1351 msgid "Using re.VERBOSE" msgstr "Utilisez *re.VERBOSE*" -#: howto/regex.rst:1356 +#: 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 " @@ -2653,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:1361 +#: 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 " @@ -2663,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:1365 +#: 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 " @@ -2683,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:1382 +#: howto/regex.rst:1379 msgid "This is far more readable than::" msgstr "Ceci est beaucoup plus lisible que ::" -#: howto/regex.rst:1388 +#: howto/regex.rst:1385 msgid "Feedback" msgstr "Vos commentaires" -#: howto/regex.rst:1390 +#: 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:1395 +#: 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. " @@ -2722,6 +2737,53 @@ msgstr "" "supprimé, ce qui ne vous aidera pas beaucoup.) Pensez à le retirer de votre " "bibliothèque." +#~ 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. ::" +#~ 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 " diff --git a/howto/remote_debugging.po b/howto/remote_debugging.po index a3186bbd92..532a7640a0 100644 --- a/howto/remote_debugging.po +++ b/howto/remote_debugging.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -32,22 +31,44 @@ msgid "" "process." msgstr "" +#: howto/remote_debugging.rst:12 +msgid "Disabling remote debugging" +msgstr "" + #: howto/remote_debugging.rst:14 -msgid "Permission requirements" +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:21 +#: howto/remote_debugging.rst:31 msgid "Linux" msgstr "Linux" -#: howto/remote_debugging.rst:22 +#: 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 " @@ -56,109 +77,109 @@ msgid "" "tracing." msgstr "" -#: howto/remote_debugging.rst:28 +#: howto/remote_debugging.rst:38 msgid "To temporarily relax ptrace restrictions (until reboot), run:" msgstr "" -#: howto/remote_debugging.rst:30 +#: howto/remote_debugging.rst:40 msgid "``echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope``" msgstr "" -#: howto/remote_debugging.rst:34 +#: 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:37 +#: 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:40 +#: howto/remote_debugging.rst:50 msgid "Try re-running the command with elevated privileges:" msgstr "" -#: howto/remote_debugging.rst:42 +#: howto/remote_debugging.rst:52 msgid "``sudo -E !!``" msgstr "" -#: howto/remote_debugging.rst:46 +#: howto/remote_debugging.rst:56 msgid "macOS" msgstr "macOS" -#: howto/remote_debugging.rst:47 +#: 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:51 +#: 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:56 +#: howto/remote_debugging.rst:66 msgid "Windows" msgstr "Windows" -#: howto/remote_debugging.rst:57 +#: 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:61 +#: 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:64 +#: howto/remote_debugging.rst:74 msgid "" "To resolve file or folder access issues, adjust the security permissions:" msgstr "" -#: howto/remote_debugging.rst:66 +#: howto/remote_debugging.rst:76 msgid "Right-click the file or folder and select **Properties**." msgstr "" -#: howto/remote_debugging.rst:67 +#: howto/remote_debugging.rst:77 msgid "Go to the **Security** tab to view users and groups with access." msgstr "" -#: howto/remote_debugging.rst:68 +#: howto/remote_debugging.rst:78 msgid "Click **Edit** to modify permissions." msgstr "" -#: howto/remote_debugging.rst:69 +#: howto/remote_debugging.rst:79 msgid "Select your user account." msgstr "" -#: howto/remote_debugging.rst:70 +#: howto/remote_debugging.rst:80 msgid "In **Permissions**, check **Read** or **Full control** as needed." msgstr "" -#: howto/remote_debugging.rst:71 +#: howto/remote_debugging.rst:81 msgid "Click **Apply**, then **OK** to confirm." msgstr "" -#: howto/remote_debugging.rst:76 +#: howto/remote_debugging.rst:86 msgid "" "Ensure you've satisfied all :ref:`permission-requirements` before proceeding." msgstr "" -#: howto/remote_debugging.rst:78 +#: 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:81 +#: 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, " @@ -169,14 +190,14 @@ msgid "" "of the protocol, regardless of programming language." msgstr "" -#: howto/remote_debugging.rst:91 +#: 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:95 +#: 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 " @@ -184,7 +205,7 @@ msgid "" "structure of the running Python application." msgstr "" -#: howto/remote_debugging.rst:100 +#: 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 " @@ -193,11 +214,11 @@ msgid "" "included to clarify each operation." msgstr "" -#: howto/remote_debugging.rst:107 +#: howto/remote_debugging.rst:117 msgid "Locating the PyRuntime structure" msgstr "" -#: howto/remote_debugging.rst:109 +#: 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 " @@ -206,14 +227,14 @@ msgid "" "structure by examining the binary on disk." msgstr "" -#: howto/remote_debugging.rst:115 +#: 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:119 +#: 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 " @@ -221,65 +242,65 @@ msgid "" "where the operating system loaded the binary." msgstr "" -#: howto/remote_debugging.rst:124 +#: 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:127 +#: 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:129 +#: howto/remote_debugging.rst:139 msgid "" "Use the on-disk binary to locate the offset of the ``.PyRuntime`` section." msgstr "" -#: howto/remote_debugging.rst:130 +#: 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:132 +#: 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:136 +#: howto/remote_debugging.rst:146 msgid "Linux (ELF)" msgstr "" -#: howto/remote_debugging.rst:137 +#: howto/remote_debugging.rst:147 msgid "To find the ``PyRuntime`` structure on Linux:" msgstr "" -#: howto/remote_debugging.rst:139 +#: 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:141 +#: 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:143 +#: 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:208 howto/remote_debugging.rst:547 +#: howto/remote_debugging.rst:218 howto/remote_debugging.rst:557 msgid "The following is an example implementation::" msgstr "" -#: howto/remote_debugging.rst:169 +#: 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 " @@ -293,7 +314,7 @@ msgid "" "multiple context switches between the tracer and tracee processes." msgstr "" -#: howto/remote_debugging.rst:180 +#: 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 " @@ -306,34 +327,34 @@ msgid "" "memory." msgstr "" -#: howto/remote_debugging.rst:189 +#: howto/remote_debugging.rst:199 msgid "" "You can read more about the ELF file format in the `ELF specification " "`_." msgstr "" -#: howto/remote_debugging.rst:194 +#: howto/remote_debugging.rst:204 msgid "macOS (Mach-O)" msgstr "" -#: howto/remote_debugging.rst:195 +#: howto/remote_debugging.rst:205 msgid "To find the ``PyRuntime`` structure on macOS:" msgstr "" -#: howto/remote_debugging.rst:197 +#: 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:200 +#: 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:202 +#: 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 " @@ -342,7 +363,7 @@ msgid "" "is not affected." msgstr "" -#: howto/remote_debugging.rst:233 +#: 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 " @@ -351,7 +372,7 @@ msgid "" "``mach_vm_read_overwrite()``." msgstr "" -#: howto/remote_debugging.rst:239 +#: 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 " @@ -360,7 +381,7 @@ msgid "" "locate the ``PyRuntime`` structure." msgstr "" -#: howto/remote_debugging.rst:244 +#: 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 " @@ -371,22 +392,22 @@ msgid "" "section offsets from the Mach-O headers." msgstr "" -#: howto/remote_debugging.rst:252 +#: 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:258 +#: howto/remote_debugging.rst:268 msgid "Windows (PE)" msgstr "" -#: howto/remote_debugging.rst:259 +#: howto/remote_debugging.rst:269 msgid "To find the ``PyRuntime`` structure on Windows:" msgstr "" -#: howto/remote_debugging.rst:261 +#: 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 `_." msgstr "" -#: howto/remote_debugging.rst:268 +#: 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:271 +#: 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 " @@ -412,13 +433,13 @@ msgid "" "structure." msgstr "" -#: howto/remote_debugging.rst:275 +#: 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:302 +#: howto/remote_debugging.rst:312 msgid "" "On Windows, accessing another process's memory requires using the Windows " "API functions like ``CreateToolhelp32Snapshot()`` and ``Module32First()/" @@ -427,14 +448,14 @@ msgid "" "memory operations through ``ReadProcessMemory()``." msgstr "" -#: howto/remote_debugging.rst:308 +#: 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:312 +#: 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 " @@ -445,25 +466,25 @@ msgid "" "address from the PE section headers." msgstr "" -#: howto/remote_debugging.rst:319 +#: 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:325 +#: howto/remote_debugging.rst:335 msgid "Reading _Py_DebugOffsets" msgstr "" -#: howto/remote_debugging.rst:327 +#: 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:331 +#: 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 " @@ -471,11 +492,11 @@ msgid "" "compatible." msgstr "" -#: howto/remote_debugging.rst:335 +#: howto/remote_debugging.rst:345 msgid "To read and check the debug offsets, follow these steps:" msgstr "" -#: howto/remote_debugging.rst:337 +#: 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. " @@ -484,51 +505,51 @@ msgid "" "same within a given minor version, but may change in major versions." msgstr "" -#: howto/remote_debugging.rst:343 +#: howto/remote_debugging.rst:353 msgid "Check that the structure contains valid data:" msgstr "" -#: howto/remote_debugging.rst:345 +#: howto/remote_debugging.rst:355 msgid "The ``cookie`` field must match the expected debug marker." msgstr "" -#: howto/remote_debugging.rst:346 +#: 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:348 +#: 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:351 +#: 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:354 +#: 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:358 +#: howto/remote_debugging.rst:368 msgid "" "The following is an example implementation that reads and checks " "``_Py_DebugOffsets``::" msgstr "" -#: howto/remote_debugging.rst:386 +#: howto/remote_debugging.rst:396 msgid "**Process suspension recommended**" msgstr "" -#: howto/remote_debugging.rst:388 +#: 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 " @@ -538,14 +559,14 @@ msgid "" "memory reads or writes." msgstr "" -#: howto/remote_debugging.rst:395 +#: 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:401 +#: 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 " @@ -554,11 +575,11 @@ msgid "" "robust approach." msgstr "" -#: howto/remote_debugging.rst:409 +#: howto/remote_debugging.rst:419 msgid "Locating the interpreter and thread state" msgstr "" -#: howto/remote_debugging.rst:411 +#: 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 " @@ -568,7 +589,7 @@ msgid "" "request execution of injected scripts." msgstr "" -#: howto/remote_debugging.rst:418 +#: 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 " @@ -577,7 +598,7 @@ msgid "" "remotely." msgstr "" -#: howto/remote_debugging.rst:423 +#: 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 " @@ -585,11 +606,11 @@ msgid "" "both the interpreter and the associated thread state structures in memory." msgstr "" -#: howto/remote_debugging.rst:428 +#: howto/remote_debugging.rst:438 msgid "The relevant internal structures are defined as follows:" msgstr "" -#: howto/remote_debugging.rst:430 +#: 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, " @@ -597,31 +618,31 @@ msgid "" "interpreter, CPython supports multiple interpreters in the same process." msgstr "" -#: howto/remote_debugging.rst:435 +#: 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:438 +#: howto/remote_debugging.rst:448 msgid "To locate a thread:" msgstr "" -#: howto/remote_debugging.rst:440 +#: 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:444 +#: 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:448 +#: 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`` " @@ -629,37 +650,37 @@ msgid "" "target thread ID to find a specific thread." msgstr "" -#: howto/remote_debugging.rst:453 +#: 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:457 +#: howto/remote_debugging.rst:467 msgid "" "The following is an example implementation that locates the main thread " "state::" msgstr "" -#: howto/remote_debugging.rst:480 +#: 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:510 +#: 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:515 +#: howto/remote_debugging.rst:525 msgid "Writing control information" msgstr "" -#: howto/remote_debugging.rst:517 +#: 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 " @@ -668,7 +689,7 @@ msgid "" "code at a safe point in the evaluation loop." msgstr "" -#: howto/remote_debugging.rst:523 +#: howto/remote_debugging.rst:533 msgid "" "Each ``PyThreadState`` contains a ``_PyRemoteDebuggerSupport`` structure " "used for communication between the debugger and the interpreter. The " @@ -676,60 +697,60 @@ msgid "" "and include the following:" msgstr "" -#: howto/remote_debugging.rst:528 +#: 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:532 +#: 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:535 +#: 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:539 +#: howto/remote_debugging.rst:549 msgid "" "To complete the injection, the debugger must perform the following steps:" msgstr "" -#: howto/remote_debugging.rst:541 +#: howto/remote_debugging.rst:551 msgid "Write the full script path into the ``debugger_script_path`` buffer." msgstr "" -#: howto/remote_debugging.rst:542 +#: howto/remote_debugging.rst:552 msgid "Set ``debugger_pending_call`` to ``1``." msgstr "" -#: howto/remote_debugging.rst:543 +#: 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:586 +#: 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:590 +#: 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:595 +#: 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 " @@ -740,42 +761,129 @@ msgid "" "the file is no longer needed." msgstr "" -#: howto/remote_debugging.rst:604 +#: howto/remote_debugging.rst:614 msgid "Summary" msgstr "" -#: howto/remote_debugging.rst:606 +#: howto/remote_debugging.rst:616 msgid "To inject and execute a Python script in a remote process:" msgstr "" -#: howto/remote_debugging.rst:608 +#: howto/remote_debugging.rst:618 msgid "Locate the ``PyRuntime`` structure in the target process’s memory." msgstr "" -#: howto/remote_debugging.rst:609 +#: howto/remote_debugging.rst:619 msgid "" "Read and validate the ``_Py_DebugOffsets`` structure at the beginning of " "``PyRuntime``." msgstr "" -#: howto/remote_debugging.rst:611 +#: howto/remote_debugging.rst:621 msgid "Use the offsets to locate a valid ``PyThreadState``." msgstr "" -#: howto/remote_debugging.rst:612 +#: howto/remote_debugging.rst:622 msgid "Write the path to a Python script into ``debugger_script_path``." msgstr "" -#: howto/remote_debugging.rst:613 +#: howto/remote_debugging.rst:623 msgid "Set the ``debugger_pending_call`` flag to ``1``." msgstr "" -#: howto/remote_debugging.rst:614 +#: howto/remote_debugging.rst:624 msgid "Set ``_PY_EVAL_PLEASE_STOP_BIT`` in the ``eval_breaker`` field." msgstr "" -#: howto/remote_debugging.rst:615 +#: 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 a0d23df703..f562ef084c 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: 2025-10-17 09:58+0200\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é" diff --git a/howto/unicode.po b/howto/unicode.po index 6f9627485b..512c690444 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: 2025-10-17 09:58+0200\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" @@ -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" @@ -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\", " @@ -693,11 +693,11 @@ msgstr "" "www.unicode.org/reports/tr44/#General_Category_Values>`_ (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 " @@ -730,7 +730,7 @@ msgstr "" "lettre allemande « *ß* » (point de code ``U+00DF``), qui devient la paire de " "lettres minuscules « *ss* »." -#: howto/unicode.rst:425 +#: howto/unicode.rst:427 msgid "" "A second tool is the :mod:`unicodedata` " "module's :func:`~unicodedata.normalize` function that converts strings to " @@ -743,15 +743,15 @@ msgstr "" "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 :" +"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:448 +#: 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', " @@ -761,13 +761,13 @@ 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 +#: 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-" @@ -780,11 +780,11 @@ msgstr "" "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 " @@ -800,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::" @@ -808,7 +808,7 @@ 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 " @@ -818,7 +818,7 @@ msgstr "" "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`` " @@ -829,13 +829,13 @@ 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 `_, " @@ -845,7 +845,7 @@ msgstr "" "notes.curiousefficiency.org/en/latest/python3/text_file_processing.html>`_, " "par Nick Coghlan." -#: howto/unicode.rst:521 +#: howto/unicode.rst:523 msgid "" "`Pragmatic Unicode `_, a PyCon " "2012 presentation by Ned Batchelder." @@ -853,7 +853,7 @@ 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`." @@ -861,15 +861,15 @@ 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 " @@ -883,11 +883,11 @@ msgstr "" "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 " @@ -898,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 " @@ -914,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 " @@ -928,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-" @@ -953,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 " @@ -974,11 +974,11 @@ msgstr "" "*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::" @@ -986,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 " @@ -1010,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 " @@ -1024,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 " @@ -1051,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 " @@ -1066,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." @@ -1074,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 " @@ -1099,11 +1099,11 @@ msgstr "" "` est UTF-8, exécuter le programme " "suivant ::" -#: howto/unicode.rst:647 +#: 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." @@ -1111,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 " @@ -1124,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." @@ -1136,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." @@ -1149,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 " @@ -1164,7 +1164,7 @@ msgstr "" "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 " @@ -1187,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 " @@ -1202,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::" @@ -1211,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 " @@ -1227,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 " @@ -1240,7 +1240,7 @@ 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 " @@ -1251,7 +1251,7 @@ msgstr "" "anglais), donnée lors de *PyCon* 2010 de David Beazley, parle du traitement " "de texte et du traitement des données binaires." -#: howto/unicode.rst:741 +#: howto/unicode.rst:743 msgid "" "The `PDF slides for Marc-André Lemburg's presentation \"Writing Unicode-" "aware Applications in Python\" `_ is a PyCon 2013 talk by Benjamin Peterson that " @@ -1277,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 " @@ -1291,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 026149637c..8a13b5023c 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: 2025-10-17 09:58+0200\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 " @@ -40,7 +44,7 @@ msgstr "" #: howto/urllib2.rst:18 msgid "" "`Basic Authentication `_" +"www.voidspace.org.uk/python/articles/authentication.shtml>`__" msgstr "" #: howto/urllib2.rst:20 diff --git a/improve-page-nojs.po b/improve-page-nojs.po new file mode 100644 index 0000000000..d5874477c4 --- /dev/null +++ b/improve-page-nojs.po @@ -0,0 +1,54 @@ +# 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-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 0000000000..bc0d0d2b62 --- /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 eddf291af6..d419ffcb86 100644 --- a/installing/index.po +++ b/installing/index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -16,29 +16,23 @@ msgstr "" "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,7 +44,7 @@ msgstr "" "résoudre les problèmes communs (ou même, parfois, rares !), aussi que de " "partager leurs propres solutions à tous." -#: installing/index.rst:20 +#: 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 " @@ -60,7 +54,7 @@ msgstr "" "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 " @@ -72,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 " @@ -94,39 +89,35 @@ 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 " @@ -139,31 +130,14 @@ msgstr "" "documentation, et d'outils de suivi des problèmes sur `GitHub `__." -#: 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." - -#: 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 " "`__" @@ -172,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." @@ -184,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`." @@ -200,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 " @@ -210,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 " @@ -222,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 " @@ -232,16 +207,18 @@ 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 " @@ -251,7 +228,7 @@ msgstr "" "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 " "`__" @@ -259,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." @@ -305,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 " @@ -324,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 `__" @@ -332,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 " @@ -384,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. `__" +"setuptools-and-wheel-are-up-to-date>`__." 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 " @@ -443,11 +405,12 @@ 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 " +"wheel files may also help with obtaining other binary extensions without " "needing to build them locally." msgstr "" "Certaines solutions pour installer des `paquets scientifiques `__" 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 e9ed9f7e9a..0c5de98438 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: 2025-10-17 09:58+0200\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" @@ -37,7 +37,7 @@ msgstr "" 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 "" @@ -50,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 : " @@ -65,9 +66,9 @@ 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 2.1)." +"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 " "versions antérieures à 2.1 lèvent au moins des exceptions à l'exécution " @@ -79,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 "" diff --git a/library/_thread.po b/library/_thread.po index 21520f03dd..61fd7be533 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: 2025-10-17 09:58+0200\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" @@ -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,11 +65,11 @@ 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 " @@ -87,7 +83,7 @@ msgstr "" "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." @@ -95,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 " @@ -117,7 +113,7 @@ 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 " @@ -126,7 +122,7 @@ msgstr "" "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 " @@ -137,11 +133,11 @@ msgstr "" "à :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, " @@ -151,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." @@ -159,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." @@ -167,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 " @@ -182,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 " @@ -195,15 +191,19 @@ 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 "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 " @@ -241,11 +241,11 @@ msgstr "" "suggérée est l'utilisation de multiples de 4 096 octets pour la taille de la " "pile)." -#: library/_thread.rst:150 +#: 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 " @@ -256,11 +256,15 @@ msgstr "" "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 " @@ -272,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 " @@ -285,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 " @@ -298,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." @@ -306,22 +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:190 +#: 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:196 +#: library/_thread.rst:203 msgid "" "Releases the lock. The lock must have been acquired earlier, but not " "necessarily by the same thread." @@ -329,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:202 +#: library/_thread.rst:208 msgid "" "Return the status of the lock: ``True`` if it has been acquired by some " "thread, ``False`` if not." @@ -337,7 +341,7 @@ msgstr "" "Renvoie le statut du verrou : ``True`` s'il a été acquis par certains fils " "d'exécution, sinon ``False``." -#: library/_thread.rst:205 +#: library/_thread.rst:211 msgid "" "In addition to these methods, lock objects can also be used via " "the :keyword:`with` statement, e.g.::" @@ -345,17 +349,17 @@ 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:215 +#: library/_thread.rst:221 msgid "**Caveats:**" msgstr "**Avertissements :**" -#: library/_thread.rst:219 +#: 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:222 +#: library/_thread.rst:228 msgid "" "Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is " "equivalent to calling :func:`_thread.exit`." @@ -363,7 +367,7 @@ msgstr "" "Appeler la fonction :func:`sys.exit` ou lever l'exception :exc:`SystemExit` " "est équivalent à appeler la fonction :func:`_thread.exit`." -#: library/_thread.rst:225 +#: 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 " diff --git a/library/abc.po b/library/abc.po index dda001abfd..4fa365180f 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: 2025-10-17 09:58+0200\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,11 +20,11 @@ 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`; " @@ -41,7 +41,7 @@ msgstr "" "utiliserons l'abréviation ABC (*Abstract Base Class*) pour désigner une " "classe mère abstraite." -#: library/abc.rst:20 +#: library/abc.rst:16 #, fuzzy msgid "" "The :mod:`collections` module has some concrete classes that derive from " @@ -57,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:" @@ -66,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, " @@ -77,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 " @@ -93,11 +93,11 @@ msgstr "" "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)." -#: 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 " @@ -119,7 +119,7 @@ msgstr "" "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 " @@ -128,20 +128,20 @@ 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 " @@ -150,15 +150,15 @@ 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 " @@ -174,7 +174,7 @@ msgstr "" "méthode de classe est appelée par la méthode :meth:`__subclasscheck__` de la " "classe mère abstraite)." -#: library/abc.rst:104 +#: library/abc.rst:100 #, fuzzy msgid "" "This method should return ``True``, ``False`` or :data:`NotImplemented`. If " @@ -190,14 +190,14 @@ 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 " @@ -213,7 +213,7 @@ msgstr "" "mère 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 " @@ -227,7 +227,7 @@ msgstr "" "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``, " @@ -245,16 +245,16 @@ msgstr "" "de ``MyIterable`` disponible comme une méthode de ``Foo``, ``get_iterator`` " "est donc implémenté séparément." -#: library/abc.rst:163 +#: 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` " @@ -272,7 +272,7 @@ msgstr "" "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 " @@ -289,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 " @@ -300,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, " @@ -316,7 +316,7 @@ msgstr "" "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` " @@ -330,13 +330,13 @@ msgstr "" "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." @@ -344,7 +344,7 @@ msgstr "" "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`." @@ -353,7 +353,7 @@ msgstr "" "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::" @@ -362,7 +362,7 @@ 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." @@ -370,7 +370,7 @@ msgstr "" "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`." @@ -379,7 +379,7 @@ msgstr "" "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::" @@ -388,7 +388,7 @@ 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` " @@ -400,12 +400,12 @@ msgstr "" "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::" @@ -414,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 " @@ -424,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::" @@ -433,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. " @@ -453,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 " @@ -465,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." @@ -483,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 index a796d3e562..72fefeed00 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/annotationlib.po b/library/annotationlib.po index 2335436ff4..c6e166cca6 100644 --- a/library/annotationlib.po +++ b/library/annotationlib.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -456,7 +455,7 @@ msgid "" "exist, the :attr:`!object.__annotate__` function is called if it exists." msgstr "" -#: library/annotationlib.rst:343 +#: library/annotationlib.rst:344 msgid "" "FORWARDREF: If :attr:`!object.__annotations__` exists and can be evaluated " "successfully, it is used; otherwise, the :attr:`!object.__annotate__` " @@ -465,25 +464,46 @@ msgid "" "raised." msgstr "" -#: library/annotationlib.rst:347 +#: 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:351 +#: 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:355 +#: library/annotationlib.rst:370 msgid "This function handles several details for you:" msgstr "" -#: library/annotationlib.rst:357 +#: 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 " @@ -491,33 +511,33 @@ msgid "" "to true with formats other than :attr:`Format.VALUE`." msgstr "" -#: library/annotationlib.rst:362 +#: 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:366 +#: 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:369 +#: 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:372 +#: 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:375 +#: 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; " @@ -525,13 +545,13 @@ msgid "" "the :func:`!get_annotations` call.)" msgstr "" -#: library/annotationlib.rst:379 +#: library/annotationlib.rst:394 msgid "" "If *eval_str* is false (the default), values of type :class:`!str` are " "unchanged." msgstr "" -#: library/annotationlib.rst:382 +#: 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:`!" @@ -539,18 +559,18 @@ msgid "" "contingent on ``type(obj)``:" msgstr "" -#: library/annotationlib.rst:387 +#: library/annotationlib.rst:402 msgid "If *obj* is a module, *globals* defaults to ``obj.__dict__``." msgstr "" -#: library/annotationlib.rst:388 +#: 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:391 +#: library/annotationlib.rst:406 msgid "" "If *obj* is a callable, *globals* defaults to :attr:`obj.__globals__ " "`, although if *obj* is a wrapped function " @@ -558,21 +578,21 @@ msgid "" "object, it is unwrapped until a non-wrapped function is found." msgstr "" -#: library/annotationlib.rst:397 +#: 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:412 +#: 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:416 +#: 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 " @@ -581,15 +601,15 @@ msgid "" "commonly encountered in annotations." msgstr "" -#: library/annotationlib.rst:426 +#: library/annotationlib.rst:441 msgid "Recipes" msgstr "Cas pratiques" -#: library/annotationlib.rst:431 +#: library/annotationlib.rst:446 msgid "Using annotations in a metaclass" msgstr "" -#: library/annotationlib.rst:433 +#: 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 " @@ -603,39 +623,112 @@ msgid "" "names that cannot yet be resolved when the class is created." msgstr "" -#: library/annotationlib.rst:444 +#: 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:448 +#: 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:499 +#: 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:501 +#: 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:505 +#: 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:509 +#: 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 " @@ -645,13 +738,13 @@ msgid "" "access to any globals or builtins. For example:" msgstr "" -#: library/annotationlib.rst:524 +#: 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:527 +#: 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, " @@ -660,169 +753,169 @@ msgid "" "output or an error." msgstr "" -#: library/annotationlib.rst:532 +#: library/annotationlib.rst:622 msgid "The following are supported (sometimes with caveats):" msgstr "" -#: library/annotationlib.rst:534 +#: library/annotationlib.rst:624 msgid ":class:`ast.BinOp`" msgstr "" -#: library/annotationlib.rst:535 +#: library/annotationlib.rst:625 msgid ":class:`ast.UnaryOp`" msgstr "" -#: library/annotationlib.rst:537 +#: library/annotationlib.rst:627 msgid "" ":class:`ast.Invert` (``~``), :class:`ast.UAdd` (``+``), " "and :class:`ast.USub` (``-``) are supported" msgstr "" -#: library/annotationlib.rst:538 +#: library/annotationlib.rst:628 msgid ":class:`ast.Not` (``not``) is not supported" msgstr "" -#: library/annotationlib.rst:540 +#: library/annotationlib.rst:630 msgid ":class:`ast.Dict` (except when using ``**`` unpacking)" msgstr "" -#: library/annotationlib.rst:541 +#: library/annotationlib.rst:631 msgid ":class:`ast.Set`" msgstr "" -#: library/annotationlib.rst:542 +#: library/annotationlib.rst:632 msgid ":class:`ast.Compare`" msgstr "" -#: library/annotationlib.rst:544 +#: library/annotationlib.rst:634 msgid ":class:`ast.Eq` and :class:`ast.NotEq` are supported" msgstr "" -#: library/annotationlib.rst:545 +#: 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:546 +#: 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:548 +#: library/annotationlib.rst:638 msgid ":class:`ast.Call` (except when using ``**`` unpacking)" msgstr "" -#: library/annotationlib.rst:549 +#: 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:551 +#: library/annotationlib.rst:641 msgid ":class:`ast.Attribute` (assuming the value is not a constant)" msgstr "" -#: library/annotationlib.rst:552 +#: library/annotationlib.rst:642 msgid ":class:`ast.Subscript` (assuming the value is not a constant)" msgstr "" -#: library/annotationlib.rst:553 +#: library/annotationlib.rst:643 msgid ":class:`ast.Starred` (``*`` unpacking)" msgstr "" -#: library/annotationlib.rst:554 +#: library/annotationlib.rst:644 msgid ":class:`ast.Name`" msgstr "" -#: library/annotationlib.rst:555 +#: library/annotationlib.rst:645 msgid ":class:`ast.List`" msgstr "" -#: library/annotationlib.rst:556 +#: library/annotationlib.rst:646 msgid ":class:`ast.Tuple`" msgstr "" -#: library/annotationlib.rst:557 +#: library/annotationlib.rst:647 msgid ":class:`ast.Slice`" msgstr "" -#: library/annotationlib.rst:559 +#: library/annotationlib.rst:649 msgid "" "The following are unsupported, but throw an informative error when " "encountered by the stringifier:" msgstr "" -#: library/annotationlib.rst:562 +#: 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:564 +#: library/annotationlib.rst:654 msgid ":class:`ast.JoinedStr` (f-strings)" msgstr "" -#: library/annotationlib.rst:566 +#: library/annotationlib.rst:656 msgid "The following are unsupported and result in incorrect output:" msgstr "" -#: library/annotationlib.rst:568 +#: library/annotationlib.rst:658 msgid ":class:`ast.BoolOp` (``and`` and ``or``)" msgstr "" -#: library/annotationlib.rst:569 +#: library/annotationlib.rst:659 msgid ":class:`ast.IfExp`" msgstr "" -#: library/annotationlib.rst:570 +#: library/annotationlib.rst:660 msgid ":class:`ast.Lambda`" msgstr "" -#: library/annotationlib.rst:571 +#: library/annotationlib.rst:661 msgid ":class:`ast.ListComp`" msgstr "" -#: library/annotationlib.rst:572 +#: library/annotationlib.rst:662 msgid ":class:`ast.SetComp`" msgstr "" -#: library/annotationlib.rst:573 +#: library/annotationlib.rst:663 msgid ":class:`ast.DictComp`" msgstr "" -#: library/annotationlib.rst:574 +#: library/annotationlib.rst:664 msgid ":class:`ast.GeneratorExp`" msgstr "" -#: library/annotationlib.rst:576 +#: library/annotationlib.rst:666 msgid "" "The following are disallowed in annotation scopes and therefore not relevant:" msgstr "" -#: library/annotationlib.rst:578 +#: library/annotationlib.rst:668 msgid ":class:`ast.NamedExpr` (``:=``)" msgstr "" -#: library/annotationlib.rst:579 +#: library/annotationlib.rst:669 msgid ":class:`ast.Await`" msgstr "" -#: library/annotationlib.rst:580 +#: library/annotationlib.rst:670 msgid ":class:`ast.Yield`" msgstr "" -#: library/annotationlib.rst:581 +#: library/annotationlib.rst:671 msgid ":class:`ast.YieldFrom`" msgstr "" -#: library/annotationlib.rst:585 +#: library/annotationlib.rst:675 msgid "Limitations of the ``FORWARDREF`` format" msgstr "" -#: library/annotationlib.rst:587 +#: 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 " @@ -832,15 +925,15 @@ msgid "" "exceptions when evaluated using the :attr:`~Format.FORWARDREF` format." msgstr "" -#: library/annotationlib.rst:594 +#: library/annotationlib.rst:684 msgid "Below are a few examples of the behavior with unsupported expressions:" msgstr "" -#: library/annotationlib.rst:615 +#: library/annotationlib.rst:705 msgid "Security implications of introspecting annotations" msgstr "" -#: library/annotationlib.rst:617 +#: 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 " @@ -853,7 +946,7 @@ msgid "" "with annotations, such as :func:`typing.get_type_hints`." msgstr "" -#: library/annotationlib.rst:626 +#: 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 " diff --git a/library/argparse.po b/library/argparse.po index 3dff383272..11b5da2cd5 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: 2025-10-17 09:58+0200\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,14 +24,14 @@ 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:16 +#: 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 " +"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 " @@ -41,11 +41,11 @@ msgid "" "another defined option)." msgstr "" -#: library/argparse.rst:-1 +#: library/argparse.rst:25 msgid "Tutorial" msgstr "Tutoriel" -#: library/argparse.rst:30 +#: 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 " @@ -55,7 +55,7 @@ msgstr "" "à l'analyse des arguments de la ligne de commande, regardez :ref:`le " "tutoriel argparse `." -#: library/argparse.rst:34 +#: library/argparse.rst:31 #, fuzzy msgid "" "The :mod:`!argparse` module makes it easy to write user-friendly command-" @@ -72,7 +72,7 @@ msgstr "" "les messages d'aide, le mode d'emploi, et lève des erreurs lorsque les " "utilisateurs fournissent des arguments invalides." -#: library/argparse.rst:40 +#: library/argparse.rst:37 #, fuzzy msgid "" "The :mod:`!argparse` module's support for command-line interfaces is built " @@ -85,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:49 +#: library/argparse.rst:46 msgid "" "The :meth:`ArgumentParser.add_argument` method attaches individual argument " "specifications to the parser. It supports positional arguments, options " @@ -97,7 +97,7 @@ msgstr "" "booléennes). Les arguments ont la possibilité d'être complétés par des " "valeurs ::" -#: library/argparse.rst:58 +#: 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::" @@ -105,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:65 +#: 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:69 +#: library/argparse.rst:66 msgid "ArgumentParser objects" msgstr "Objets ``ArgumentParser``" -#: library/argparse.rst:79 +#: 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 " @@ -126,7 +126,7 @@ 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:83 +#: library/argparse.rst:80 #, fuzzy msgid "" "prog_ - The name of the program (default: generated from the ``__main__`` " @@ -134,7 +134,7 @@ msgid "" msgstr "" "prog_ – Nom du programme (par défaut : ``os.path.basename(sys.argv[0])``) ;" -#: library/argparse.rst:86 +#: library/argparse.rst:83 msgid "" "usage_ - The string describing the program usage (default: generated from " "arguments added to parser)" @@ -142,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:89 +#: 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:92 +#: 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:94 +#: library/argparse.rst:91 msgid "" "parents_ - A list of :class:`ArgumentParser` objects whose arguments should " "also be included" @@ -162,12 +162,12 @@ msgstr "" "parents_ – Liste d'objets :class:`ArgumentParser` contenant des arguments " "qui devraient aussi être inclus ;" -#: library/argparse.rst:97 +#: 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:99 +#: library/argparse.rst:96 msgid "" "prefix_chars_ - The set of characters that prefix optional arguments " "(default: '-')" @@ -175,7 +175,7 @@ msgstr "" "prefix_chars_ – Jeu de caractères qui précède les arguments optionnels (par " "défaut : ``'-'``) ;" -#: library/argparse.rst:102 +#: library/argparse.rst:99 msgid "" "fromfile_prefix_chars_ - The set of characters that prefix files from which " "additional arguments should be read (default: ``None``)" @@ -183,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:105 +#: library/argparse.rst:102 msgid "" "argument_default_ - The global default value for arguments (default: " "``None``)" @@ -191,7 +191,7 @@ msgstr "" "argument_default_ – Valeur globale par défaut pour les arguments (par " "défaut : ``None``) ;" -#: library/argparse.rst:108 +#: library/argparse.rst:105 msgid "" "conflict_handler_ - The strategy for resolving conflicting optionals " "(usually unnecessary)" @@ -199,14 +199,14 @@ msgstr "" "conflict_handler_ – Stratégie pour résoudre les conflits entre les arguments " "optionnels (non-nécessaire en général) ;" -#: library/argparse.rst:111 +#: 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:113 +#: library/argparse.rst:110 #, fuzzy msgid "" "allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is " @@ -215,7 +215,7 @@ msgstr "" "allow_abbrev_ – Permet l'acceptation d'abréviations non-ambigües pour les " "options longues (par défaut : ``True``) ;" -#: library/argparse.rst:116 +#: library/argparse.rst:113 #, fuzzy msgid "" "exit_on_error_ - Determines whether or not :class:`!ArgumentParser` exits " @@ -225,21 +225,21 @@ msgstr "" "avec un message d'erreur quand une erreur est rencontrée (par défaut : " "``True``)." -#: library/argparse.rst:119 +#: library/argparse.rst:116 msgid "" "suggest_on_error_ - Enables suggestions for mistyped argument choices and " -"subparser names (default: ``False``)" +"subparser names (default: ``True``)" msgstr "" -#: library/argparse.rst:122 +#: library/argparse.rst:119 msgid "color_ - Allow color output (default: ``True``)" msgstr "" -#: library/argparse.rst:124 +#: library/argparse.rst:121 msgid "*allow_abbrev* parameter was added." msgstr "Le paramètre *allow_abbrev* est ajouté." -#: library/argparse.rst:127 +#: library/argparse.rst:124 msgid "" "In previous versions, *allow_abbrev* also disabled grouping of short flags " "such as ``-vv`` to mean ``-v -v``." @@ -248,16 +248,20 @@ msgstr "" "regroupement de plusieurs options courtes telles que ``-vv`` pour signifier " "``-v -v``." -#: library/argparse.rst:131 +#: library/argparse.rst:128 msgid "*exit_on_error* parameter was added." msgstr "Le paramètre *exit_on_error* est ajouté." -#: library/argparse.rst:134 +#: 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:684 +#: 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 " @@ -773,32 +777,31 @@ 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 list the " -"permissible argument choices (if specified) or subparser names as part of " -"the error message." +"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:602 +#: library/argparse.rst:611 +#, fuzzy msgid "" -"If the user would like to enable suggestions for mistyped argument choices " -"and subparser names, the feature can be enabled by setting " -"``suggest_on_error`` to ``True``. Note that this only applies for arguments " -"when the choices specified are strings::" +"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:615 +#: library/argparse.rst:614 msgid "" -"If you're writing code that needs to be compatible with older Python " -"versions and want to opportunistically use ``suggest_on_error`` when it's " -"available, you can set it as an attribute after initializing the parser " -"instead of using the keyword argument::" +"Changed default value of ``suggest_on_error`` from ``False`` to ``True``." msgstr "" -#: library/argparse.rst:627 +#: library/argparse.rst:618 msgid "color" msgstr "*color*" -#: library/argparse.rst:629 +#: library/argparse.rst:620 msgid "" "By default, the help message is printed in color using `ANSI escape " "sequences `__. If you want " @@ -807,11 +810,32 @@ msgid "" "by setting ``color`` to ``False``::" msgstr "" -#: library/argparse.rst:646 +#: 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:652 +#: 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:" @@ -819,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:655 +#: library/argparse.rst:669 #, fuzzy msgid "" "`name or flags`_ - Either a name or a list of option strings, e.g. ``'foo'`` " @@ -828,7 +852,7 @@ msgstr "" "`name_or_flags`_ – Nom ou liste de chaînes d'options. Par exemple : ``foo`` " "ou ``-f, --foo`` ;" -#: library/argparse.rst:658 +#: library/argparse.rst:672 msgid "" "action_ - The basic type of action to be taken when this argument is " "encountered at the command line." @@ -836,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:661 +#: 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:663 +#: 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:665 +#: 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." @@ -854,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:668 +#: 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:670 +#: 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:672 +#: library/argparse.rst:686 msgid "" "required_ - Whether or not the command-line option may be omitted (optionals " "only)." @@ -873,15 +897,15 @@ msgstr "" "required_ – ``True`` si l'option sur la ligne de commande est obligatoire " "(ne s'applique qu'aux arguments optionnels) ;" -#: library/argparse.rst:675 +#: 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:677 +#: 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:679 +#: library/argparse.rst:693 msgid "" "dest_ - The name of the attribute to be added to the object returned " "by :meth:`parse_args`." @@ -889,15 +913,19 @@ msgstr "" "dest_ – Nom de l'attribut qui est ajouté à l'objet retourné " "par :meth:`parse_args`." -#: library/argparse.rst:682 +#: library/argparse.rst:696 msgid "deprecated_ - Whether or not use of the argument is deprecated." msgstr "" -#: library/argparse.rst:690 +#: 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:692 +#: 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 " @@ -911,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:698 +#: 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:702 +#: 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:706 +#: 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 " @@ -929,21 +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:721 +#: 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. The dest_ parameter defaults to the argument name with " -"underscores ``_`` replacing hyphens ``-`` . The metavar_ parameter defaults " -"to the upper-cased name. For example::" +"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:744 +#: library/argparse.rst:760 msgid "action" msgstr "Le paramètre *action*" -#: library/argparse.rst:746 +#: 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 " @@ -960,7 +988,7 @@ msgstr "" "indique comment l'argument de la ligne de commande est traité. Les actions " "natives sont :" -#: library/argparse.rst:752 +#: library/argparse.rst:768 #, fuzzy msgid "" "``'store'`` - This just stores the argument's value. This is the default " @@ -969,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:755 +#: 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 " @@ -981,20 +1009,19 @@ msgstr "" "généralement utilisée avec des arguments optionnels représentant un drapeau " "ou une condition similaire. Par exemple ::" -#: library/argparse.rst:765 +#: 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:777 +#: library/argparse.rst:793 #, fuzzy msgid "" "``'append'`` - This appends each argument value to a list. It is useful for " @@ -1009,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:788 +#: 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_ " @@ -1023,30 +1050,31 @@ msgstr "" "arguments ont besoin de stocker des constantes dans une seule liste. Par " "exemple ::" -#: library/argparse.rst:800 +#: 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:815 +#: 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:823 +#: 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:825 +#: 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 " @@ -1059,7 +1087,7 @@ msgstr "" "Consultez :class:`ArgumentParser` pour les détails de la création du contenu " "de l'aide." -#: library/argparse.rst:830 +#: library/argparse.rst:846 msgid "" "``'version'`` - This expects a ``version=`` keyword argument in " "the :meth:`~ArgumentParser.add_argument` call, and prints version " @@ -1069,7 +1097,7 @@ msgstr "" "Cette action requiert l'argument nommé ``version=`` dans l'appel " "à :meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:840 +#: library/argparse.rst:856 #, fuzzy msgid "" "You may also specify an arbitrary action by passing an :class:`Action` " @@ -1083,7 +1111,7 @@ msgstr "" "``BooleanOptionalAction`` est disponible dans ``argparse`` et elle ajoute la " "gestion des options booléennes telles que ``--foo`` et ``--no-foo`` ::" -#: library/argparse.rst:846 +#: library/argparse.rst:862 #, fuzzy msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " @@ -1097,19 +1125,19 @@ msgstr "" "également l'option de surcharger les méthodes ``__init__`` et " "``format_usage``." -#: library/argparse.rst:851 +#: library/argparse.rst:867 msgid "An example of a custom action::" msgstr "Un exemple d'action personnalisée ::" -#: library/argparse.rst:871 +#: library/argparse.rst:887 msgid "For more details, see :class:`Action`." msgstr "Pour plus d'information, voir :class:`Action`." -#: library/argparse.rst:877 +#: library/argparse.rst:893 msgid "nargs" msgstr "Le paramètre *nargs*" -#: library/argparse.rst:879 +#: library/argparse.rst:895 #, fuzzy msgid "" ":class:`ArgumentParser` objects usually associate a single command-line " @@ -1123,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:884 +#: library/argparse.rst:900 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" @@ -1131,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:893 +#: 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." @@ -1140,7 +1168,7 @@ msgstr "" "différent du comportement par défaut qui produit l'élément directement " "(comme un scalaire)." -#: library/argparse.rst:898 +#: 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 " @@ -1156,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:915 +#: library/argparse.rst:931 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" @@ -1164,7 +1192,7 @@ msgstr "" "``nargs='?'`` est fréquemment utilisé pour accepter des fichiers d'entrée et " "de sortie optionnels ::" -#: library/argparse.rst:930 +#: 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 " @@ -1177,7 +1205,7 @@ msgstr "" "d'avoir plusieurs arguments optionnels qui spécifient ``nargs='*'``. Par " "exemple ::" -#: library/argparse.rst:944 +#: library/argparse.rst:960 #, fuzzy msgid "" "``'+'``. Just like ``'*'``, all command-line arguments present are gathered " @@ -1189,7 +1217,7 @@ msgstr "" "produit s'il n'y a pas au moins un argument présent sur la ligne de " "commande. Par exemple ::" -#: library/argparse.rst:956 +#: library/argparse.rst:972 #, fuzzy msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " @@ -1202,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:966 +#: library/argparse.rst:982 msgid "const" msgstr "Le paramètre *const*" -#: library/argparse.rst:968 +#: 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 " @@ -1218,7 +1246,7 @@ msgstr "" "est requise par certaines actions d':class:`ArgumentParser`. Les deux " "utilisations les plus communes sont :" -#: library/argparse.rst:972 +#: library/argparse.rst:988 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -1237,7 +1265,7 @@ msgstr "" # Nous sommes dans une énumération après un :, donc pas de majuscule et le # paragraphe doit se terminer par ;. -#: library/argparse.rst:980 +#: library/argparse.rst:996 #, fuzzy msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " @@ -1253,7 +1281,7 @@ msgstr "" "l'analyseur prend ``None`` comme la valeur de ``const``. La description de " "nargs_ offre quelques exemples." -#: library/argparse.rst:987 +#: library/argparse.rst:1003 msgid "" "``const=None`` by default, including when ``action='append_const'`` or " "``action='store_const'``." @@ -1261,11 +1289,11 @@ msgstr "" "``const=None`` par défaut, y compris avec ``action='append_const'`` ou " "``action='store_const'``." -#: library/argparse.rst:994 +#: library/argparse.rst:1010 msgid "default" msgstr "Le paramètre *default*" -#: library/argparse.rst:996 +#: library/argparse.rst:1012 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument " @@ -1281,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:1010 +#: library/argparse.rst:1026 #, fuzzy msgid "" "If the target namespace already has an attribute set, the action *default* " @@ -1290,7 +1318,7 @@ msgstr "" "Si l'objet ``namespace`` cible a déjà un attribut assigné, l'action " "*default* ne l'écrase pas ::" -#: library/argparse.rst:1018 +#: 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_ " @@ -1304,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:1029 +#: 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::" @@ -1313,14 +1341,14 @@ msgstr "" "valeur de ``default`` est utilisée quand l'argument est absent de la ligne " "de commande ::" -#: library/argparse.rst:1039 +#: 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:1043 +#: library/argparse.rst:1059 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" @@ -1328,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:1057 +#: library/argparse.rst:1073 msgid "type" msgstr "Le paramètre *type*" -#: library/argparse.rst:1059 +#: 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 " @@ -1347,7 +1375,7 @@ msgstr "" "d':meth:`~ArgumentParser.add_argument` nous permet de faire les " "vérifications et les conversions de type nécessaires." -#: library/argparse.rst:1065 +#: 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." @@ -1356,7 +1384,7 @@ msgstr "" "default_, le convertisseur de type n'est appliqué que si la valeur par " "défaut est une chaîne." -#: library/argparse.rst:1068 +#: library/argparse.rst:1084 #, fuzzy msgid "" "The argument to ``type`` can be a callable that accepts a single string or " @@ -1371,28 +1399,35 @@ msgstr "" "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:1074 +#: 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:1088 +#: 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:1100 +#: 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:1104 +#: 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 " @@ -1405,7 +1440,7 @@ 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:1109 +#: 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. " @@ -1418,7 +1453,7 @@ msgstr "" "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:1114 +#: library/argparse.rst:1138 #, fuzzy msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " @@ -1435,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:1121 +#: library/argparse.rst:1145 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." @@ -1443,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:1128 +#: library/argparse.rst:1152 msgid "choices" msgstr "Le paramètre *choices*" -#: library/argparse.rst:1130 +#: 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* " @@ -1462,7 +1497,7 @@ msgstr "" "affiché si l'utilisateur passe un argument qui n'est pas parmi les valeurs " "acceptables ::" -#: library/argparse.rst:1145 +#: 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." @@ -1471,7 +1506,7 @@ msgstr "" "les objets de type :class:`list`, :class:`set` ou des conteneurs " "personnalisés." -#: library/argparse.rst:1148 +#: 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." @@ -1479,7 +1514,7 @@ 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:1151 +#: library/argparse.rst:1175 #, fuzzy msgid "" "Note that *choices* are checked after any type_ conversions have been " @@ -1490,14 +1525,14 @@ msgstr "" "après la conversion de type_. Le type des objets dans le conteneur *choices* " "doit donc correspondre au type_ spécifié ::" -#: library/argparse.rst:1156 +#: 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:1160 +#: 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 " @@ -1510,11 +1545,11 @@ msgstr "" "pas souhaité (comme lorsque les choix sont trop nombreux) spécifiez " "simplement metavar_ de façon explicite." -#: library/argparse.rst:1169 +#: library/argparse.rst:1193 msgid "required" msgstr "Le paramètre *required*" -#: library/argparse.rst:1171 +#: library/argparse.rst:1195 #, fuzzy msgid "" "In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " @@ -1528,7 +1563,7 @@ msgstr "" "*obligatoire*, ``True`` peut être passé à l'argument nommé ``required=`` " "d':meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:1184 +#: 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 " @@ -1538,7 +1573,7 @@ msgstr "" "``required``, :meth:`~ArgumentParser.parse_args` mentionne une erreur si " "l'option est absente de la ligne de commande." -#: library/argparse.rst:1190 +#: 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." @@ -1547,11 +1582,11 @@ msgstr "" "utilisateurs s'attendent à ce que les *options* soient *optionnelles*. Elles " "devraient donc être évitées si possible." -#: library/argparse.rst:1197 +#: library/argparse.rst:1221 msgid "help" msgstr "Le paramètre *help*" -#: library/argparse.rst:1199 +#: library/argparse.rst:1223 #, fuzzy msgid "" "The ``help`` value is a string containing a brief description of the " @@ -1564,7 +1599,7 @@ 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:1204 +#: 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 " @@ -1579,7 +1614,7 @@ msgstr "" "des arguments nommés d':meth:`~ArgumentParser.add_argument`, tels que ``%" "(default)s``, ``%(type)s``, etc ::" -#: library/argparse.rst:1221 +#: 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 ``%%``." @@ -1588,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:1224 +#: library/argparse.rst:1248 #, fuzzy msgid "" ":mod:`!argparse` supports silencing the help entry for certain options, by " @@ -1597,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:1239 +#: library/argparse.rst:1263 msgid "metavar" msgstr "Le paramètre *metavar*" -#: library/argparse.rst:1241 +#: library/argparse.rst:1265 #, fuzzy msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " @@ -1623,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:1265 +#: library/argparse.rst:1289 msgid "An alternative name can be specified with ``metavar``::" msgstr "Un nom alternatif peut être fourni à ``metavar`` ::" -#: library/argparse.rst:1282 +#: 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 " @@ -1637,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:1286 +#: 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 " @@ -1647,11 +1682,11 @@ msgstr "" "plus d'une fois. Passer un *n-uplet* à ``metavar`` indique les différents " "noms à afficher pour chacun des arguments ::" -#: library/argparse.rst:1305 +#: library/argparse.rst:1329 msgid "dest" msgstr "Le paramètre *dest*" -#: library/argparse.rst:1307 +#: 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 " @@ -1667,16 +1702,19 @@ msgstr "" "``dest`` est généralement le premier argument " "d':meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:1319 +#: 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 " @@ -1686,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:1336 +#: 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:1347 +#: 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:1349 +#: 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 " @@ -1705,11 +1747,11 @@ msgid "" "will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" -#: library/argparse.rst:1372 +#: library/argparse.rst:1404 msgid "Action classes" msgstr "Classes Action" -#: library/argparse.rst:1374 +#: library/argparse.rst:1406 #, fuzzy msgid "" ":class:`!Action` classes implement the Action API, a callable which returns " @@ -1722,7 +1764,7 @@ msgstr "" "qui suit cette API peut être passé comme paramètre ``action`` " "d':meth:`~ArgumentParser.add_argument`." -#: library/argparse.rst:1383 +#: library/argparse.rst:1415 #, fuzzy msgid "" ":class:`!Action` objects are used by an :class:`ArgumentParser` to represent " @@ -1738,7 +1780,7 @@ msgstr "" "d':meth:`ArgumentParser.add_argument` ainsi que tous ses arguments nommés, " "sauf ``action``." -#: library/argparse.rst:1389 +#: library/argparse.rst:1421 #, fuzzy msgid "" "Instances of :class:`!Action` (or return value of any callable to the " @@ -1753,7 +1795,7 @@ msgstr "" "plus simple de s'assurer que ces attributs sont définis est d'appeler " "``Action.__init__``." -#: library/argparse.rst:1397 +#: library/argparse.rst:1429 #, fuzzy msgid "" ":class:`!Action` instances should be callable, so subclasses must override " @@ -1763,13 +1805,13 @@ msgstr "" "doivent surcharger la méthode ``__call__``. Cette méthode doit accepter " "quatre paramètres :" -#: library/argparse.rst:1400 +#: 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:1402 +#: library/argparse.rst:1434 #, fuzzy msgid "" "*namespace* - The :class:`Namespace` object that will be returned " @@ -1780,7 +1822,7 @@ msgstr "" "par :meth:`~ArgumentParser.parse_args`. La majorité des actions ajoutent un " "attribut à cet objet avec :func:`setattr` ;" -#: library/argparse.rst:1406 +#: library/argparse.rst:1438 #, fuzzy msgid "" "*values* - The associated command-line arguments, with any type conversions " @@ -1792,7 +1834,7 @@ msgstr "" "spécifiées grâce à l’argument nommé type_ " "d':meth:`~ArgumentParser.add_argument` ;" -#: library/argparse.rst:1410 +#: library/argparse.rst:1442 #, fuzzy msgid "" "*option_string* - The option string that was used to invoke this action. The " @@ -1803,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:1414 +#: library/argparse.rst:1446 #, fuzzy msgid "" "The :meth:`!__call__` method may perform arbitrary actions, but will " @@ -1814,7 +1856,7 @@ msgstr "" "général elle affecte des attributs sur le ``namespace`` en fonction de " "``dest`` et de ``values``." -#: library/argparse.rst:1419 +#: library/argparse.rst:1451 #, fuzzy msgid "" ":class:`!Action` subclasses can define a :meth:`!format_usage` method that " @@ -1827,7 +1869,7 @@ 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:1425 +#: 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 " @@ -1835,11 +1877,26 @@ msgid "" "``False`` respectively::" msgstr "" -#: library/argparse.rst:1440 +#: 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:1444 +#: library/argparse.rst:1486 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." @@ -1847,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:1447 +#: library/argparse.rst:1489 #, fuzzy msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " @@ -1858,7 +1915,7 @@ 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:1451 +#: library/argparse.rst:1493 msgid "" "args_ - List of strings to parse. The default is taken " "from :data:`sys.argv`." @@ -1866,7 +1923,7 @@ msgstr "" "args_ – Liste de chaînes à analyser. La valeur par défaut est récupérée " "dans :data:`sys.argv`." -#: library/argparse.rst:1454 +#: library/argparse.rst:1496 msgid "" "namespace_ - An object to take the attributes. The default is a new " "empty :class:`Namespace` object." @@ -1874,11 +1931,11 @@ msgstr "" "namespace_ – Un objet pour recevoir les attributs. Par défaut, une nouvelle " "instance (vide) de :class:`Namespace`." -#: library/argparse.rst:1459 +#: library/argparse.rst:1501 msgid "Option value syntax" msgstr "Syntaxe de la valeur des options" -#: library/argparse.rst:1461 +#: 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, " @@ -1889,7 +1946,7 @@ msgstr "" "simple, l'option et sa valeur sont passées en tant que deux arguments " "distincts ::" -#: library/argparse.rst:1473 +#: 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 " @@ -1899,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:1480 +#: library/argparse.rst:1522 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" @@ -1907,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:1486 +#: 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::" @@ -1916,11 +1973,11 @@ msgstr "" "préfixe ``-`` pour autant que seule la dernière, au maximum, ne nécessite " "une valeur ::" -#: library/argparse.rst:1498 +#: library/argparse.rst:1540 msgid "Invalid arguments" msgstr "Arguments invalides" -#: library/argparse.rst:1500 +#: 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 " @@ -1934,11 +1991,11 @@ msgstr "" "est rencontrée, elle affiche l'erreur accompagnée du message d'aide puis " "termine l'exécution ::" -#: library/argparse.rst:1526 +#: library/argparse.rst:1568 msgid "Arguments containing ``-``" msgstr "Arguments contenant ``-``" -#: library/argparse.rst:1528 +#: 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 " @@ -1959,7 +2016,7 @@ msgstr "" "nombre négatif et que l'analyseur ne contient aucune option qui a " "l'apparence d'un nombre négatif ::" -#: library/argparse.rst:1566 +#: 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 " @@ -1971,17 +2028,17 @@ msgstr "" "argument ``'--'`` qui indique à :meth:`~ArgumentParser.parse_args` de " "traiter tout ce qui suit comme un argument positionnel ::" -#: library/argparse.rst:1574 +#: library/argparse.rst:1616 msgid "" "See also :ref:`the argparse howto on ambiguous arguments ` for more details." msgstr "" -#: library/argparse.rst:1580 +#: library/argparse.rst:1622 msgid "Argument abbreviations (prefix matching)" msgstr "Arguments abrégés (par comparaison de leurs préfixes)" -#: library/argparse.rst:1582 +#: 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 " @@ -1992,7 +2049,7 @@ msgstr "" "autant que l’abréviation soit non-ambigüe, c'est-à-dire qu'elle ne " "corresponde à aucune autre option ::" -#: library/argparse.rst:1597 +#: 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``." @@ -2001,11 +2058,11 @@ msgstr "" "option. Ce comportement peut être désactivé en passant ``False`` " "à :ref:`allow_abbrev`." -#: library/argparse.rst:1603 +#: library/argparse.rst:1645 msgid "Beyond ``sys.argv``" msgstr "Au-delà de ``sys.argv``" -#: library/argparse.rst:1605 +#: library/argparse.rst:1647 #, fuzzy msgid "" "Sometimes it may be useful to have an :class:`ArgumentParser` parse " @@ -2019,11 +2076,11 @@ msgstr "" "à :meth:`~ArgumentParser.parse_args`. Cette approche est pratique pour faire " "des tests depuis l'invite de commande ::" -#: library/argparse.rst:1625 +#: library/argparse.rst:1667 msgid "The Namespace object" msgstr "L'objet ``Namespace``" -#: library/argparse.rst:1629 +#: library/argparse.rst:1671 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." @@ -2032,7 +2089,7 @@ msgstr "" "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:1632 +#: 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 " @@ -2043,7 +2100,7 @@ msgstr "" "préférez une vue *dict-compatible*, vous devez utiliser :func:`vars` (un " "idiome Python classique) ::" -#: library/argparse.rst:1642 +#: 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. " @@ -2054,15 +2111,16 @@ msgstr "" "création d'un nouvel objet :class:`Namespace`. Ceci peut être réalisé avec " "l'argument nommé ``namespace=`` ::" -#: library/argparse.rst:1658 +#: library/argparse.rst:1700 msgid "Other utilities" msgstr "Autres outils" -#: library/argparse.rst:1661 -msgid "Sub-commands" +#: library/argparse.rst:1703 +#, fuzzy +msgid "Subcommands" msgstr "Sous commandes" -#: library/argparse.rst:1668 +#: library/argparse.rst:1710 #, fuzzy msgid "" "Many programs split up their functionality into a number of subcommands, for " @@ -2092,11 +2150,11 @@ msgstr "" "d':class:`ArgumentParser` ; elle renvoie un objet :class:`ArgumentParser` " "qui peut être modifié normalement." -#: library/argparse.rst:1680 +#: library/argparse.rst:1722 msgid "Description of parameters:" msgstr "Description des paramètres :" -#: library/argparse.rst:1682 +#: library/argparse.rst:1724 #, fuzzy msgid "" "*title* - title for the sub-parser group in help output; by default " @@ -2107,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:1686 +#: library/argparse.rst:1728 #, fuzzy msgid "" "*description* - description for the sub-parser group in help output, by " @@ -2118,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:1689 +#: 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 "" @@ -2129,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:1693 +#: library/argparse.rst:1735 #, fuzzy msgid "" "*parser_class* - class which will be used to create sub-parser instances, by " @@ -2139,7 +2197,7 @@ msgstr "" "analyseurs ; par défaut : la classe de l'analyseur courant (par exemple " "``ArgumentParser``) ;" -#: library/argparse.rst:1696 +#: library/argparse.rst:1738 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" @@ -2147,15 +2205,16 @@ msgstr "" "action_ – action à entreprendre quand cet argument est reconnu sur la ligne " "de commande ;" -#: library/argparse.rst:1699 +#: 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:1702 +#: library/argparse.rst:1744 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" @@ -2163,13 +2222,13 @@ msgstr "" "required_ – ``True`` si la sous-commande est obligatoire ; par défaut : " "``False`` (ajouté dans 3.7) ;" -#: library/argparse.rst:1705 +#: 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:1707 +#: library/argparse.rst:1749 #, fuzzy msgid "" "metavar_ - string presenting available subcommands in help; by default it is " @@ -2179,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:1710 +#: library/argparse.rst:1752 msgid "Some example usage::" msgstr "Quelques exemples d'utilisation ::" -#: library/argparse.rst:1731 +#: 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 " @@ -2200,7 +2260,7 @@ msgstr "" "présents alors que la commande ``b`` présente les attributs ``foo`` et " "``baz``." -#: library/argparse.rst:1738 +#: library/argparse.rst:1780 #, fuzzy msgid "" "Similarly, when a help message is requested from a subparser, only the help " @@ -2216,57 +2276,42 @@ msgstr "" "d'aide pour chacun des sous-analyseurs grâce à l'argument ``help=`` " "d':meth:`add_parser` tel qu'illustré ci-dessus." -#: library/argparse.rst:1774 +#: 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:1795 -#, 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:1807 -msgid "" -":meth:`~_SubParsersAction.add_parser` supports also an additional " -"*deprecated* argument, which allows to deprecate the subparser." -msgstr "" - -#: library/argparse.rst:1821 +#: 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 ::" -#: library/argparse.rst:1858 +#: 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 " @@ -2275,22 +2320,60 @@ 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:1874 +#: library/argparse.rst:1890 #, fuzzy msgid "New *required* keyword-only parameter." msgstr "Introduction des arguments nommés obligatoires." -#: library/argparse.rst:1877 +#: 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:1883 +#: 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:1887 +#: 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 " @@ -2305,7 +2388,7 @@ msgstr "" "taille du tampon, encodage et gestion des erreurs (voir la " "fonction :func:`open` pour plus de détails) ::" -#: library/argparse.rst:1899 +#: library/argparse.rst:1952 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into :data:`sys.stdin` for readable :class:`FileType` objects " @@ -2316,7 +2399,7 @@ msgstr "" "objets :class:`FileType` ouverts en lecture, et vers :data:`sys.stdout` pour " "les objets :class:`FileType` ouverts en écriture ::" -#: library/argparse.rst:1910 +#: library/argparse.rst:1963 #, fuzzy msgid "" "If one argument uses *FileType* and then a subsequent argument fails, an " @@ -2332,16 +2415,16 @@ 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:1916 +#: library/argparse.rst:1969 #, fuzzy -msgid "Added the *encodings* and *errors* parameters." +msgid "Added the *encoding* and *errors* parameters." msgstr "Les arguments nommés ``encodings`` et ``errors``." -#: library/argparse.rst:1923 +#: library/argparse.rst:1976 msgid "Argument groups" msgstr "Groupes d'arguments" -#: library/argparse.rst:1928 +#: library/argparse.rst:1981 #, fuzzy msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " @@ -2356,7 +2439,7 @@ msgstr "" "possible, celui-ci peut être créé avec la " "méthode :meth:`add_argument_group` ::" -#: library/argparse.rst:1945 +#: library/argparse.rst:1998 #, fuzzy msgid "" "The :meth:`add_argument_group` method returns an argument group object which " @@ -2376,7 +2459,7 @@ msgstr "" "personnaliser l'affichage, la méthode :meth:`add_argument_group` accepte les " "arguments ``title`` et ``description`` ::" -#: library/argparse.rst:1971 +#: 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 " @@ -2385,7 +2468,7 @@ msgid "" "argument group rather than the entire parser." msgstr "" -#: library/argparse.rst:1976 +#: 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." @@ -2394,7 +2477,13 @@ msgstr "" "affiché dans l'une des sections usuelles *positional arguments* et *optional " "arguments*." -#: library/argparse.rst:1979 +#: library/argparse.rst:2032 +msgid "" +"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 " @@ -2406,15 +2495,15 @@ msgstr "" "cas. La présence de cette fonction dans l'API est purement accidentelle et " "celle-ci disparaîtra." -#: library/argparse.rst:1984 +#: library/argparse.rst:2040 msgid "Passing prefix_chars_ to :meth:`add_argument_group` is now deprecated." msgstr "" -#: library/argparse.rst:1990 +#: library/argparse.rst:2046 msgid "Mutual exclusion" msgstr "Exclusion mutuelle" -#: library/argparse.rst:1994 +#: library/argparse.rst:2050 #, fuzzy msgid "" "Create a mutually exclusive group. :mod:`!argparse` will make sure that only " @@ -2425,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:2010 +#: 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 " @@ -2435,7 +2524,7 @@ msgstr "" "``required`` pour indiquer qu'au moins un des arguments mutuellement " "exclusifs est nécessaire ::" -#: library/argparse.rst:2022 +#: library/argparse.rst:2078 #, fuzzy msgid "" "Note that currently mutually exclusive argument groups do not support the " @@ -2448,7 +2537,7 @@ msgstr "" "n'acceptent pas les arguments ``title`` et ``description`` " "d':meth:`~ArgumentParser.add_argument_group`." -#: library/argparse.rst:2045 +#: library/argparse.rst:2101 #, fuzzy msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " @@ -2461,11 +2550,11 @@ msgstr "" "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:2053 +#: library/argparse.rst:2109 msgid "Parser defaults" msgstr "Valeurs par défaut de l'analyseur" -#: library/argparse.rst:2057 +#: 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-" @@ -2479,14 +2568,15 @@ msgstr "" "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:2069 +#: 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:2077 +#: 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 " @@ -2497,7 +2587,7 @@ msgstr "" "méthode :meth:`~ArgumentParser.add_subparsers` pour un exemple de cette " "utilisation." -#: library/argparse.rst:2083 +#: library/argparse.rst:2141 msgid "" "Get the default value for a namespace attribute, as set by " "either :meth:`~ArgumentParser.add_argument` or " @@ -2507,11 +2597,11 @@ msgstr "" "qu'il a été défini soit par :meth:`~ArgumentParser.add_argument` ou " "par :meth:`~ArgumentParser.set_defaults` ::" -#: library/argparse.rst:2094 +#: library/argparse.rst:2152 msgid "Printing help" msgstr "Afficher l'aide" -#: library/argparse.rst:2096 +#: 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, " @@ -2521,7 +2611,7 @@ 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:2102 +#: 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 " @@ -2531,7 +2621,7 @@ msgstr "" "l':class:`ArgumentParser` depuis la ligne de commande. Si ``file`` est " "``None``, utilise :data:`sys.stdout`." -#: library/argparse.rst:2108 +#: 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 " @@ -2541,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:2112 +#: library/argparse.rst:2170 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" @@ -2549,7 +2639,7 @@ msgstr "" "Des variantes de ces méthodes sont fournies pour renvoyer la chaîne plutôt " "que de l'afficher :" -#: library/argparse.rst:2117 +#: library/argparse.rst:2175 msgid "" "Return a string containing a brief description of how " "the :class:`ArgumentParser` should be invoked on the command line." @@ -2557,7 +2647,7 @@ 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:2122 +#: 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`." @@ -2566,11 +2656,11 @@ msgstr "" "informations sur l'utilisation du programme et sur les arguments définis " "dans l':class:`ArgumentParser`." -#: library/argparse.rst:2127 +#: library/argparse.rst:2185 msgid "Partial parsing" msgstr "Analyse partielle" -#: library/argparse.rst:2131 +#: library/argparse.rst:2189 msgid "" "Sometimes a script only needs to handle a specific set of command-line " "arguments, leaving any unrecognized arguments for another script or program. " @@ -2578,7 +2668,7 @@ msgid "" "useful." msgstr "" -#: library/argparse.rst:2136 +#: library/argparse.rst:2194 msgid "" "This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " "does not raise an error for extra, unrecognized arguments. Instead, it " @@ -2586,7 +2676,7 @@ msgid "" "populated namespace and the list of any unrecognized arguments." msgstr "" -#: library/argparse.rst:2150 +#: library/argparse.rst:2208 msgid "" ":ref:`Prefix matching ` rules apply " "to :meth:`~ArgumentParser.parse_known_args`. The parser may consume an " @@ -2598,11 +2688,11 @@ msgstr "" "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:2157 +#: library/argparse.rst:2215 msgid "Customizing file parsing" msgstr "Personnaliser le *parsing* de fichiers" -#: library/argparse.rst:2161 +#: 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 " @@ -2614,7 +2704,7 @@ msgstr "" "un traitement plus élaboré. Voir aussi l'argument nommé " "``fromfile_prefix_chars`` du constructeur d':class:`ArgumentParser`." -#: library/argparse.rst:2166 +#: 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. " @@ -2626,7 +2716,7 @@ msgstr "" "appelée une fois pour chaque ligne lue du fichier d'arguments. L'ordre est " "préservé." -#: library/argparse.rst:2170 +#: 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::" @@ -2635,11 +2725,11 @@ msgstr "" "par des espaces d'être traité comme un argument. L'exemple suivant illustre " "comment réaliser ceci ::" -#: library/argparse.rst:2179 +#: library/argparse.rst:2237 msgid "Exiting methods" msgstr "Méthodes d'interruptions" -#: library/argparse.rst:2183 +#: library/argparse.rst:2241 #, fuzzy msgid "" "This method terminates the program, exiting with the specified *status* and, " @@ -2651,7 +2741,7 @@ 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:2195 +#: library/argparse.rst:2253 #, fuzzy msgid "" "This method prints a usage message, including the *message*, " @@ -2661,11 +2751,11 @@ msgstr "" "``message`` sur la sortie d'erreur standard puis termine l'exécution avec le " "code de fin d'exécution 2." -#: library/argparse.rst:2200 +#: library/argparse.rst:2258 msgid "Intermixed parsing" msgstr "Analyse entremêlée" -#: library/argparse.rst:2205 +#: 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` " @@ -2678,7 +2768,7 @@ msgstr "" "et :meth:`~ArgumentParser.parse_known_intermixed_args` permettent ce style " "d'analyse." -#: library/argparse.rst:2210 +#: library/argparse.rst:2268 #, fuzzy msgid "" "These parsers do not support all the :mod:`!argparse` features, and will " @@ -2692,7 +2782,7 @@ msgstr "" "exclusifs qui contiennent à la fois des arguments optionnels et des " "arguments positionnels ne sont pas pris en charge." -#: library/argparse.rst:2215 +#: library/argparse.rst:2273 msgid "" "The following example shows the difference " "between :meth:`~ArgumentParser.parse_known_args` " @@ -2706,7 +2796,7 @@ msgstr "" "``['2', '3']`` comme arguments non-traités alors que le second capture tous " "les arguments positionnels dans ``rest`` ::" -#: library/argparse.rst:2230 +#: 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 " @@ -2718,11 +2808,11 @@ 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:2239 +#: library/argparse.rst:2297 msgid "Registering custom types or actions" msgstr "" -#: library/argparse.rst:2243 +#: 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 " @@ -2730,7 +2820,7 @@ msgid "" "the type by their registered name instead of their callable name." msgstr "" -#: library/argparse.rst:2248 +#: 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., " @@ -2738,34 +2828,52 @@ msgid "" "be registered, and object, the callable to be registered." msgstr "" -#: library/argparse.rst:2253 +#: library/argparse.rst:2311 msgid "" "The following example shows how to register a custom type with a parser::" msgstr "" -#: library/argparse.rst:2267 +#: library/argparse.rst:2325 msgid "Exceptions" msgstr "Exceptions" -#: library/argparse.rst:2271 +#: library/argparse.rst:2329 msgid "An error from creating or using an argument (optional or positional)." msgstr "" -#: library/argparse.rst:2273 +#: 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:2278 +#: library/argparse.rst:2336 msgid "" "Raised when something goes wrong converting a command line string to a type." msgstr "" -#: library/argparse.rst:2282 +#: 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 " diff --git a/library/array.po b/library/array.po index 19ed147925..9fb7efe8e6 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: 2025-10-17 09:58+0200\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,7 +111,7 @@ 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" @@ -175,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" @@ -188,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:67 +#: 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 " @@ -233,20 +304,25 @@ msgstr "" "machine (à proprement parler, par l'implémentation C). La taille réelle est " "accessible via l'attribut :attr:`itemsize`." -#: library/array.rst:71 +#: library/array.rst:103 #, fuzzy msgid "The module defines the following item:" msgstr "Le module définit le type suivant :" -#: library/array.rst:76 -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:79 +#: 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:84 +#: library/array.rst:119 #, fuzzy msgid "" "A new array whose items are restricted by *typecode*, and initialized from " @@ -259,7 +335,7 @@ msgstr "" "liste, un :term:`bytes-like object`, ou un itérable sur des éléments du type " "approprié." -#: library/array.rst:89 +#: library/array.rst:124 #, fuzzy msgid "" "If given a :class:`bytes` or :class:`bytearray` object, the initializer is " @@ -274,11 +350,13 @@ msgstr "" "éléments initiaux du tableau. Si c'est un itérable, il est passé à la " "méthode :meth:`extend`." -#: library/array.rst:96 +#: 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." @@ -290,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:102 +#: 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``." @@ -298,22 +380,23 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``array.__new__`` avec les " "arguments ``typecode``, ``initializer``." -#: library/array.rst:107 +#: 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:112 +#: 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:117 -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:122 +#: library/array.rst:159 #, fuzzy msgid "" "Return a tuple ``(address, length)`` giving the current memory address and " @@ -335,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:132 +#: 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 " @@ -350,12 +433,15 @@ msgstr "" "devrait être évitée dans un nouveau code. L'interface tampon est documentée " "dans :ref:`bufferobjects`." -#: library/array.rst:141 +#: 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 " +"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." +"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 " @@ -363,11 +449,12 @@ msgstr "" "données à partir d'un fichier écrit sur une machine avec un ordre d'octets " "différent." -#: library/array.rst:149 -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:154 +#: 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 " @@ -381,7 +468,7 @@ 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:162 +#: library/array.rst:200 #, fuzzy msgid "" "Appends items from the :term:`bytes-like object`, interpreting its content " @@ -392,13 +479,13 @@ msgstr "" "valeurs machine (comme si elle avait été lue depuis le fichier en utilisant " "la méthode :meth:`from file`)." -#: library/array.rst:166 +#: 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:172 +#: library/array.rst:210 #, fuzzy msgid "" "Read *n* items (as machine values) from the :term:`file object` *f* and " @@ -413,7 +500,7 @@ msgstr "" "objet fichier natif ; quelque chose d'autre avec une méthode :meth:`read` ne " "suffit pas." -#: library/array.rst:180 +#: 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." @@ -421,7 +508,7 @@ 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é." -#: library/array.rst:186 +#: library/array.rst:224 #, fuzzy msgid "" "Extends this array with data from the given Unicode string. The array must " @@ -434,28 +521,29 @@ msgstr "" "``array.frombytes(unicodestring.encode(enc))`` pour ajouter des données " "Unicode à un tableau d'un autre type." -#: library/array.rst:194 +#: 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:199 +#: library/array.rst:237 msgid "Added optional *start* and *stop* parameters." msgstr "" -#: library/array.rst:205 +#: 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:211 +#: 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 " @@ -465,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:218 -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:223 +#: 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:230 +#: 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:235 +#: 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 " @@ -488,23 +577,23 @@ msgstr "" "représentation en octets (la même séquence d'octets qui serait écrite par la " "méthode :meth:`tofile`)." -#: library/array.rst:239 +#: 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:245 +#: 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:250 +#: 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:255 +#: library/array.rst:293 #, fuzzy msgid "" "Convert the array to a Unicode string. The array must have a type ``'u'`` " @@ -517,7 +606,7 @@ msgstr "" "``array.tobytes().decode(enc)`` pour obtenir une chaîne Unicode depuis un " "tableau de tout autre type." -#: library/array.rst:260 +#: library/array.rst:298 #, fuzzy msgid "" "The string representation of array objects has the form ``array(typecode, " @@ -538,19 +627,19 @@ msgstr "" "utilisant :func:`eval`, tant que la classe :class:`~array.array` a été " "importée en utilisant ``from array import array``. Exemples ::" -#: library/array.rst:280 +#: library/array.rst:318 msgid "Module :mod:`struct`" msgstr "Module :mod:`struct`" -#: library/array.rst:281 +#: 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:283 +#: library/array.rst:321 msgid "`NumPy `_" msgstr "" -#: library/array.rst:284 +#: library/array.rst:322 msgid "The NumPy package defines another array type." msgstr "" diff --git a/library/ast.po b/library/ast.po index d1c741cdeb..e47a73d2b4 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: 2025-10-17 09:58+0200\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" @@ -20,13 +20,14 @@ msgstr "" 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,7 +38,7 @@ 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 " @@ -53,26 +54,26 @@ msgstr "" "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 +#: 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 " +"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`." +"_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 " @@ -80,7 +81,7 @@ msgstr "" "`. 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, " @@ -99,7 +100,7 @@ msgstr "" "(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 " @@ -108,7 +109,7 @@ 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` " @@ -119,7 +120,7 @@ msgstr "" "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 " @@ -134,13 +135,13 @@ 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 " @@ -163,7 +164,7 @@ msgstr "" "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 " @@ -175,14 +176,14 @@ 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." @@ -190,7 +191,7 @@ 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." -#: 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." @@ -198,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 ::" @@ -206,7 +207,7 @@ 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 " @@ -216,31 +217,41 @@ msgid "" "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`." -#: 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 +#: library/ast.rst:138 +msgid "" +"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 "" + +#: 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:144 +#: library/ast.rst:151 #, fuzzy 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." +"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` " @@ -248,7 +259,7 @@ msgstr "" "dans une version future. Pour l'instant, leurs constructeurs renvoient des " "instances de classes différentes." -#: library/ast.rst:151 +#: library/ast.rst:159 #, fuzzy msgid "" "Old classes :class:`!ast.Index` and :class:`!ast.ExtSlice` are still " @@ -259,16 +270,25 @@ msgstr "" "l'avenir. Pour l'instant, elles sont toujours disponibles mais leurs " "constructeurs renvoient des instances de classes différentes." -#: library/ast.rst:158 +#: 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:165 +#: library/ast.rst:181 msgid "" "The descriptions of the specific node classes displayed here were initially " "adapted from the fantastic `Green Tree Snakes `_, porté par de nombreux " "contributeurs." -#: library/ast.rst:174 +#: library/ast.rst:190 msgid "Root nodes" msgstr "" -#: library/ast.rst:178 +#: 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:181 +#: library/ast.rst:197 msgid "``body`` is a :class:`list` of the module's :ref:`ast-statements`." msgstr "" -#: library/ast.rst:183 +#: 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:199 +#: 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:202 +#: library/ast.rst:218 msgid "" "``body`` is a single node, one of the :ref:`expression types `." msgstr "" -#: library/ast.rst:214 +#: 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:217 +#: library/ast.rst:233 msgid "``body`` is a :class:`list` of :ref:`statement nodes `." msgstr "" -#: library/ast.rst:236 +#: 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:240 +#: library/ast.rst:256 msgid "Such type comments would look like this::" msgstr "" -#: library/ast.rst:246 +#: library/ast.rst:262 msgid "" "``argtypes`` is a :class:`list` of :ref:`expression nodes `." msgstr "" -#: library/ast.rst:248 +#: library/ast.rst:264 msgid "``returns`` is a single :ref:`expression node `." msgstr "" -#: library/ast.rst:266 +#: library/ast.rst:281 msgid "Literals" msgstr "Littéraux" -#: library/ast.rst:270 +#: library/ast.rst:285 #, fuzzy msgid "" "A constant value. The ``value`` attribute of the ``Constant`` literal " @@ -360,7 +380,14 @@ msgstr "" "encore ``None``, mais aussi certains conteneurs immuables (*n*-uplets et " "ensembles figés) lorsque tous leurs éléments sont constants." -#: library/ast.rst:284 +#: 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 " @@ -370,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:288 +#: library/ast.rst:310 msgid "" "``value`` is any expression node (such as a literal, a variable, or a " "function call)." @@ -378,30 +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:367 +#: library/ast.rst:394 msgid "``conversion`` is an integer:" msgstr "*conversion* est un entier parmi les valeurs suivantes :" -#: library/ast.rst:292 +#: library/ast.rst:314 msgid "-1: no formatting" msgstr "-1, aucun formatage ;" -#: library/ast.rst:293 +#: 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:294 +#: 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:295 +#: 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:297 +#: 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 " @@ -412,7 +439,7 @@ msgstr "" "*format_spec* vaut ``None``. *conversion* et *format_spec* peuvent tout à " "fait coexister." -#: library/ast.rst:304 +#: library/ast.rst:326 msgid "" "An f-string, comprising a series of :class:`FormattedValue` " "and :class:`Constant` nodes." @@ -420,19 +447,19 @@ msgstr "" "Chaîne littérale formatée (*f-string*), qui contient une liste de " "nœuds :class:`FormattedValue` et :class:`Constant`." -#: library/ast.rst:333 +#: 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:361 +#: library/ast.rst:383 msgid "" "Node representing a single interpolation field in a template string literal." msgstr "" -#: library/ast.rst:363 +#: library/ast.rst:385 #, fuzzy msgid "" "``value`` is any expression node (such as a literal, a variable, or a " @@ -441,33 +468,40 @@ msgstr "" "*value* est un nœud d'expression quelconque (comme un littéral, une " "variable, ou encore un appel de fonction)." -#: library/ast.rst:366 +#: library/ast.rst:388 msgid "" "``str`` is a constant containing the text of the interpolation expression." msgstr "" -#: library/ast.rst:369 +#: 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:370 +#: library/ast.rst:397 msgid "97 (``ord('a')``): ``!a`` :func:`ASCII ` conversion" msgstr "" -#: library/ast.rst:371 +#: library/ast.rst:398 msgid "114 (``ord('r')``): ``!r`` :func:`repr` conversion" msgstr "" -#: library/ast.rst:372 +#: library/ast.rst:399 msgid "115 (``ord('s')``): ``!s`` :func:`string ` conversion" msgstr "" -#: library/ast.rst:374 +#: library/ast.rst:401 msgid "This has the same meaning as ``FormattedValue.conversion``." msgstr "" -#: library/ast.rst:375 +#: library/ast.rst:402 #, fuzzy msgid "" "``format_spec`` is a :class:`JoinedStr` node representing the formatting of " @@ -480,7 +514,7 @@ msgstr "" "*format_spec* vaut ``None``. *conversion* et *format_spec* peuvent tout à " "fait coexister." -#: library/ast.rst:384 +#: 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. " @@ -491,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:410 +#: 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:425 +#: 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 " @@ -507,7 +541,7 @@ msgstr "" "l'indice *i* de *values*. *keys* et *values* sont donc des équivalents à " "``dictionnaire.keys()`` et ``dictionnaire.values()``." -#: library/ast.rst:429 +#: 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 " @@ -517,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:447 +#: library/ast.rst:472 msgid "Variables" msgstr "Variables" -#: library/ast.rst:451 +#: library/ast.rst:476 msgid "" "A variable name. ``id`` holds the name as a string, and ``ctx`` is one of " "the following types." @@ -529,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:459 +#: 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 " @@ -539,7 +573,7 @@ msgstr "" "utilisées pour lire la valeur, mettre la variable à une nouvelle valeur, ou " "supprimer la variable." -#: library/ast.rst:489 +#: 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` " @@ -550,11 +584,11 @@ msgstr "" "nécessaire pour les appels de fonction avec déballage d'arguments (par " "exemple ``fonction(*args)`` ; voir aussi :class:`Call`)." -#: library/ast.rst:513 +#: library/ast.rst:538 msgid "Expressions" msgstr "Expressions" -#: library/ast.rst:517 +#: 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 " @@ -569,7 +603,7 @@ msgstr "" "parmi :class:`Constant`, :class:`Name`, :class:`Lambda`, :class:`Yield` " "et :class:`YieldFrom`." -#: library/ast.rst:535 +#: library/ast.rst:560 msgid "" "A unary operation. ``op`` is the operator, and ``operand`` any expression " "node." @@ -577,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:544 +#: library/ast.rst:569 msgid "" "Unary operator tokens. :class:`Not` is the ``not`` keyword, :class:`Invert` " "is the ``~`` operator." @@ -585,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:558 +#: library/ast.rst:583 msgid "" "A binary operation (like addition or division). ``op`` is the operator, and " "``left`` and ``right`` are any expression nodes." @@ -593,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:585 +#: library/ast.rst:610 msgid "Binary operator tokens." msgstr "Unités lexicales pour les opérations binaires." -#: library/ast.rst:590 +#: 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 " @@ -610,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:595 +#: 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`." -#: library/ast.rst:611 +#: library/ast.rst:636 msgid "Boolean operator tokens." msgstr "Unités lexicales pour les opérations booléennes." -#: library/ast.rst:616 +#: 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 " @@ -630,11 +664,11 @@ msgstr "" "comparaison, *ops* la liste des opérateurs, et *comparators* la liste des " "éléments restants de la comparaison." -#: library/ast.rst:645 +#: library/ast.rst:670 msgid "Comparison operator tokens." msgstr "Unités lexicales pour les comparaisons." -#: library/ast.rst:650 +#: 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:" @@ -643,13 +677,13 @@ msgstr "" "habituellement de type :class:`Name` ou :class:`Attribute`. Les arguments " "sont contenus dans :" -#: library/ast.rst:653 +#: 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:654 +#: library/ast.rst:679 #, fuzzy msgid "" "``keywords`` holds a list of :class:`.keyword` objects representing " @@ -658,7 +692,7 @@ msgstr "" "*keywords*, la liste des arguments nommés sous forme de " "nœuds :class:`keyword`." -#: library/ast.rst:657 +#: library/ast.rst:682 #, fuzzy msgid "" "The ``args`` and ``keywords`` arguments are optional and default to empty " @@ -668,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:680 +#: 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:686 +#: 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." @@ -682,7 +716,7 @@ 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:701 +#: 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, " @@ -694,7 +728,7 @@ msgstr "" "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:718 +#: 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 " @@ -706,11 +740,11 @@ msgstr "" "liste qui peut contenir plusieurs cibles, les arguments *target* et *value* " "sont ici des nœuds simples." -#: library/ast.rst:734 +#: library/ast.rst:757 msgid "Subscripting" msgstr "Indiçage" -#: library/ast.rst:738 +#: 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 " @@ -725,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:762 +#: 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 " @@ -736,11 +770,11 @@ msgstr "" "d'un :class:`Subscript`, que ce soit directement ou en tant qu'élément " "d'un :class:`Tuple`." -#: library/ast.rst:779 +#: library/ast.rst:799 msgid "Comprehensions" msgstr "Compréhensions" -#: library/ast.rst:786 +#: library/ast.rst:806 msgid "" "List and set comprehensions, generator expressions, and dictionary " "comprehensions. ``elt`` (or ``key`` and ``value``) is a single node " @@ -751,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:790 +#: 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:838 +#: 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. " @@ -768,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:843 +#: 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)." @@ -777,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:908 +#: library/ast.rst:928 msgid "Statements" msgstr "Instructions" -#: library/ast.rst:912 +#: library/ast.rst:932 msgid "" "An assignment. ``targets`` is a list of nodes, and ``value`` is a single " "node." @@ -789,7 +823,7 @@ msgstr "" "Affectation. *targets* est une liste de nœuds, *value* est simplement un " "nœud." -#: library/ast.rst:914 +#: 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 " @@ -800,14 +834,14 @@ msgstr "" "représenté par des nœuds :class:`Tuple` ou :class:`List` comme éléments de " "*targets*." -#: library/ast.rst:1215 library/ast.rst:1975 +#: 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:948 +#: library/ast.rst:968 #, fuzzy msgid "" "An assignment with a type annotation. ``target`` is a single node and can be " @@ -824,7 +858,7 @@ msgstr "" "*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:953 +#: 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 " @@ -833,7 +867,7 @@ msgid "" "the :attr:`~object.__annotations__` dictionary of modules and classes." msgstr "" -#: library/ast.rst:1003 +#: 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` " @@ -845,7 +879,7 @@ msgstr "" "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:1008 +#: library/ast.rst:1028 #, fuzzy msgid "" "The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`, " @@ -854,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:1024 +#: 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 " @@ -865,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:1040 +#: library/ast.rst:1060 msgid "" "An assertion. ``test`` holds the condition, such as a :class:`Compare` node. " "``msg`` holds the failure message." @@ -873,7 +907,7 @@ 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:1055 +#: 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." @@ -882,11 +916,11 @@ msgstr "" "*target*. Ce sont généralement des nœuds de " "type :class:`Name`, :class:`Attribute` ou :class:`Subscript`." -#: library/ast.rst:1072 +#: library/ast.rst:1092 msgid "A ``pass`` statement." msgstr "Instruction ``pass``." -#: library/ast.rst:1084 +#: 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 " @@ -894,7 +928,7 @@ msgid "" "the type alias." msgstr "" -#: library/ast.rst:1100 +#: library/ast.rst:1120 msgid "" "Other statements which are only applicable inside functions or loops are " "described in other sections." @@ -903,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:1104 +#: library/ast.rst:1124 msgid "Imports" msgstr "Importations" -#: library/ast.rst:1108 +#: 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`." -#: library/ast.rst:1124 +#: 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 . " @@ -927,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:1145 +#: 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." @@ -937,11 +971,11 @@ msgstr "" "as ...``. Dans les instructions sans ``as`` (où le module n'est pas " "renommé), *asname* vaut ``None``." -#: library/ast.rst:1161 +#: library/ast.rst:1184 msgid "Control flow" msgstr "Contrôle de l'exécution" -#: library/ast.rst:1164 +#: library/ast.rst:1187 msgid "" "Optional clauses such as ``else`` are stored as an empty list if they're not " "present." @@ -952,7 +986,7 @@ 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:1169 +#: 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." @@ -962,7 +996,7 @@ msgstr "" "*orelse* contient les instructions dans le ``else`` (liste vide s'il n'y a " "pas de ``else``)." -#: library/ast.rst:1172 +#: 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 " @@ -972,7 +1006,7 @@ msgstr "" "sont simplement mises dans le *orelse* du ``if`` ou ``elif`` précédent, " "comme nœuds de type :class:`If`." -#: library/ast.rst:1206 +#: library/ast.rst:1229 #, fuzzy msgid "" "A ``for`` loop. ``target`` holds the variable(s) the loop assigns to, as a " @@ -989,7 +1023,7 @@ msgstr "" "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:1240 +#: library/ast.rst:1263 msgid "" "A ``while`` loop. ``test`` holds the condition, such as a :class:`Compare` " "node." @@ -1000,11 +1034,11 @@ msgstr "" "termine parce que la condition devient fausse et non pas à cause d'une " "instruction ``break``." -#: library/ast.rst:1266 +#: library/ast.rst:1289 msgid "The ``break`` and ``continue`` statements." msgstr "Instructions ``break`` et ``continue``." -#: library/ast.rst:1299 +#: 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." @@ -1015,14 +1049,14 @@ msgstr "" "*finalbody* contiennent respectivement les instructions se trouvant dans " "d'éventuels blocs ``else`` et ``finally``." -#: library/ast.rst:1344 +#: 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:1373 +#: 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:`` " @@ -1036,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:1404 +#: 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 " @@ -1046,7 +1080,7 @@ msgstr "" "instances de :class:`withitem`. Les instructions sous le ``with`` forment la " "liste *body*." -#: library/ast.rst:1414 +#: 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 " @@ -1059,18 +1093,18 @@ msgstr "" "de type :class:`Name`, :class:`Tuple` ou :class:`List`. Sinon, " "*optional_vars* vaut ``None``." -#: library/ast.rst:1445 +#: library/ast.rst:1468 msgid "Pattern matching" msgstr "" -#: library/ast.rst:1450 +#: 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:1458 +#: 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 " @@ -1078,19 +1112,19 @@ msgid "" "expressions, even when they share the same syntax." msgstr "" -#: library/ast.rst:1463 +#: 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:1466 +#: 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:1507 +#: 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 " @@ -1098,14 +1132,14 @@ msgid "" "equal to the evaluated value." msgstr "" -#: library/ast.rst:1535 +#: 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:1561 +#: 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 " @@ -1113,7 +1147,7 @@ msgid "" "otherwise matches a fixed length sequence." msgstr "" -#: library/ast.rst:1593 +#: 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 " @@ -1121,7 +1155,7 @@ msgid "" "successful." msgstr "" -#: library/ast.rst:1634 +#: 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 " @@ -1130,7 +1164,7 @@ msgid "" "statement documentation." msgstr "" -#: library/ast.rst:1640 +#: 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 " @@ -1139,7 +1173,7 @@ msgid "" "overall mapping pattern is successful." msgstr "" -#: library/ast.rst:1681 +#: 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 " @@ -1150,21 +1184,21 @@ msgid "" "pattern)." msgstr "" -#: library/ast.rst:1688 +#: 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:1692 +#: 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:1743 +#: 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 " @@ -1172,14 +1206,14 @@ msgid "" "and will always succeed." msgstr "" -#: library/ast.rst:1748 +#: 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:1785 +#: 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 " @@ -1188,34 +1222,34 @@ msgid "" "matched against the subject." msgstr "" -#: library/ast.rst:1818 +#: library/ast.rst:1841 msgid "Type annotations" msgstr "" -#: library/ast.rst:1822 +#: 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:1848 +#: 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:1856 +#: library/ast.rst:1879 msgid "Type parameters" msgstr "" -#: library/ast.rst:1858 +#: library/ast.rst:1881 msgid "" ":ref:`Type parameters ` can exist on classes, functions, and " "type aliases." msgstr "" -#: library/ast.rst:1863 +#: 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 " @@ -1224,50 +1258,50 @@ msgid "" "no default, this attribute will be set to ``None``." msgstr "" -#: library/ast.rst:1923 library/ast.rst:1955 +#: library/ast.rst:1942 library/ast.rst:1969 #, fuzzy msgid "Added the *default_value* parameter." msgstr "ajout du paramètre *indent*." -#: library/ast.rst:1893 +#: 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:1928 +#: 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:1959 +#: library/ast.rst:1973 msgid "Function and class definitions" msgstr "Définition de fonctions et de classes" -#: library/ast.rst:1963 +#: library/ast.rst:1977 msgid "A function definition." msgstr "Définition d'une fonction." -#: library/ast.rst:1965 +#: 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:1966 +#: 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:1967 +#: 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:1968 +#: 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)." @@ -1276,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:1970 +#: library/ast.rst:1984 msgid "``returns`` is the return annotation." msgstr "*returns* est l'annotation de renvoi éventuelle." -#: library/ast.rst:2134 +#: library/ast.rst:2148 msgid "``type_params`` is a list of :ref:`type parameters `." msgstr "" -#: library/ast.rst:2161 library/ast.rst:2172 +#: library/ast.rst:2175 library/ast.rst:2186 msgid "Added ``type_params``." msgstr "" -#: library/ast.rst:1983 +#: 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." @@ -1299,11 +1333,11 @@ msgstr "" "*args* est une instance de ``arguments`` qui contient les arguments de la " "signature." -#: library/ast.rst:2002 +#: library/ast.rst:2016 msgid "The arguments for a function." msgstr "Arguments d'une fonction." -#: library/ast.rst:2004 +#: library/ast.rst:2018 msgid "" "``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes." msgstr "" @@ -1311,7 +1345,7 @@ msgstr "" "qui correspondent respectivement aux arguments obligatoirement positionnels, " "positionnels ou nommés et obligatoirement nommés." -#: library/ast.rst:2005 +#: library/ast.rst:2019 msgid "" "``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the " "``*args, **kwargs`` parameters." @@ -1320,7 +1354,7 @@ msgstr "" "capture des arguments restants, positionnels (``*arguments_positionnels``) " "et nommés (``**arguments_nommés``)." -#: library/ast.rst:2007 +#: 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." @@ -1330,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:2009 +#: 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 " @@ -1342,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:2016 +#: 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:2021 +#: 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:2063 +#: library/ast.rst:2077 msgid "A ``return`` statement." msgstr "Instruction ``return``, qui renvoie *value*." -#: library/ast.rst:2077 +#: library/ast.rst:2091 #, fuzzy msgid "" "A ``yield`` or ``yield from`` expression. Because these are expressions, " @@ -1371,26 +1405,26 @@ msgstr "" "la valeur qu'elles renvoient n'est pas utilisée dans une expression plus " "large." -#: library/ast.rst:2100 +#: 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:2125 +#: library/ast.rst:2139 msgid "A class definition." msgstr "Définition d'une classe." -#: library/ast.rst:2127 +#: 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:2128 +#: 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:2129 +#: library/ast.rst:2143 #, fuzzy msgid "" "``keywords`` is a list of :class:`.keyword` nodes, principally for " @@ -1401,23 +1435,23 @@ msgstr "" "clé qui peut y apparaître est ``metaclass``. Les autres sont passés à la " "métaclasse (voir la :pep:`3115`) ;" -#: library/ast.rst:2131 +#: 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:2133 +#: 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:2165 +#: library/ast.rst:2179 msgid "Async and await" msgstr "``async`` et ``await``" -#: library/ast.rst:2169 +#: library/ast.rst:2183 msgid "" "An ``async def`` function definition. Has the same fields " "as :class:`FunctionDef`." @@ -1425,7 +1459,7 @@ msgstr "" "Fonction déclarée avec ``async def``. Les champs sont les mêmes que " "dans :class:`FunctionDef`." -#: library/ast.rst:2178 +#: library/ast.rst:2192 msgid "" "An ``await`` expression. ``value`` is what it waits for. Only valid in the " "body of an :class:`AsyncFunctionDef`." @@ -1433,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:2202 +#: 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 " @@ -1443,7 +1477,7 @@ 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:2207 +#: library/ast.rst:2221 #, fuzzy msgid "" "When a string is parsed by :func:`ast.parse`, operator nodes (subclasses " @@ -1460,32 +1494,33 @@ msgstr "" "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:2215 +#: library/ast.rst:2229 #, fuzzy -msgid ":mod:`ast` helpers" +msgid ":mod:`!ast` helpers" msgstr "Outils du module :mod:`ast`" -#: library/ast.rst:2217 +#: 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:2222 +#: 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 " +"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:2227 +#: library/ast.rst:2241 #, fuzzy msgid "" "If ``type_comments=True`` is given, the parser is modified to check and " @@ -1510,14 +1545,14 @@ msgstr "" "l'attribut *type_comment* des nœuds dont le type possède ce champ sera " "toujours mis à ``None``." -#: library/ast.rst:2237 +#: 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:2241 +#: 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 " @@ -1530,12 +1565,12 @@ msgid "" "``feature_version``." msgstr "" -#: library/ast.rst:2251 +#: library/ast.rst:2265 msgid "" "If source contains a null character (``\\0``), :exc:`ValueError` is raised." msgstr "" -#: library/ast.rst:2254 +#: 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 " @@ -1545,13 +1580,13 @@ msgid "" "inside a function node)." msgstr "" -#: library/ast.rst:2261 +#: 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:2265 +#: 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." @@ -1560,19 +1595,24 @@ 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:2269 +#: 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:2272 +#: 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:2279 +#: 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 " @@ -1582,14 +1622,14 @@ msgstr "" "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:2284 +#: 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:2289 +#: library/ast.rst:2306 msgid "" "Trying to unparse a highly complex expression would result " "with :exc:`RecursionError`." @@ -1597,7 +1637,7 @@ msgstr "" "Une :exc:`RecursionError` est levée si l'expression comporte de très " "nombreux niveaux d'imbrication." -#: library/ast.rst:2297 +#: library/ast.rst:2314 #, fuzzy msgid "" "Evaluate an expression node or a string containing only a Python literal or " @@ -1611,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:2302 +#: library/ast.rst:2319 #, fuzzy msgid "" "This can be used for evaluating strings containing Python values without the " @@ -1624,7 +1664,7 @@ msgstr "" "d'évaluer des expressions arbitrairement complexes, par exemple impliquant " "des opérateurs ou de l'indiçage." -#: library/ast.rst:2307 +#: 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 " @@ -1636,7 +1676,7 @@ msgid "" "untrusted data is thus not recommended." msgstr "" -#: library/ast.rst:2317 +#: library/ast.rst:2334 #, fuzzy msgid "" "It is possible to crash the Python interpreter due to stack depth " @@ -1646,26 +1686,26 @@ 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:2320 +#: library/ast.rst:2337 msgid "" "It can " "raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, :exc:`MemoryError` " "and :exc:`RecursionError` depending on the malformed input." msgstr "" -#: library/ast.rst:2324 +#: library/ast.rst:2341 msgid "Now allows bytes and set literals." msgstr "accepte maintenant les octets et ensembles littéraux." -#: library/ast.rst:2327 +#: library/ast.rst:2344 msgid "Now supports creating empty sets with ``'set()'``." msgstr "accepte ``set()`` pour les ensembles vides." -#: library/ast.rst:2330 +#: library/ast.rst:2347 msgid "For string inputs, leading spaces and tabs are now stripped." msgstr "" -#: library/ast.rst:2336 +#: library/ast.rst:2353 msgid "" "Return the docstring of the given *node* (which must be " "a :class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, " @@ -1678,11 +1718,11 @@ msgstr "" "vrai, cette fonction nettoie l'indentation de la *docstring* " "avec :func:`inspect.cleandoc`." -#: library/ast.rst:2342 +#: library/ast.rst:2359 msgid ":class:`AsyncFunctionDef` is now supported." msgstr ":class:`AsyncFunctionDef` est maintenant gérée." -#: library/ast.rst:2348 +#: library/ast.rst:2365 #, fuzzy msgid "" "Get source code segment of the *source* that generated *node*. If some " @@ -1695,13 +1735,13 @@ msgstr "" "(:attr:`lineno`, :attr:`end_lineno`, :attr:`col_offset` " "et :attr:`end_col_offset`) n'est pas rempli, cette fonction renvoie ``None``." -#: library/ast.rst:2352 +#: 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:2360 +#: library/ast.rst:2377 #, fuzzy msgid "" "When you compile a node tree with :func:`compile`, the compiler " @@ -1719,7 +1759,7 @@ msgstr "" "comme les valeurs du nœud parent. Elle fonctionne récursivement en démarrant " "de *node*." -#: library/ast.rst:2369 +#: 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 " @@ -1729,7 +1769,7 @@ 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:2376 +#: library/ast.rst:2393 #, fuzzy msgid "" "Copy source location " @@ -1742,7 +1782,7 @@ msgstr "" "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:2383 +#: library/ast.rst:2400 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." @@ -1750,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:2389 +#: 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." @@ -1759,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:2395 +#: 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 " @@ -1770,7 +1810,7 @@ msgstr "" "lorsque l'on souhaite modifier les nœuds sur place sans prêter attention au " "contexte." -#: library/ast.rst:2402 +#: 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 " @@ -1781,7 +1821,7 @@ msgstr "" "Cette fonction peut renvoyer une valeur, qui est transmise par la " "méthode :meth:`visit`." -#: library/ast.rst:2406 +#: library/ast.rst:2423 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." @@ -1789,7 +1829,7 @@ msgstr "" "Cette classe est faite pour être dérivée, en ajoutant des méthodes de visite " "à la sous-classe." -#: library/ast.rst:2411 +#: 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 " @@ -1799,12 +1839,12 @@ msgstr "" "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:2417 +#: 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:2419 +#: 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." @@ -1813,11 +1853,11 @@ msgstr "" "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:2425 +#: library/ast.rst:2442 msgid "Handles all constant nodes." msgstr "" -#: library/ast.rst:2427 +#: 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 " @@ -1827,13 +1867,13 @@ msgstr "" "changements sur les nœuds lors du parcours. Pour cela, un visiteur spécial " "existe (:class:`NodeTransformer`) qui permet les modifications." -#: library/ast.rst:2433 +#: 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." +"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` " @@ -1842,7 +1882,7 @@ msgstr "" "méthode :meth:`visit_Constant` pour traiter tous les nœuds qui représentent " "des valeurs constantes." -#: library/ast.rst:2441 +#: library/ast.rst:2458 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." @@ -1850,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:2444 +#: 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 " @@ -1864,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:2450 +#: library/ast.rst:2467 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" @@ -1872,7 +1912,7 @@ 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:2462 +#: library/ast.rst:2479 #, fuzzy msgid "" "Keep in mind that if the node you're operating on has child nodes you must " @@ -1883,7 +1923,7 @@ msgstr "" "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:2466 +#: 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 " @@ -1893,7 +1933,7 @@ msgstr "" "instructions), le visiteur peut aussi renvoyer une liste des nœuds plutôt " "qu'un seul nœud." -#: library/ast.rst:2470 +#: library/ast.rst:2487 #, fuzzy msgid "" "If :class:`NodeTransformer` introduces new nodes (that weren't part of " @@ -1906,11 +1946,11 @@ msgstr "" "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:2478 +#: library/ast.rst:2495 msgid "Usually you use the transformer like this::" msgstr "Utilisation typique des transformations ::" -#: library/ast.rst:2485 +#: 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 " @@ -1930,7 +1970,14 @@ msgstr "" "masqués par défaut, mais on peut les inclure en mettant *include_attributes* " "à ``True``." -#: library/ast.rst:2493 +#: 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 " @@ -1947,27 +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:2500 +#: library/ast.rst:2521 msgid "" -"If *show_empty* is false (the default), optional empty lists will be omitted " -"from the output. Optional ``None`` values are always omitted." +"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:2504 +#: library/ast.rst:2542 msgid "Added the *indent* option." msgstr "ajout du paramètre *indent*." -#: library/ast.rst:2507 +#: library/ast.rst:2545 #, fuzzy msgid "Added the *show_empty* option." msgstr "ajout du paramètre *indent*." -#: library/ast.rst:2541 +#: 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:2543 +#: 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:" @@ -1975,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:2548 +#: library/ast.rst:2579 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." @@ -1983,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:2555 +#: 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:2560 +#: library/ast.rst:2591 msgid "" "The returned AST is optimized according to the *optimize* argument " "in :func:`compile` or :func:`ast.parse`." msgstr "" -#: library/ast.rst:2567 +#: library/ast.rst:2598 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." @@ -2004,41 +2074,36 @@ 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:2575 -msgid "Recursively compares two ASTs." -msgstr "" +#: library/ast.rst:2607 +#, fuzzy +msgid "Command-line usage" +msgstr "Utilisation en ligne de commande" -#: library/ast.rst:2577 +#: library/ast.rst:2611 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." +"The output is now syntax highlighted by default. This can " +"be :ref:`controlled using environment variables `." msgstr "" -#: library/ast.rst:2590 +#: library/ast.rst:2615 #, fuzzy -msgid "Command-line usage" -msgstr "Utilisation en ligne de commande" - -#: library/ast.rst:2594 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:2601 +#: library/ast.rst:2622 msgid "The following options are accepted:" msgstr "Les options suivantes sont acceptées :" -#: library/ast.rst:2607 +#: library/ast.rst:2628 msgid "Show the help message and exit." msgstr "Affiche un message d'aide et quitte." -#: library/ast.rst:2612 +#: library/ast.rst:2633 msgid "" "Specify what kind of code must be compiled, like the *mode* argument " "in :func:`parse`." @@ -2046,37 +2111,37 @@ msgstr "" "Précise le type de code à compiler, comme l'argument *mode* de la " "fonction :func:`parse`." -#: library/ast.rst:2617 +#: library/ast.rst:2638 msgid "Don't parse type comments." msgstr "Désactive la reconnaissance des commentaires de type." -#: library/ast.rst:2621 +#: 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:2626 +#: 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:2630 +#: 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:2638 +#: library/ast.rst:2659 msgid "Optimization level for parser. Defaults to no optimization." msgstr "" -#: library/ast.rst:2644 +#: library/ast.rst:2665 msgid "" "Show empty lists and fields that are ``None``. Defaults to not showing empty " "objects." msgstr "" -#: library/ast.rst:2650 +#: 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." @@ -2085,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:2656 +#: library/ast.rst:2677 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." @@ -2094,7 +2159,7 @@ msgstr "" "ressource documentaire externe, qui possède plus de détails pour travailler " "avec des arbres syntaxiques Python." -#: library/ast.rst:2659 +#: library/ast.rst:2680 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " @@ -2106,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:2664 +#: 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 " @@ -2128,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:2674 +#: library/ast.rst:2695 #, fuzzy msgid "" "`Parso `_ is a Python parser that supports " diff --git a/library/asynchat.po b/library/asynchat.po index 11523b1954..356a5ed75c 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 1cdd472172..4f609928a9 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: 2025-10-17 09:58+0200\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" @@ -303,7 +303,7 @@ msgstr "" "pas planifiée avec :meth:`asyncio.create_task`, *asyncio* émet " "un :exc:`RuntimeWarning` ::" -#: library/asyncio-dev.rst:219 +#: library/asyncio-dev.rst:219 library/asyncio-dev.rst:450 msgid "Output::" msgstr "Sortie ::" @@ -347,6 +347,132 @@ 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 \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 @@ -221,7 +222,8 @@ msgstr "" "boucle d'événements." #: library/asyncio-eventloop.rst:109 -msgid "Event Loop Methods" +#, fuzzy +msgid "Event loop methods" msgstr "Méthodes de la boucle d'évènements" #: library/asyncio-eventloop.rst:111 @@ -348,8 +350,8 @@ msgstr "" "Notez qu'il n'est pas nécessaire d'appeler cette fonction " "lorsque :func:`asyncio.run` est utilisée." -#: library/asyncio-eventloop.rst:183 library/asyncio-eventloop.rst:1354 -#: library/asyncio-eventloop.rst:1810 +#: library/asyncio-eventloop.rst:183 library/asyncio-eventloop.rst:1357 +#: library/asyncio-eventloop.rst:1819 msgid "Example::" msgstr "Exemple ::" @@ -473,8 +475,8 @@ msgstr "" "` de la documentation." # suit un : -#: library/asyncio-eventloop.rst:257 library/asyncio-eventloop.rst:313 -#: library/asyncio-eventloop.rst:339 +#: 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." @@ -522,7 +524,7 @@ msgstr "" "Planifie le rappel *callback* à appeler après *delay* secondes (peut être un " "entier ou un flottant)." -#: library/asyncio-eventloop.rst:292 library/asyncio-eventloop.rst:330 +#: 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." @@ -540,16 +542,16 @@ msgstr "" "défini." #: 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:303 +#: 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 " @@ -559,7 +561,7 @@ msgstr "" "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:309 +#: library/asyncio-eventloop.rst:310 msgid "" "For performance, callbacks scheduled with :meth:`loop.call_later` may run up " "to one clock-resolution early (see " @@ -567,7 +569,7 @@ msgid "" msgstr "" # suit un : -#: library/asyncio-eventloop.rst:317 +#: 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." @@ -576,7 +578,7 @@ 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:324 +#: 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`." @@ -585,11 +587,11 @@ msgstr "" "ou un *float*), en utilisant la même référence de temps " "que :meth:`loop.time`." -#: library/asyncio-eventloop.rst:328 +#: 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:335 +#: library/asyncio-eventloop.rst:336 msgid "" "For performance, callbacks scheduled with :meth:`loop.call_at` may run up to " "one clock-resolution early (see " @@ -597,7 +599,7 @@ msgid "" msgstr "" # suit un : -#: library/asyncio-eventloop.rst:343 +#: 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. " @@ -607,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:350 +#: library/asyncio-eventloop.rst:351 msgid "" "Return the current time, as a :class:`float` value, according to the event " "loop's internal monotonic clock." @@ -616,7 +618,7 @@ msgstr "" "l'horloge monotone interne de la boucle d'événements." # suit un : -#: library/asyncio-eventloop.rst:354 +#: 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." @@ -626,20 +628,21 @@ msgstr "" "été corrigé dans Python 3.8." # suit un : -#: library/asyncio-eventloop.rst:360 +#: library/asyncio-eventloop.rst:361 msgid "The :func:`asyncio.sleep` function." msgstr "la fonction :func:`asyncio.sleep`." -#: library/asyncio-eventloop.rst:364 -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:368 +#: 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:370 +#: 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 " @@ -650,7 +653,7 @@ msgstr "" "alternatives de l'objet *Future* (avec de meilleures performances ou " "instrumentation)." -#: library/asyncio-eventloop.rst:378 +#: library/asyncio-eventloop.rst:379 msgid "" "Schedule the execution of :ref:`coroutine ` *coro*. Return " "a :class:`Task` object." @@ -658,7 +661,7 @@ msgstr "" "Planifie l'exécution de :ref:`coroutine ` *coro*. Renvoie un " "objet :class:`Task`." -#: library/asyncio-eventloop.rst:381 +#: 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 " @@ -668,14 +671,14 @@ msgstr "" "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:385 +#: 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:389 +#: 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`." @@ -683,7 +686,7 @@ 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:392 +#: 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 " @@ -693,7 +696,7 @@ msgstr "" "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:396 +#: 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 " @@ -701,40 +704,40 @@ msgid "" "by :meth:`loop.set_task_factory` will be used." msgstr "" -#: library/asyncio-eventloop.rst:401 +#: library/asyncio-eventloop.rst:402 msgid "Added the *name* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:404 +#: library/asyncio-eventloop.rst:405 msgid "Added the *context* parameter." msgstr "ajout du paramètre ``context``." -#: library/asyncio-eventloop.rst:407 +#: library/asyncio-eventloop.rst:408 msgid "" "Added ``kwargs`` which passes on arbitrary extra parameters, including " "``name`` and ``context``." msgstr "" -#: library/asyncio-eventloop.rst:410 +#: 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:414 +#: 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:419 +#: 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`." -#: library/asyncio-eventloop.rst:422 +#: library/asyncio-eventloop.rst:423 #, fuzzy msgid "" "If *factory* is ``None`` the default task factory will be set. Otherwise, " @@ -749,32 +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:428 +#: library/asyncio-eventloop.rst:429 msgid "Required that all *kwargs* are passed on to :class:`asyncio.Task`." msgstr "" -#: library/asyncio-eventloop.rst:431 +#: 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:435 +#: library/asyncio-eventloop.rst:436 msgid "" "*name* and *context* are now unconditionally passed on to task factories " "again." msgstr "" -#: library/asyncio-eventloop.rst:440 +#: 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:444 +#: library/asyncio-eventloop.rst:445 msgid "Opening network connections" msgstr "Création de connexions" -#: library/asyncio-eventloop.rst:456 +#: library/asyncio-eventloop.rst:457 msgid "" "Open a streaming transport connection to a given address specified by *host* " "and *port*." @@ -782,7 +785,7 @@ msgstr "" "Ouvre un flux de transport connecté à l'adresse spécifiée par *host* et " "*port*." -#: library/asyncio-eventloop.rst:459 +#: library/asyncio-eventloop.rst:460 #, fuzzy msgid "" "The socket family can be either :py:const:`~socket.AF_INET` " @@ -793,13 +796,13 @@ msgstr "" "ou :py:data:`~socket.AF_INET6` en fonction de *host* (ou l'argument " "*family*, s'il est fourni)." -#: library/asyncio-eventloop.rst:463 +#: 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:465 library/asyncio-eventloop.rst:1264 -#: library/asyncio-eventloop.rst:1281 +#: 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." @@ -807,7 +810,7 @@ msgstr "" "*protocol_factory* doit être un appelable renvoyant un protocole gérant " "le :ref:`protocole asyncio `." -#: library/asyncio-eventloop.rst:468 +#: 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." @@ -815,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:471 +#: 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:473 +#: library/asyncio-eventloop.rst:474 msgid "" "The connection is established and a :ref:`transport ` is " "created for it." @@ -827,7 +830,7 @@ msgstr "" "La connexion est établie et un :ref:`transport asyncio ` " "est créé pour cela." -#: library/asyncio-eventloop.rst:476 +#: library/asyncio-eventloop.rst:477 msgid "" "*protocol_factory* is called without arguments and is expected to return " "a :ref:`protocol ` instance." @@ -835,7 +838,7 @@ msgstr "" "*protocol_factory* est appelée sans arguments et doit renvoyer une instance " "de :ref:`protocol asyncio `." -#: library/asyncio-eventloop.rst:479 +#: library/asyncio-eventloop.rst:480 msgid "" "The protocol instance is coupled with the transport by calling " "its :meth:`~BaseProtocol.connection_made` method." @@ -843,21 +846,21 @@ msgstr "" "L'instance de protocole est couplée au transport en appelant sa " "méthode :meth:`~BaseProtocol.connection_made`." -#: library/asyncio-eventloop.rst:482 +#: 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:484 +#: 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:487 library/asyncio-eventloop.rst:620 +#: library/asyncio-eventloop.rst:488 library/asyncio-eventloop.rst:621 msgid "Other arguments:" msgstr "Autres arguments :" -#: library/asyncio-eventloop.rst:489 +#: 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` " @@ -871,11 +874,11 @@ msgstr "" "transport ; si *ssl* est :const:`True`, un contexte par défaut renvoyé " "par :func:`ssl.create_default_context` est utilisé." -#: library/asyncio-eventloop.rst:495 +#: 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:497 +#: 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 " @@ -894,7 +897,7 @@ msgstr "" "sécurité sérieux, permettant des attaques potentielles de type « homme du " "milieu »)." -#: library/asyncio-eventloop.rst:505 +#: 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, " @@ -906,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:510 +#: 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 " @@ -923,7 +926,7 @@ msgstr "" "par défaut raisonnable recommandée par la RFC est ``0.25`` (250 " "millisecondes)." -#: library/asyncio-eventloop.rst:518 +#: 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 " @@ -942,7 +945,7 @@ msgstr "" "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:527 +#: 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 " @@ -955,8 +958,8 @@ msgstr "" "*interleave* et *local_addr* ne doit être spécifié." # suit un : -#: library/asyncio-eventloop.rst:535 library/asyncio-eventloop.rst:657 -#: library/asyncio-eventloop.rst:905 +#: 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 " @@ -966,7 +969,7 @@ msgstr "" "Pour fermer le connecteur, appelez la " "méthode :meth:`~asyncio.BaseTransport.close` du transport." -#: library/asyncio-eventloop.rst:539 +#: 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 " @@ -977,7 +980,7 @@ msgstr "" "sont recherchés en utilisant ``getaddrinfo()``, de la même manière que " "*host* et *port*." -#: library/asyncio-eventloop.rst:543 library/asyncio-eventloop.rst:1001 +#: 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. " @@ -987,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:547 library/asyncio-eventloop.rst:812 -#: library/asyncio-eventloop.rst:916 library/asyncio-eventloop.rst:1005 +#: 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`` " @@ -998,7 +1001,7 @@ msgstr "" "se termine avant d'abandonner la connexion. ``30.0`` secondes si ``None`` " "(par défaut)." -#: library/asyncio-eventloop.rst:551 +#: 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 " @@ -1009,13 +1012,13 @@ msgid "" msgstr "" # suit un : -#: library/asyncio-eventloop.rst:561 library/asyncio-eventloop.rst:824 +#: 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:565 +#: library/asyncio-eventloop.rst:566 #, fuzzy msgid "" "The socket option :ref:`socket.TCP_NODELAY ` is set " @@ -1024,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:570 library/asyncio-eventloop.rst:926 +#: 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:574 +#: 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:576 +#: 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 " @@ -1052,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:585 +#: 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:589 library/asyncio-eventloop.rst:721 -#: library/asyncio-eventloop.rst:838 library/asyncio-eventloop.rst:878 -#: library/asyncio-eventloop.rst:930 library/asyncio-eventloop.rst:1013 +#: 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:591 +#: library/asyncio-eventloop.rst:592 msgid "*all_errors* was added." msgstr "" # suit un : -#: library/asyncio-eventloop.rst:596 +#: 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 " @@ -1079,11 +1082,11 @@ 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:607 +#: library/asyncio-eventloop.rst:608 msgid "Create a datagram connection." msgstr "Création d'une connexion par datagramme" -#: library/asyncio-eventloop.rst:609 +#: library/asyncio-eventloop.rst:610 #, fuzzy msgid "" "The socket family can be " @@ -1096,13 +1099,13 @@ msgstr "" "ou :py:data:`~socket.AF_UNIX`, selon *host* (ou l'argument *family*, s'il " "est fourni)." -#: library/asyncio-eventloop.rst:613 +#: 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:615 library/asyncio-eventloop.rst:748 -#: library/asyncio-eventloop.rst:897 +#: 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." @@ -1110,11 +1113,11 @@ msgstr "" "*protocol_factory* doit être un appelable gérant le :ref:`protocole asyncio " "`." -#: library/asyncio-eventloop.rst:618 library/asyncio-eventloop.rst:703 +#: 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:622 +#: 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 " @@ -1124,14 +1127,14 @@ msgstr "" "utilisé pour lier le connecteur localement. Le *local_host* et le " "*local_port* sont recherchés en utilisant :meth:`getaddrinfo`." -#: library/asyncio-eventloop.rst:628 +#: 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:632 +#: 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* " @@ -1142,7 +1145,7 @@ msgstr "" "*remote_host* et le *remote_port* sont recherchés en " "utilisant :meth:`getaddrinfo`." -#: library/asyncio-eventloop.rst:636 +#: 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 " @@ -1154,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:641 +#: library/asyncio-eventloop.rst:642 #, fuzzy msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " @@ -1170,7 +1173,7 @@ msgstr "" "constante :py:data:`~socket.SO_REUSEPORT` n'est pas définie, cette " "fonctionnalité n'est pas prise en charge." -#: library/asyncio-eventloop.rst:647 +#: library/asyncio-eventloop.rst:648 msgid "" "*allow_broadcast* tells the kernel to allow this endpoint to send messages " "to the broadcast address." @@ -1178,7 +1181,7 @@ msgstr "" "*allow_broadcast* indique au noyau d'autoriser ce point de terminaison à " "envoyer des messages à l'adresse de *broadcast*." -#: library/asyncio-eventloop.rst:650 +#: 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 " @@ -1190,7 +1193,7 @@ msgstr "" "transport. Si spécifié, *local_addr* et *remote_addr* doivent être omis " "(doit être :const:`None`)." -#: library/asyncio-eventloop.rst:661 +#: library/asyncio-eventloop.rst:662 msgid "" "See :ref:`UDP echo client protocol ` " "and :ref:`UDP echo server protocol ` " @@ -1200,7 +1203,7 @@ msgstr "" "udp-echo-server-protocol`." # suit un : -#: library/asyncio-eventloop.rst:664 +#: library/asyncio-eventloop.rst:665 msgid "" "The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*, " "*allow_broadcast*, and *sock* parameters were added." @@ -1209,12 +1212,12 @@ msgstr "" "*allow_broadcast* et *sock* ont été ajoutés." # suit un : -#: library/asyncio-eventloop.rst:668 +#: library/asyncio-eventloop.rst:669 msgid "Added support for Windows." msgstr "prise en charge sur Windows." # suit un : -#: library/asyncio-eventloop.rst:671 +#: library/asyncio-eventloop.rst:672 #, fuzzy msgid "" "The *reuse_address* parameter is no longer supported, as " @@ -1226,7 +1229,7 @@ msgstr "" "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:677 +#: 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 " @@ -1237,7 +1240,7 @@ msgstr "" "les paquets entrants peuvent être distribués de manière aléatoire entre les " "connecteurs." -#: library/asyncio-eventloop.rst:681 +#: library/asyncio-eventloop.rst:682 #, fuzzy msgid "" "For supported platforms, *reuse_port* can be used as a replacement for " @@ -1252,7 +1255,7 @@ msgstr "" "des connecteurs à la même adresse de connecteur." # suit un : -#: library/asyncio-eventloop.rst:688 +#: library/asyncio-eventloop.rst:689 #, fuzzy msgid "" "The *reuse_address* parameter, disabled since Python 3.8.1, 3.7.6 and " @@ -1261,11 +1264,11 @@ 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:698 +#: library/asyncio-eventloop.rst:699 msgid "Create a Unix connection." msgstr "Crée une connexion Unix" -#: library/asyncio-eventloop.rst:700 +#: library/asyncio-eventloop.rst:701 #, fuzzy msgid "" "The socket family will be :py:const:`~socket.AF_UNIX`; socket type will " @@ -1274,7 +1277,7 @@ 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:705 +#: 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 " @@ -1286,7 +1289,7 @@ msgstr "" "chemins :class:`str`, :class:`bytes` et :class:`~pathlib.Path` sont pris en " "charge." -#: library/asyncio-eventloop.rst:710 +#: library/asyncio-eventloop.rst:711 msgid "" "See the documentation of the :meth:`loop.create_connection` method for " "information about arguments to this method." @@ -1294,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:713 library/asyncio-eventloop.rst:869 -#: library/asyncio-eventloop.rst:1334 library/asyncio-eventloop.rst:1880 -#: library/asyncio-eventloop.rst:1887 +#: 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 "Disponibilité" -#: library/asyncio-eventloop.rst:715 +#: library/asyncio-eventloop.rst:716 msgid "" "Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " "a :term:`path-like object`." @@ -1308,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:725 +#: library/asyncio-eventloop.rst:726 msgid "Creating network servers" msgstr "Création de serveurs" -#: library/asyncio-eventloop.rst:741 +#: library/asyncio-eventloop.rst:742 #, fuzzy msgid "" "Create a TCP server (socket type :const:`~socket.SOCK_STREAM`) listening on " @@ -1321,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:744 +#: library/asyncio-eventloop.rst:745 msgid "Returns a :class:`Server` object." msgstr "Renvoie un objet :class:`Server`." -#: library/asyncio-eventloop.rst:746 +#: library/asyncio-eventloop.rst:747 msgid "Arguments:" msgstr "Arguments :" -#: library/asyncio-eventloop.rst:751 +#: library/asyncio-eventloop.rst:752 msgid "" "The *host* parameter can be set to several types which determine where the " "server would be listening:" @@ -1337,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:754 +#: library/asyncio-eventloop.rst:755 msgid "" "If *host* is a string, the TCP server is bound to a single network interface " "specified by *host*." @@ -1345,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:757 +#: 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." @@ -1353,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:760 +#: 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 " @@ -1363,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:764 +#: 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 " @@ -1376,7 +1379,7 @@ msgstr "" "interfaces réseau, un port aléatoire différent est sélectionné pour chaque " "interface)." -#: library/asyncio-eventloop.rst:769 +#: library/asyncio-eventloop.rst:770 #, fuzzy msgid "" "*family* can be set to either :const:`socket.AF_INET` " @@ -1389,11 +1392,11 @@ msgstr "" "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:774 +#: 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:776 +#: 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." @@ -1403,7 +1406,7 @@ msgstr "" "spécifiés." # suit un : -#: library/asyncio-eventloop.rst:781 +#: 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." @@ -1412,7 +1415,7 @@ msgstr "" "fermer le connecteur, appelez la méthode :meth:`~asyncio.Server.close` du " "serveur." -#: library/asyncio-eventloop.rst:785 +#: library/asyncio-eventloop.rst:786 msgid "" "*backlog* is the maximum number of queued connections passed " "to :meth:`~socket.socket.listen` (defaults to 100)." @@ -1420,7 +1423,7 @@ msgstr "" "*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:788 +#: library/asyncio-eventloop.rst:789 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` instance to enable TLS over " "the accepted connections." @@ -1428,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:791 +#: 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 " @@ -1439,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:796 +#: 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 " @@ -1450,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:801 +#: 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:806 +#: library/asyncio-eventloop.rst:807 #, fuzzy msgid "Added the *keep_alive* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:808 +#: 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`` " @@ -1471,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:816 +#: 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 " @@ -1485,12 +1488,12 @@ msgstr "" "connexions." # suit un : -#: library/asyncio-eventloop.rst:828 +#: 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:832 +#: library/asyncio-eventloop.rst:833 #, fuzzy msgid "" "Added *ssl_handshake_timeout* and *start_serving* parameters. The socket " @@ -1502,7 +1505,7 @@ msgstr "" "connexions TCP." # suit un : -#: library/asyncio-eventloop.rst:842 +#: 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 " @@ -1512,7 +1515,7 @@ 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:854 +#: library/asyncio-eventloop.rst:855 #, fuzzy msgid "" "Similar to :meth:`loop.create_server` but works with " @@ -1521,7 +1524,7 @@ msgstr "" "Similaire à :meth:`loop.create_server` mais fonctionne avec la famille de " "connecteurs :py:data:`~socket.AF_UNIX`." -#: library/asyncio-eventloop.rst:857 +#: 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`, " @@ -1532,14 +1535,14 @@ msgstr "" "chemins :class:`str`, :class:`bytes` et :class:`~pathlib.Path` sont pris en " "charge." -#: library/asyncio-eventloop.rst:862 +#: 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:866 +#: library/asyncio-eventloop.rst:867 msgid "" "See the documentation of the :meth:`loop.create_server` method for " "information about arguments to this method." @@ -1548,7 +1551,7 @@ msgstr "" "d'informations sur les arguments de cette méthode." # suit un : -#: library/asyncio-eventloop.rst:873 +#: 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." @@ -1556,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:882 +#: library/asyncio-eventloop.rst:883 #, fuzzy msgid "Added the *cleanup_socket* parameter." msgstr "ajout du paramètre ``context``." -#: library/asyncio-eventloop.rst:890 +#: 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:892 +#: 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." @@ -1574,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:895 library/asyncio-eventloop.rst:987 +#: library/asyncio-eventloop.rst:896 library/asyncio-eventloop.rst:988 msgid "Parameters:" msgstr "Paramètres :" -#: library/asyncio-eventloop.rst:900 +#: library/asyncio-eventloop.rst:901 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." @@ -1586,7 +1589,7 @@ msgstr "" "*sock* est un objet connecteur préexistant renvoyé par :meth:`socket.accept " "`." -#: library/asyncio-eventloop.rst:909 +#: library/asyncio-eventloop.rst:910 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " "accepted connections." @@ -1594,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:912 +#: 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. " @@ -1604,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:920 +#: library/asyncio-eventloop.rst:921 msgid "Returns a ``(transport, protocol)`` pair." msgstr "Renvoie une paire ``(transport, protocole)``." -#: library/asyncio-eventloop.rst:934 +#: library/asyncio-eventloop.rst:935 msgid "Transferring files" msgstr "Transfert de fichiers" -#: library/asyncio-eventloop.rst:940 +#: 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:943 +#: 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:945 +#: 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:947 library/asyncio-eventloop.rst:1208 +#: 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 " @@ -1643,7 +1646,7 @@ msgstr "" "erreur. :meth:`file.tell() ` peut être utilisée pour obtenir " "le nombre d'octets réellement envoyés." -#: library/asyncio-eventloop.rst:954 +#: 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 " @@ -1653,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:958 +#: library/asyncio-eventloop.rst:959 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support the " "*sendfile* syscall and *fallback* is ``False``." @@ -1661,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:965 -msgid "TLS Upgrade" +#: library/asyncio-eventloop.rst:966 +#, fuzzy +msgid "TLS upgrade" msgstr "Passage du flux en TLS" -#: library/asyncio-eventloop.rst:973 +#: 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:975 +#: 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 " @@ -1679,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:979 +#: 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 " @@ -1692,13 +1696,13 @@ msgstr "" "*protocol* et échange sporadiquement des paquets de session TLS " "supplémentaires avec *transport*." -#: library/asyncio-eventloop.rst:984 +#: 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:989 +#: library/asyncio-eventloop.rst:990 msgid "" "*transport* and *protocol* instances that methods " "like :meth:`~loop.create_server` and :meth:`~loop.create_connection` return." @@ -1706,11 +1710,11 @@ msgstr "" "*transport* et *protocol* que des méthodes comme :meth:`~loop.create_server` " "et :meth:`~loop.create_connection` renvoient." -#: library/asyncio-eventloop.rst:993 +#: 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:995 +#: 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`)." @@ -1718,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:998 +#: library/asyncio-eventloop.rst:999 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." @@ -1726,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:1018 +#: library/asyncio-eventloop.rst:1019 msgid "Watching file descriptors" msgstr "Surveillance de descripteur de fichier" -#: library/asyncio-eventloop.rst:1022 +#: 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." @@ -1739,13 +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:1026 library/asyncio-eventloop.rst:1040 +#: 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:1031 +#: 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." @@ -1754,16 +1758,18 @@ msgstr "" "lecture. Renvoie ``True`` si *fd* était précédemment surveillé pour les " "lectures." -#: library/asyncio-eventloop.rst:1036 +#: 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:1043 library/asyncio-eventloop.rst:1321 +#: library/asyncio-eventloop.rst:1044 library/asyncio-eventloop.rst:1323 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." @@ -1771,7 +1777,7 @@ msgstr "" "Utilisez :func:`functools.partial` pour :ref:`passer des arguments nommés " "` à *callback*." -#: library/asyncio-eventloop.rst:1048 +#: 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." @@ -1780,7 +1786,7 @@ msgstr "" "écriture. Renvoie ``True`` si *fd* était précédemment surveillé pour les " "écritures." -#: library/asyncio-eventloop.rst:1051 +#: library/asyncio-eventloop.rst:1052 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." @@ -1788,11 +1794,11 @@ msgstr "" "Voir aussi la section :ref:`Prise en charge de la plate-forme ` pour certaines limitations de ces méthodes." -#: library/asyncio-eventloop.rst:1056 +#: library/asyncio-eventloop.rst:1057 msgid "Working with socket objects directly" msgstr "Travail direct avec des objets *socket*" -#: library/asyncio-eventloop.rst:1058 +#: 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 " @@ -1807,7 +1813,7 @@ msgstr "" "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:1068 +#: library/asyncio-eventloop.rst:1069 msgid "" "Receive up to *nbytes* from *sock*. Asynchronous version " "of :meth:`socket.recv() `." @@ -1815,20 +1821,20 @@ msgstr "" "Reçoit jusqu'à *nbytes* de *sock*. Version asynchrone " "de :meth:`socket.recv() `." -#: library/asyncio-eventloop.rst:1071 +#: 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:1073 library/asyncio-eventloop.rst:1088 -#: library/asyncio-eventloop.rst:1100 library/asyncio-eventloop.rst:1113 -#: library/asyncio-eventloop.rst:1129 library/asyncio-eventloop.rst:1145 -#: library/asyncio-eventloop.rst:1156 library/asyncio-eventloop.rst:1183 -#: library/asyncio-eventloop.rst:1222 +#: 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:1075 +#: 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 " @@ -1838,7 +1844,7 @@ msgstr "" "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:1083 +#: library/asyncio-eventloop.rst:1084 msgid "" "Receive data from *sock* into the *buf* buffer. Modeled after the " "blocking :meth:`socket.recv_into() ` method." @@ -1846,11 +1852,11 @@ 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:1086 +#: 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:1095 +#: library/asyncio-eventloop.rst:1096 msgid "" "Receive a datagram of up to *bufsize* from *sock*. Asynchronous version " "of :meth:`socket.recvfrom() `." @@ -1858,11 +1864,11 @@ msgstr "" "Reçoit un datagramme jusqu'à *bufsize* de *sock*. Version asynchrone " "de :meth:`socket.recvfrom() `." -#: library/asyncio-eventloop.rst:1098 +#: 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:1107 +#: library/asyncio-eventloop.rst:1108 msgid "" "Receive a datagram of up to *nbytes* from *sock* into *buf*. Asynchronous " "version of :meth:`socket.recvfrom_into() `." @@ -1870,11 +1876,11 @@ msgstr "" "Reçoit un datagramme jusqu'à *nbytes* de *sock* vers *buf*. Version " "asynchrone de :meth:`socket.recvfrom_into() `." -#: library/asyncio-eventloop.rst:1111 +#: 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:1120 +#: library/asyncio-eventloop.rst:1121 msgid "" "Send *data* to the *sock* socket. Asynchronous version " "of :meth:`socket.sendall() `." @@ -1882,7 +1888,7 @@ msgstr "" "Envoie les données *data* au connecteur *sock*. Version asynchrone " "de :meth:`socket.sendall() `." -#: library/asyncio-eventloop.rst:1123 +#: 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 " @@ -1898,7 +1904,7 @@ msgstr "" "connexion." # suit un : -#: library/asyncio-eventloop.rst:1131 library/asyncio-eventloop.rst:1185 +#: 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 " @@ -1908,7 +1914,7 @@ 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:1139 +#: library/asyncio-eventloop.rst:1140 msgid "" "Send a datagram from *sock* to *address*. Asynchronous version " "of :meth:`socket.sendto() `." @@ -1916,21 +1922,21 @@ msgstr "" "Envoie un datagramme de *sock* à *address*. Version asynchrone " "de :meth:`socket.sendto() `." -#: library/asyncio-eventloop.rst:1143 +#: library/asyncio-eventloop.rst:1144 msgid "Return the number of bytes sent." msgstr "Renvoie le nombre d'octets envoyés." -#: library/asyncio-eventloop.rst:1152 +#: 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:1154 +#: library/asyncio-eventloop.rst:1155 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" "Version asynchrone de :meth:`socket.connect() `." -#: library/asyncio-eventloop.rst:1158 +#: 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 " @@ -1941,7 +1947,7 @@ msgstr "" "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:1167 +#: library/asyncio-eventloop.rst:1168 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." @@ -1949,7 +1955,7 @@ msgstr "" ":meth:`loop.create_connection` et :func:`asyncio.open_connection() " "`." -#: library/asyncio-eventloop.rst:1174 +#: library/asyncio-eventloop.rst:1175 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." @@ -1957,7 +1963,7 @@ msgstr "" "Accepte une connexion. Basée sur le modèle de la méthode " "bloquante :meth:`socket.accept() `." -#: library/asyncio-eventloop.rst:1177 +#: 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 " @@ -1970,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:1192 +#: 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:1198 +#: library/asyncio-eventloop.rst:1199 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." @@ -1982,13 +1988,13 @@ 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:1201 +#: library/asyncio-eventloop.rst:1202 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" "Version asynchrone de :meth:`socket.sendfile() `." -#: library/asyncio-eventloop.rst:1203 +#: library/asyncio-eventloop.rst:1204 msgid "" "*sock* must be a non-" "blocking :const:`socket.SOCK_STREAM` :class:`~socket.socket`." @@ -1996,11 +2002,11 @@ msgstr "" "*sock* doit être un :const:`socket.SOCK_STREAM` :class:`~socket.socket` non " "bloquant." -#: library/asyncio-eventloop.rst:1206 +#: 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:1215 +#: 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 " @@ -2011,7 +2017,7 @@ msgstr "" "charge l'appel système *sendfile* (par exemple, Windows ou connecteur SSL " "sous Unix)." -#: library/asyncio-eventloop.rst:1219 +#: library/asyncio-eventloop.rst:1220 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." @@ -2019,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:1228 +#: library/asyncio-eventloop.rst:1229 msgid "DNS" msgstr "DNS" -#: library/asyncio-eventloop.rst:1234 +#: library/asyncio-eventloop.rst:1235 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "Version asynchrone de :meth:`socket.getaddrinfo`." -#: library/asyncio-eventloop.rst:1239 +#: library/asyncio-eventloop.rst:1240 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "Version asynchrone de :meth:`socket.getnameinfo`." -#: library/asyncio-eventloop.rst:1242 +#: 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 " @@ -2042,7 +2048,7 @@ msgid "" msgstr "" # suit un : -#: library/asyncio-eventloop.rst:1249 +#: 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, " @@ -2054,20 +2060,20 @@ msgstr "" "fait des objets :class:`asyncio.Future`. À partir de Python 3.7, les deux " "méthodes sont des coroutines." -#: library/asyncio-eventloop.rst:1257 +#: library/asyncio-eventloop.rst:1258 msgid "Working with pipes" msgstr "Travail avec des tubes (*pipes*)" -#: library/asyncio-eventloop.rst:1262 +#: 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:1267 +#: library/asyncio-eventloop.rst:1268 msgid "*pipe* is a :term:`file-like object `." msgstr "*pipe* est un :term:`simili-fichier `." -#: library/asyncio-eventloop.rst:1269 +#: library/asyncio-eventloop.rst:1270 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports " "the :class:`ReadTransport` interface and *protocol* is an object " @@ -2077,7 +2083,7 @@ msgstr "" "l'interface :class:`ReadTransport` et *protocol* est un objet instancié par " "*protocol_factory*." -#: library/asyncio-eventloop.rst:1273 library/asyncio-eventloop.rst:1290 +#: library/asyncio-eventloop.rst:1274 library/asyncio-eventloop.rst:1291 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." @@ -2085,15 +2091,15 @@ msgstr "" "Avec la boucle d'événements :class:`SelectorEventLoop`, le *pipe* est mis en " "mode non bloquant." -#: library/asyncio-eventloop.rst:1279 +#: 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:1284 +#: library/asyncio-eventloop.rst:1285 msgid "*pipe* is :term:`file-like object `." msgstr "*pipe* est un :term:`simili-fichier `." -#: library/asyncio-eventloop.rst:1286 +#: library/asyncio-eventloop.rst:1287 msgid "" "Return pair ``(transport, protocol)``, where *transport* " "supports :class:`WriteTransport` interface and *protocol* is an object " @@ -2103,7 +2109,7 @@ msgstr "" "l'interface :class:`WriteTransport` et *protocol* est un objet instancié par " "*protocol_factory*." -#: library/asyncio-eventloop.rst:1295 +#: library/asyncio-eventloop.rst:1296 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." @@ -2112,21 +2118,24 @@ msgstr "" "sous Windows. Utilisez :class:`ProactorEventLoop` à la place pour Windows." # suit un : -#: library/asyncio-eventloop.rst:1300 +#: 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:1305 +#: library/asyncio-eventloop.rst:1306 msgid "Unix signals" msgstr "Signaux Unix" -#: library/asyncio-eventloop.rst:1311 -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:1313 +#: 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 " @@ -2139,7 +2148,7 @@ msgstr "" "de :func:`signal.signal`, un rappel enregistré avec cette fonction est " "autorisé à interagir avec la boucle d'événements." -#: library/asyncio-eventloop.rst:1318 +#: 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." @@ -2148,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:1324 +#: 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:1329 +#: library/asyncio-eventloop.rst:1331 msgid "Remove the handler for the *sig* signal." msgstr "Supprime le gestionnaire du signal *sig*." -#: library/asyncio-eventloop.rst:1331 +#: 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." @@ -2168,19 +2177,22 @@ msgstr "" "si aucun gestionnaire n'a été défini pour le signal donné." # suit un : -#: library/asyncio-eventloop.rst:1338 +#: library/asyncio-eventloop.rst:1340 msgid "The :mod:`signal` module." msgstr "le module :mod:`signal`." -#: library/asyncio-eventloop.rst:1342 +#: 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:1346 -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:1348 +#: 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 " @@ -2189,7 +2201,7 @@ msgid "" "and used by :func:`run_in_executor` if needed." msgstr "" -#: library/asyncio-eventloop.rst:1402 +#: 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 " @@ -2202,11 +2214,11 @@ msgstr "" "par :class:`~concurrent.futures.ProcessPoolExecutor`. Voir :ref:`Importation " "sécurisée du module principal `." -#: library/asyncio-eventloop.rst:1407 +#: 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:1409 +#: library/asyncio-eventloop.rst:1412 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." @@ -2214,7 +2226,7 @@ msgstr "" "Utilisez :func:`functools.partial` pour :ref:`passer des arguments nommés " "` à *func*." -#: library/asyncio-eventloop.rst:1412 +#: 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 " @@ -2226,7 +2238,7 @@ msgstr "" "de pool de threads (:class:`~concurrent.futures.ThreadPoolExecutor`) le soin " "de définir le défaut." -#: library/asyncio-eventloop.rst:1421 +#: library/asyncio-eventloop.rst:1424 #, fuzzy msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " @@ -2238,7 +2250,7 @@ msgstr "" "par :meth:`run_in_executor`. *executor* doit être une instance " "de :class:`~concurrent.futures.ThreadPoolExecutor`." -#: library/asyncio-eventloop.rst:1426 +#: library/asyncio-eventloop.rst:1429 msgid "" "*executor* must be an instance " "of :class:`~concurrent.futures.ThreadPoolExecutor`." @@ -2246,23 +2258,24 @@ msgstr "" "*executor* doit être une instance " "de :class:`~concurrent.futures.ThreadPoolExecutor`." -#: library/asyncio-eventloop.rst:1432 -msgid "Error Handling API" +#: library/asyncio-eventloop.rst:1435 +#, fuzzy +msgid "Error handling API" msgstr "API de gestion d'erreur" -#: library/asyncio-eventloop.rst:1434 +#: 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:1438 +#: 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:1440 +#: 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, " @@ -2277,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:1448 +#: 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." msgstr "" -#: library/asyncio-eventloop.rst:1454 +#: 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:1459 +#: library/asyncio-eventloop.rst:1462 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." @@ -2298,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:1466 +#: library/asyncio-eventloop.rst:1469 msgid "Default exception handler." msgstr "Gestionnaire d'exception par défaut." -#: library/asyncio-eventloop.rst:1468 +#: 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 " @@ -2313,7 +2326,7 @@ msgstr "" "personnalisé qui souhaite s'en remettre au comportement du gestionnaire par " "défaut." -#: library/asyncio-eventloop.rst:1472 +#: library/asyncio-eventloop.rst:1475 msgid "" "*context* parameter has the same meaning as " "in :meth:`call_exception_handler`." @@ -2321,12 +2334,12 @@ msgstr "" "Le paramètre *context* a la même signification que " "dans :meth:`call_exception_handler`." -#: library/asyncio-eventloop.rst:1477 +#: 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:1479 +#: library/asyncio-eventloop.rst:1482 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" @@ -2334,60 +2347,60 @@ 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:1482 +#: library/asyncio-eventloop.rst:1485 msgid "'message': Error message;" msgstr "'message' : message d'erreur ;" -#: library/asyncio-eventloop.rst:1483 +#: library/asyncio-eventloop.rst:1486 msgid "'exception' (optional): Exception object;" msgstr "'exception' (facultatif) : objet exception ;" -#: library/asyncio-eventloop.rst:1484 +#: library/asyncio-eventloop.rst:1487 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "'future' (facultatif) : instance de :class:`asyncio.Future` ;" -#: library/asyncio-eventloop.rst:1485 +#: library/asyncio-eventloop.rst:1488 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "'task' (facultatif) : instance de :class:`asyncio.Task` ;" -#: library/asyncio-eventloop.rst:1486 +#: library/asyncio-eventloop.rst:1489 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "*'handle'* (facultatif) : instance de :class:`asyncio.Handle` ;" -#: library/asyncio-eventloop.rst:1487 +#: library/asyncio-eventloop.rst:1490 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" "*'protocol'* (facultatif) : instance de :ref:`protocole asyncio ` ;" -#: library/asyncio-eventloop.rst:1488 +#: library/asyncio-eventloop.rst:1491 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" "'transport' (facultatif) : instance de :ref:`transport asyncio ` ;" -#: library/asyncio-eventloop.rst:1489 +#: library/asyncio-eventloop.rst:1492 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "'socket' (facultatif) : instance de :class:`socket.socket` ;" -#: library/asyncio-eventloop.rst:1490 +#: library/asyncio-eventloop.rst:1493 msgid "'source_traceback' (optional): Traceback of the source;" msgstr "" -#: library/asyncio-eventloop.rst:1491 +#: library/asyncio-eventloop.rst:1494 msgid "'handle_traceback' (optional): Traceback of the handle;" msgstr "" -#: library/asyncio-eventloop.rst:1492 +#: 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:1493 +#: library/asyncio-eventloop.rst:1496 msgid "the exception." msgstr "l'exception" # suit un : -#: library/asyncio-eventloop.rst:1497 +#: library/asyncio-eventloop.rst:1500 #, fuzzy msgid "" "This method should not be overloaded in subclassed event loops. For custom " @@ -2397,15 +2410,15 @@ msgstr "" "classées. Pour la gestion personnalisée des exceptions, utilisez la " "méthode :meth:`set_exception_handler()`." -#: library/asyncio-eventloop.rst:1502 +#: library/asyncio-eventloop.rst:1505 msgid "Enabling debug mode" msgstr "Activation du mode débogage" -#: library/asyncio-eventloop.rst:1506 +#: 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:1508 +#: library/asyncio-eventloop.rst:1511 msgid "" "The default value is ``True`` if the environment " "variable :envvar:`PYTHONASYNCIODEBUG` is set to a non-empty string, " @@ -2415,12 +2428,12 @@ msgstr "" "d'environnement :envvar:`PYTHONASYNCIODEBUG` est définie sur une chaîne non " "vide, ``False`` sinon." -#: library/asyncio-eventloop.rst:1514 +#: 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:1518 +#: library/asyncio-eventloop.rst:1521 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." @@ -2428,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:1523 +#: 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:1527 +#: library/asyncio-eventloop.rst:1530 msgid "Default value is 100 milliseconds." msgstr "" # suit un : -#: library/asyncio-eventloop.rst:1531 +#: library/asyncio-eventloop.rst:1534 msgid "The :ref:`debug mode of asyncio `." msgstr "le :ref:`mode debogage d'asyncio `." -#: library/asyncio-eventloop.rst:1535 -msgid "Running Subprocesses" +#: library/asyncio-eventloop.rst:1538 +#, fuzzy +msgid "Running subprocesses" msgstr "Exécution de sous-processus" -#: library/asyncio-eventloop.rst:1537 +#: 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` " @@ -2460,7 +2474,7 @@ msgstr "" "et :func:`asyncio.create_subprocess_exec` à la place." # suit un : -#: library/asyncio-eventloop.rst:1544 +#: library/asyncio-eventloop.rst:1547 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not. " @@ -2472,22 +2486,22 @@ msgstr "" "à :class:`SelectorEventLoop`. Voir :ref:`Prise en charge des sous-processus " "sous Windows ` pour plus de détails." -#: library/asyncio-eventloop.rst:1556 +#: 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:1559 +#: 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:1561 +#: library/asyncio-eventloop.rst:1564 msgid ":class:`str`;" msgstr ":class:`str` ;" -#: library/asyncio-eventloop.rst:1562 +#: library/asyncio-eventloop.rst:1565 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." @@ -2495,7 +2509,7 @@ msgstr "" "ou :class:`bytes`, encodés selon l':ref:`encodage du système de fichiers " "`." -#: library/asyncio-eventloop.rst:1565 +#: 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 " @@ -2505,7 +2519,7 @@ msgstr "" "restantes spécifient les arguments. Ensemble, les arguments de chaîne " "forment le ``argv`` du programme." -#: library/asyncio-eventloop.rst:1569 +#: 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 " @@ -2518,7 +2532,7 @@ msgstr "" "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:1575 +#: library/asyncio-eventloop.rst:1578 msgid "" "The *protocol_factory* must be a callable returning a subclass of " "the :class:`asyncio.SubprocessProtocol` class." @@ -2526,27 +2540,27 @@ msgstr "" "Le *protocol_factory* doit être un appelable renvoyant une sous-classe de la " "classe :class:`asyncio.SubprocessProtocol`." -#: library/asyncio-eventloop.rst:1578 +#: library/asyncio-eventloop.rst:1581 msgid "Other parameters:" msgstr "Autres paramètres :" -#: library/asyncio-eventloop.rst:1580 +#: 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:1582 library/asyncio-eventloop.rst:1593 -#: library/asyncio-eventloop.rst:1603 +#: 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:1583 +#: 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:1584 library/asyncio-eventloop.rst:1594 -#: library/asyncio-eventloop.rst:1604 +#: 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," @@ -2554,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:1586 library/asyncio-eventloop.rst:1596 -#: library/asyncio-eventloop.rst:1606 +#: 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" @@ -2563,8 +2577,8 @@ msgstr "" "la valeur ``None`` qui fera que le sous-processus héritera du descripteur de " "fichier de ce processus," -#: library/asyncio-eventloop.rst:1588 library/asyncio-eventloop.rst:1598 -#: library/asyncio-eventloop.rst:1608 +#: 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" @@ -2572,15 +2586,15 @@ msgstr "" "la constante :const:`subprocess.DEVNULL` qui indique que le fichier " "spécial :data:`os.devnull` sera utilisé." -#: library/asyncio-eventloop.rst:1591 +#: 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:1601 +#: 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:1610 +#: library/asyncio-eventloop.rst:1613 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" @@ -2588,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:1613 +#: 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*, " @@ -2599,7 +2613,7 @@ msgstr "" "*shell*, *text*, *encoding* et *errors*, qui ne doivent pas être spécifiés " "du tout." -#: library/asyncio-eventloop.rst:1618 +#: 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 " @@ -2609,7 +2623,7 @@ 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:1622 +#: 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 " @@ -2617,7 +2631,7 @@ msgid "" "use with the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1627 +#: library/asyncio-eventloop.rst:1630 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." @@ -2625,7 +2639,7 @@ msgstr "" "Voir le constructeur de la classe :class:`subprocess.Popen` pour la " "documentation sur les autres arguments." -#: library/asyncio-eventloop.rst:1630 +#: 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 " @@ -2635,7 +2649,13 @@ msgstr "" "la classe de base :class:`asyncio.SubprocessTransport` et *protocol* est un " "objet instancié par *protocol_factory*." -#: library/asyncio-eventloop.rst:1639 +#: 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 `, en utilisant " "la syntaxe \"shell\" de la plate-forme." -#: library/asyncio-eventloop.rst:1644 +#: library/asyncio-eventloop.rst:1650 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." @@ -2654,7 +2674,7 @@ msgstr "" "C'est similaire à la classe standard de la " "bibliothèque :class:`subprocess.Popen` appelée avec ``shell=True``." -#: library/asyncio-eventloop.rst:1647 +#: library/asyncio-eventloop.rst:1653 msgid "" "The *protocol_factory* must be a callable returning a subclass of " "the :class:`SubprocessProtocol` class." @@ -2662,7 +2682,7 @@ msgstr "" "Le *protocol_factory* doit être un appelable renvoyant une sous-classe de la " "classe :class:`SubprocessProtocol`." -#: library/asyncio-eventloop.rst:1650 +#: library/asyncio-eventloop.rst:1656 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." @@ -2670,7 +2690,7 @@ msgstr "" "Voir :meth:`~loop.subprocess_exec` pour plus de détails sur les arguments " "restants." -#: library/asyncio-eventloop.rst:1653 +#: 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 " @@ -2681,7 +2701,7 @@ msgstr "" "instancié par *protocol_factory*." # suit un : -#: library/asyncio-eventloop.rst:1658 +#: 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 " @@ -2698,11 +2718,12 @@ msgstr "" "caractères spéciaux dans les chaînes qui seront utilisées pour construire " "des commandes shell." -#: library/asyncio-eventloop.rst:1667 -msgid "Callback Handles" +#: library/asyncio-eventloop.rst:1676 +#, fuzzy +msgid "Callback handles" msgstr "Fonctions de rappel sur des descripteurs" -#: library/asyncio-eventloop.rst:1671 +#: library/asyncio-eventloop.rst:1680 msgid "" "A callback wrapper object returned " "by :meth:`loop.call_soon`, :meth:`loop.call_soon_threadsafe`." @@ -2710,13 +2731,13 @@ msgstr "" "Objet encapsulant une fonction de rappel renvoyé " "par :meth:`loop.call_soon`, :meth:`loop.call_soon_threadsafe`." -#: library/asyncio-eventloop.rst:1676 +#: 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:1683 +#: library/asyncio-eventloop.rst:1692 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." @@ -2724,11 +2745,11 @@ 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:1688 +#: 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:1694 +#: library/asyncio-eventloop.rst:1703 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, " "and :meth:`loop.call_at`." @@ -2736,16 +2757,16 @@ msgstr "" "Objet encapsulant la fonction de rappel renvoyé par :meth:`loop.call_later` " "et :meth:`loop.call_at`." -#: library/asyncio-eventloop.rst:1697 +#: 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:1701 +#: 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:1703 +#: library/asyncio-eventloop.rst:1712 msgid "" "The time is an absolute timestamp, using the same time reference " "as :meth:`loop.time`." @@ -2753,11 +2774,12 @@ msgstr "" "L'heure est un horodatage absolu, utilisant la même référence de temps " "que :meth:`loop.time`." -#: library/asyncio-eventloop.rst:1710 -msgid "Server Objects" +#: library/asyncio-eventloop.rst:1719 +#, fuzzy +msgid "Server objects" msgstr "Objets Serveur" -#: library/asyncio-eventloop.rst:1712 +#: library/asyncio-eventloop.rst:1721 msgid "" "Server objects are created " "by :meth:`loop.create_server`, :meth:`loop.create_unix_server`, :func:`start_server`, " @@ -2767,12 +2789,12 @@ msgstr "" "fonctions :meth:`loop.create_server`, :meth:`loop.create_unix_server`, :func:`start_server` " "et :func:`start_unix_server`." -#: library/asyncio-eventloop.rst:1716 +#: 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:1720 +#: 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 " @@ -2784,18 +2806,18 @@ msgstr "" "l'instruction ``async with`` est terminée ::" # suit un : -#: library/asyncio-eventloop.rst:1733 +#: 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:1736 +#: 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:1741 +#: library/asyncio-eventloop.rst:1750 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." @@ -2803,7 +2825,7 @@ msgstr "" "Arrête le serveur : ferme les connecteurs d'écoute et définit " "l'attribut :attr:`sockets` à ``None``." -#: library/asyncio-eventloop.rst:1744 +#: library/asyncio-eventloop.rst:1753 msgid "" "The sockets that represent existing incoming client connections are left " "open." @@ -2811,7 +2833,7 @@ msgstr "" "Les connecteurs qui représentent les connexions client entrantes existantes " "restent ouvertes." -#: library/asyncio-eventloop.rst:1747 +#: library/asyncio-eventloop.rst:1756 #, fuzzy msgid "" "The server is closed asynchronously; use the :meth:`wait_closed` coroutine " @@ -2820,50 +2842,50 @@ msgstr "" "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:1753 +#: 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:1755 +#: library/asyncio-eventloop.rst:1764 msgid "" "Calls :meth:`~asyncio.BaseTransport.close` on all associated transports." msgstr "" -#: library/asyncio-eventloop.rst:1758 +#: 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:1765 +#: 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:1768 +#: library/asyncio-eventloop.rst:1777 msgid "" "Calls :meth:`~asyncio.WriteTransport.abort` on all associated transports." msgstr "" -#: library/asyncio-eventloop.rst:1771 +#: 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:1778 +#: 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:1785 +#: library/asyncio-eventloop.rst:1794 msgid "Start accepting connections." msgstr "Commence à accepter les connexions." -#: library/asyncio-eventloop.rst:1787 +#: library/asyncio-eventloop.rst:1796 msgid "" "This method is idempotent, so it can be called when the server is already " "serving." @@ -2871,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:1790 +#: 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 " @@ -2885,7 +2907,7 @@ msgstr "" "``Server.start_serving()`` ou :meth:`Server.serve_forever` peut être " "utilisée pour que le serveur commence à accepter les connexions." -#: library/asyncio-eventloop.rst:1802 +#: 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." @@ -2893,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:1806 +#: 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." @@ -2901,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:1828 +#: 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:1835 +#: 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:1840 +#: library/asyncio-eventloop.rst:1849 #, fuzzy msgid "" "List of socket-like objects, ``asyncio.trsock.TransportSocket``, which the " @@ -2921,7 +2943,7 @@ msgstr "" "Liste les objets :class:`socket.socket` sur lesquels le serveur écoute." # vulnérabilités -#: library/asyncio-eventloop.rst:1843 +#: 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." @@ -2929,11 +2951,12 @@ 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:1853 -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:1855 +#: library/asyncio-eventloop.rst:1864 msgid "" "asyncio ships with two different event loop " "implementations: :class:`SelectorEventLoop` and :class:`ProactorEventLoop`." @@ -2941,21 +2964,21 @@ msgstr "" "*asyncio* est livré avec deux implémentations de boucles d'événements " "différentes : :class:`SelectorEventLoop` et :class:`ProactorEventLoop`." -#: library/asyncio-eventloop.rst:1858 +#: 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:1863 +#: 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:1866 +#: 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 " @@ -2965,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:1885 +#: library/asyncio-eventloop.rst:1894 #, fuzzy msgid "" "A subclass of :class:`AbstractEventLoop` for Windows that uses \"I/O " @@ -2974,7 +2997,7 @@ msgstr "" "Boucle d'événements pour Windows qui utilise des \"I/O Completion Ports\" " "(IOCP)." -#: library/asyncio-eventloop.rst:1891 +#: library/asyncio-eventloop.rst:1900 #, fuzzy msgid "" "`MSDN documentation on I/O Completion Ports `_." -#: library/asyncio-eventloop.rst:1896 +#: library/asyncio-eventloop.rst:1905 msgid "" "An alias to the most efficient available subclass " "of :class:`AbstractEventLoop` for the given platform." msgstr "" -#: library/asyncio-eventloop.rst:1899 +#: library/asyncio-eventloop.rst:1908 #, fuzzy msgid "" "It is an alias to :class:`SelectorEventLoop` on Unix " @@ -2998,12 +3021,12 @@ msgstr "" "Par défaut, *asyncio* est configuré pour utiliser :class:`SelectorEventLoop` " "sous Unix et :class:`ProactorEventLoop` sous Windows." -#: library/asyncio-eventloop.rst:1905 +#: 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*." -#: library/asyncio-eventloop.rst:1907 +#: 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." @@ -3011,11 +3034,11 @@ 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:1913 +#: library/asyncio-eventloop.rst:1922 msgid "Examples" msgstr "Exemples" -#: library/asyncio-eventloop.rst:1915 +#: 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` " @@ -3029,11 +3052,11 @@ msgstr "" "*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:1925 +#: library/asyncio-eventloop.rst:1934 msgid "Hello World with call_soon()" msgstr "\"Hello World\" avec ``call_soon()``" -#: library/asyncio-eventloop.rst:1927 +#: 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::" @@ -3043,7 +3066,7 @@ msgstr "" "d'événements ::" # suit un : -#: library/asyncio-eventloop.rst:1951 +#: library/asyncio-eventloop.rst:1960 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." @@ -3051,11 +3074,11 @@ msgstr "" "un exemple similaire de :ref:`Hello World ` créé avec une " "coroutine et la fonction :func:`run`." -#: library/asyncio-eventloop.rst:1958 +#: 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:1960 +#: 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 " @@ -3066,7 +3089,7 @@ msgstr "" "5 secondes, puis arrête la boucle d'événements ::" # suit un : -#: library/asyncio-eventloop.rst:1988 +#: library/asyncio-eventloop.rst:1997 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." @@ -3074,11 +3097,11 @@ msgstr "" "un exemple similaire de :ref:`date actuelle ` créé " "avec une coroutine et la fonction :func:`run`." -#: library/asyncio-eventloop.rst:1995 +#: 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:1997 +#: 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::" @@ -3087,7 +3110,7 @@ msgstr "" "méthode :meth:`loop.add_reader` puis ferme la boucle d'événements ::" # suit un : -#: library/asyncio-eventloop.rst:2035 +#: library/asyncio-eventloop.rst:2044 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." @@ -3096,7 +3119,7 @@ msgstr "" "les transports, les protocoles et la méthode :meth:`loop.create_connection`," # suit un : -#: library/asyncio-eventloop.rst:2039 +#: library/asyncio-eventloop.rst:2048 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." @@ -3105,15 +3128,16 @@ msgstr "" "utilisant la fonction et les flux de haut " "niveau :func:`asyncio.open_connection`." -#: library/asyncio-eventloop.rst:2047 +#: library/asyncio-eventloop.rst:2056 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "Gestion des signaux *SIGINT* et *SIGTERM*" -#: library/asyncio-eventloop.rst:2049 -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:2051 +#: library/asyncio-eventloop.rst:2060 #, fuzzy msgid "" "Register handlers for signals :const:`~signal.SIGINT` " @@ -3124,6 +3148,15 @@ msgstr "" "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 " diff --git a/library/asyncio-future.po b/library/asyncio-future.po index 0ce58a8718..1e31b59c2d 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: 2025-10-17 09:58+0200\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" @@ -191,10 +191,14 @@ msgstr "" "leur propre implémentation de l'objet *Future*." #: 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:107 +#: library/asyncio-future.rst:109 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." @@ -202,11 +206,11 @@ 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:113 +#: library/asyncio-future.rst:115 msgid "Return the result of the Future." msgstr "Renvoie le résultat du *Future*." -#: library/asyncio-future.rst:115 +#: 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." @@ -214,7 +218,7 @@ 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é." -#: library/asyncio-future.rst:118 +#: 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." @@ -222,7 +226,7 @@ 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." -#: library/asyncio-future.rst:209 +#: library/asyncio-future.rst:215 msgid "" "If the Future has been *cancelled*, this method raises " "a :exc:`CancelledError` exception." @@ -230,7 +234,7 @@ msgstr "" "Si le *Future* a été *annulé*, cette méthode lève une " "exception :exc:`CancelledError`." -#: library/asyncio-future.rst:124 +#: library/asyncio-future.rst:126 #, fuzzy msgid "" "If the Future's result isn't yet available, this method raises " @@ -239,26 +243,26 @@ 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:129 +#: 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:138 +#: 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:136 +#: 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:143 +#: 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:145 +#: 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." @@ -267,11 +271,11 @@ msgstr "" "exception a été définie par les méthodes :meth:`set_result` " "ou :meth:`set_exception`." -#: library/asyncio-future.rst:151 +#: 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:153 +#: 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::" @@ -279,17 +283,17 @@ 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:161 +#: 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:163 +#: 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:166 +#: 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`." @@ -298,7 +302,7 @@ msgstr "" "l'exécution de la fonction de rappel est planifiée " "avec :meth:`loop.call_soon`." -#: library/asyncio-future.rst:169 +#: 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 " @@ -309,7 +313,7 @@ msgstr "" "de rappel s’exécutera. Le contexte actuel est utilisé si *context* n'est pas " "fourni." -#: library/asyncio-future.rst:173 +#: library/asyncio-future.rst:175 msgid "" ":func:`functools.partial` can be used to pass parameters to the callback, " "e.g.::" @@ -317,18 +321,18 @@ msgstr "" ":func:`functools.partial` peut être utilisée pour passer des paramètres à la " "fonction de rappel ::" -#: library/asyncio-future.rst:180 +#: 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:186 +#: 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:188 +#: library/asyncio-future.rst:190 msgid "" "Returns the number of callbacks removed, which is typically 1, unless a " "callback was added more than once." @@ -336,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:193 +#: 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:195 +#: 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 " @@ -350,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:199 +#: 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:204 +#: 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:206 +#: library/asyncio-future.rst:212 msgid "" "The exception (or ``None`` if no exception was set) is returned only if the " "Future is *done*." @@ -366,7 +377,7 @@ 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:212 +#: library/asyncio-future.rst:218 msgid "" "If the Future isn't *done* yet, this method raises " "an :exc:`InvalidStateError` exception." @@ -374,11 +385,11 @@ msgstr "" "Si le *Future* n'est pas encore « terminé », cette méthode lève une " "exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:217 +#: 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:224 +#: 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::" @@ -387,7 +398,7 @@ 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:259 +#: library/asyncio-future.rst:265 msgid "" "The Future object was designed to mimic :class:`concurrent.futures.Future`. " "Key differences include:" @@ -395,7 +406,7 @@ msgstr "" "L'objet *Future* est conçu pour imiter la " "classe :class:`concurrent.futures.Future`. Les principales différences sont :" -#: library/asyncio-future.rst:262 +#: library/asyncio-future.rst:268 msgid "" "unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot " "be awaited." @@ -403,7 +414,7 @@ msgstr "" "contrairement au *Future asyncio*, les instances " "de :class:`concurrent.futures.Future` ne peuvent pas être attendues ;" -#: library/asyncio-future.rst:265 +#: library/asyncio-future.rst:271 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` do not " "accept the *timeout* argument." @@ -411,7 +422,7 @@ msgstr "" ":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` " "n'acceptent pas d'argument *timeout* ;" -#: library/asyncio-future.rst:268 +#: 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*." @@ -420,7 +431,7 @@ msgstr "" "exception :exc:`InvalidStateError` lorsque le *Future* n'est pas " "« terminé » ;" -#: library/asyncio-future.rst:272 +#: 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." @@ -429,7 +440,7 @@ msgstr "" "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:276 +#: library/asyncio-future.rst:282 msgid "" "asyncio Future is not compatible with the :func:`concurrent.futures.wait` " "and :func:`concurrent.futures.as_completed` functions." @@ -438,7 +449,7 @@ msgstr "" "fonctions :func:`concurrent.futures.wait` " "et :func:`concurrent.futures.as_completed` ;" -#: library/asyncio-future.rst:280 +#: library/asyncio-future.rst:286 #, fuzzy msgid "" ":meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument, " diff --git a/library/asyncio-graph.po b/library/asyncio-graph.po index 74a69fffd5..bdfdaf6476 100644 --- a/library/asyncio-graph.po +++ b/library/asyncio-graph.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index 1d7187ebf2..a9eb08bb85 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: 2025-10-17 09:58+0200\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" @@ -185,7 +185,7 @@ msgid "" "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 " -"blocked thread." +"awaiting task." msgstr "" #: library/asyncio-queue.rst:112 @@ -209,25 +209,26 @@ msgstr "" #: library/asyncio-queue.rst:122 msgid "" "If *immediate* is true, the queue is terminated immediately. The queue is " -"drained to be completely empty. All callers of :meth:`~Queue.join` are " -"unblocked regardless of the number of unfinished tasks. Blocked callers " +"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:129 +#: 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:137 +#: 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:139 +#: library/asyncio-queue.rst:140 #, fuzzy msgid "" "Used by queue consumers. For each :meth:`~Queue.get` used to fetch a work " @@ -239,7 +240,7 @@ msgstr "" "ultérieur à :meth:`task_done` indique à la file d'attente que le traitement " "de la tâche est terminé." -#: library/asyncio-queue.rst:143 +#: 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 " @@ -249,7 +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:148 +#: library/asyncio-queue.rst:149 msgid "" "Raises :exc:`ValueError` if called more times than there were items placed " "in the queue." @@ -257,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:153 +#: library/asyncio-queue.rst:154 msgid "Priority Queue" msgstr "File avec priorité" -#: library/asyncio-queue.rst:157 +#: library/asyncio-queue.rst:158 msgid "" "A variant of :class:`Queue`; retrieves entries in priority order (lowest " "first)." @@ -269,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:160 +#: 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:165 +#: library/asyncio-queue.rst:166 msgid "LIFO Queue" msgstr "Pile (LIFO)" -#: library/asyncio-queue.rst:169 +#: library/asyncio-queue.rst:170 msgid "" "A variant of :class:`Queue` that retrieves most recently added entries first " "(last in, first out)." @@ -287,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:174 +#: library/asyncio-queue.rst:175 msgid "Exceptions" msgstr "Exceptions" -#: library/asyncio-queue.rst:178 +#: library/asyncio-queue.rst:179 msgid "" "This exception is raised when the :meth:`~Queue.get_nowait` method is called " "on an empty queue." @@ -299,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:184 +#: 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*." @@ -307,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:190 +#: library/asyncio-queue.rst:191 #, fuzzy msgid "" "Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on " @@ -316,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:197 +#: library/asyncio-queue.rst:198 msgid "Examples" msgstr "Exemples" -#: library/asyncio-queue.rst:201 +#: library/asyncio-queue.rst:202 msgid "" "Queues can be used to distribute workload between several concurrent tasks::" msgstr "" diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index 086a1b6caf..8e3ede0631 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: 2025-10-17 09:58+0200\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" @@ -72,7 +72,7 @@ msgstr "Créer des sous-processus" msgid "Create a subprocess." msgstr "Crée un sous-processus." -#: library/asyncio-subprocess.rst:70 library/asyncio-subprocess.rst:89 +#: library/asyncio-subprocess.rst:70 library/asyncio-subprocess.rst:92 #, fuzzy msgid "" "The *limit* argument sets the buffer limit for :class:`StreamReader` " @@ -85,7 +85,7 @@ msgstr "" "et :attr:`Process.stderr` (Si :attr:`subprocess.PIPE` est passé aux " "paramètres *stdout* et *stderr*)." -#: library/asyncio-subprocess.rst:74 library/asyncio-subprocess.rst:93 +#: 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`." @@ -96,23 +96,29 @@ 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:79 library/asyncio-subprocess.rst:107 +#: 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:87 +#: library/asyncio-subprocess.rst:90 msgid "Run the *cmd* shell command." msgstr "Exécute la commande *cmd* dans un *shell*." -#: library/asyncio-subprocess.rst:95 +#: 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:100 +#: 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 " @@ -130,7 +136,7 @@ msgstr "" "des commandes shell." # suit un : -#: library/asyncio-subprocess.rst:112 +#: library/asyncio-subprocess.rst:118 msgid "" "Subprocesses are available for Windows if a :class:`ProactorEventLoop` is " "used. See :ref:`Subprocess Support on Windows ` " @@ -140,7 +146,7 @@ msgstr "" "un :class:`ProactorEventLoop` est utilisé. Voir :ref:`Support des sous-" "processus sous Windows ` pour plus de précisions." -#: library/asyncio-subprocess.rst:118 +#: 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`, " @@ -153,15 +159,15 @@ msgstr "" "ainsi que les :ref:`asyncio-subprocess-transports` et :ref:`asyncio-" "subprocess-protocols`." -#: library/asyncio-subprocess.rst:126 +#: library/asyncio-subprocess.rst:132 msgid "Constants" msgstr "Constantes" -#: library/asyncio-subprocess.rst:131 +#: 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:133 +#: library/asyncio-subprocess.rst:139 #, fuzzy msgid "" "If *PIPE* is passed to *stdin* argument, the :attr:`Process.stdin " @@ -172,7 +178,7 @@ msgstr "" "` ne pointera pas vers une instance " "de :class:`StreamWriter`." -#: library/asyncio-subprocess.rst:137 +#: library/asyncio-subprocess.rst:143 #, fuzzy msgid "" "If *PIPE* is passed to *stdout* or *stderr* arguments, " @@ -185,7 +191,7 @@ msgstr "" "et :attr:`Process.stderr ` pointeront " "vers des instances de :class:`StreamReader`." -#: library/asyncio-subprocess.rst:145 +#: 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." @@ -193,7 +199,7 @@ 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:151 +#: 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 " @@ -203,11 +209,11 @@ msgstr "" "*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:157 +#: library/asyncio-subprocess.rst:163 msgid "Interacting with Subprocesses" msgstr "Interagir avec les sous-processus" -#: library/asyncio-subprocess.rst:159 +#: 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-" @@ -219,7 +225,7 @@ msgstr "" "*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:167 +#: library/asyncio-subprocess.rst:173 #, fuzzy msgid "" "An object that wraps OS processes created by " @@ -229,7 +235,7 @@ 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:171 +#: 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:" @@ -238,7 +244,7 @@ msgstr "" "classe :class:`subprocess.Popen`, mais il existe quelques différences " "notables :" -#: library/asyncio-subprocess.rst:175 +#: library/asyncio-subprocess.rst:181 msgid "" "unlike Popen, Process instances do not have an equivalent to " "the :meth:`~subprocess.Popen.poll` method;" @@ -246,7 +252,7 @@ msgstr "" "contrairement à *Popen*, les instances Process n'ont pas d'équivalent à la " "méthode :meth:`~subprocess.Popen.poll` ;" -#: library/asyncio-subprocess.rst:178 +#: library/asyncio-subprocess.rst:184 msgid "" "the :meth:`~asyncio.subprocess.Process.communicate` " "and :meth:`~asyncio.subprocess.Process.wait` methods don't have a *timeout* " @@ -256,7 +262,7 @@ msgstr "" "et :meth:`~asyncio.subprocess.Process.wait` n'ont pas de paramètre " "*timeout* : utilisez la fonction :func:`~asyncio.wait_for` ;" -#: library/asyncio-subprocess.rst:182 +#: library/asyncio-subprocess.rst:188 msgid "" "the :meth:`Process.wait() ` method is " "asynchronous, whereas :meth:`subprocess.Popen.wait` method is implemented as " @@ -266,17 +272,17 @@ msgstr "" "méthode :meth:`subprocess.Popen.wait` est implémentée comme une boucle " "bloquante ;" -#: library/asyncio-subprocess.rst:186 +#: 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:188 +#: 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:190 +#: library/asyncio-subprocess.rst:196 msgid "" "See also the :ref:`Subprocess and Threads ` " "section." @@ -284,16 +290,16 @@ msgstr "" "Voir aussi la section :ref:`sous-processus et fils d'exécution `." -#: library/asyncio-subprocess.rst:196 +#: 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:198 +#: 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:202 +#: 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 " @@ -306,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:211 +#: library/asyncio-subprocess.rst:217 msgid "Interact with process:" msgstr "Interagit avec le processus :" -#: library/asyncio-subprocess.rst:213 +#: 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:214 +#: library/asyncio-subprocess.rst:220 msgid "closes *stdin*;" msgstr "" -#: library/asyncio-subprocess.rst:215 +#: 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:216 +#: library/asyncio-subprocess.rst:222 msgid "wait for process to terminate." msgstr "attend que le processus s'arrête." -#: library/asyncio-subprocess.rst:218 +#: library/asyncio-subprocess.rst:224 msgid "" "The optional *input* argument is the data (:class:`bytes` object) that will " "be sent to the child process." @@ -336,11 +342,11 @@ msgstr "" "Le paramètre optionnel *input* (objet de type :class:`bytes`) représente les " "données transmises au sous-processus." -#: library/asyncio-subprocess.rst:221 +#: 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:223 +#: 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 " @@ -353,7 +359,7 @@ msgstr "" "processus se termine avant que toutes les données ne soient écrites dans " "*stdin*." -#: library/asyncio-subprocess.rst:228 +#: 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 " @@ -365,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:234 +#: 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." @@ -373,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:239 +#: library/asyncio-subprocess.rst:245 msgid "*stdin* gets closed when ``input=None`` too." msgstr "" -#: library/asyncio-subprocess.rst:243 +#: 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:247 +#: library/asyncio-subprocess.rst:253 #, fuzzy msgid "" "On Windows, :py:const:`~signal.SIGTERM` is an alias for :meth:`terminate`. " @@ -394,11 +400,11 @@ msgstr "" "démarrés avec un paramètre *creationflags* incluant " "``CREATE_NEW_PROCESS_GROUP``." -#: library/asyncio-subprocess.rst:254 +#: library/asyncio-subprocess.rst:260 msgid "Stop the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:256 +#: library/asyncio-subprocess.rst:262 #, fuzzy msgid "" "On POSIX systems this method sends :py:const:`~signal.SIGTERM` to the child " @@ -407,7 +413,7 @@ msgstr "" "Sur les systèmes POSIX, cette méthode envoie :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:259 +#: library/asyncio-subprocess.rst:265 #, fuzzy msgid "" "On Windows the Win32 API function :c:func:`!TerminateProcess` is called to " @@ -416,11 +422,11 @@ msgstr "" "Sous Windows, la fonction API Win32 :c:func:`TerminateProcess` est appelée " "pour arrêter le processus enfant." -#: library/asyncio-subprocess.rst:264 +#: library/asyncio-subprocess.rst:270 msgid "Kill the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:266 +#: library/asyncio-subprocess.rst:272 #, fuzzy msgid "" "On POSIX systems this method sends :py:data:`~signal.SIGKILL` to the child " @@ -429,11 +435,11 @@ msgstr "" "Sur les systèmes POSIX, cette méthode envoie :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:269 +#: 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:273 +#: library/asyncio-subprocess.rst:279 #, fuzzy msgid "" "Standard input stream (:class:`~asyncio.StreamWriter`) or ``None`` if the " @@ -442,7 +448,7 @@ msgstr "" "Flux d'entrée standard (:class:`StreamWriter`) ou ``None`` si le processus a " "été créé avec ``stdin=None``." -#: library/asyncio-subprocess.rst:278 +#: library/asyncio-subprocess.rst:284 #, fuzzy msgid "" "Standard output stream (:class:`~asyncio.StreamReader`) or ``None`` if the " @@ -451,7 +457,7 @@ msgstr "" "Flux de sortie standard (:class:`StreamReader`) ou ``None`` si le processus " "a été créé avec ``stdout=None``." -#: library/asyncio-subprocess.rst:283 +#: library/asyncio-subprocess.rst:289 #, fuzzy msgid "" "Standard error stream (:class:`~asyncio.StreamReader`) or ``None`` if the " @@ -461,7 +467,7 @@ msgstr "" "été créé avec ``stderr=None``." # suit un : -#: library/asyncio-subprocess.rst:288 +#: 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 " @@ -474,13 +480,13 @@ msgstr "" "interblocages dus aux flux qui interrompent la lecture ou l'écriture et " "bloquent le processus enfant." -#: library/asyncio-subprocess.rst:297 +#: 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:299 +#: library/asyncio-subprocess.rst:305 #, fuzzy msgid "" "Note that for processes created by " @@ -491,27 +497,37 @@ msgstr "" "fonction :func:`create_subprocess_shell`, cet attribut est le PID du shell " "généré." -#: library/asyncio-subprocess.rst:304 +#: 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:306 +#: 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:308 +#: 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:315 +#: 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:317 +#: library/asyncio-subprocess.rst:331 msgid "" "Standard asyncio event loop supports running subprocesses from different " "threads by default." @@ -519,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:320 +#: library/asyncio-subprocess.rst:334 msgid "" "On Windows subprocesses are provided by :class:`ProactorEventLoop` only " "(default), :class:`SelectorEventLoop` has no subprocess support." @@ -528,7 +544,7 @@ msgstr "" "uniquement (par défaut), :class:`SelectorEventLoop` ne prend pas en charge " "les sous-processus." -#: library/asyncio-subprocess.rst:323 +#: library/asyncio-subprocess.rst:337 msgid "" "Note that alternative event loop implementations might have own limitations; " "please refer to their documentation." @@ -538,7 +554,7 @@ msgstr "" "documentation." # suit un : -#: library/asyncio-subprocess.rst:328 +#: library/asyncio-subprocess.rst:342 msgid "" "The :ref:`Concurrency and multithreading in asyncio ` section." @@ -546,11 +562,11 @@ msgstr "" "la section :ref:`Exécution concurrente et multi-fils d'exécution `." -#: library/asyncio-subprocess.rst:333 +#: library/asyncio-subprocess.rst:347 msgid "Examples" msgstr "Exemples" -#: library/asyncio-subprocess.rst:335 +#: 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 " @@ -560,13 +576,13 @@ msgstr "" "contrôler un sous-processus et la classe :class:`StreamReader` pour lire sa " "sortie standard." -#: library/asyncio-subprocess.rst:341 +#: 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:368 +#: library/asyncio-subprocess.rst:382 msgid "" "See also the :ref:`same example ` written " "using low-level APIs." diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 79a7aa067e..0a3592f2f7 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: 2025-10-17 09:58+0200\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 @@ -244,7 +245,8 @@ msgstr "" "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 @@ -321,12 +323,12 @@ msgstr "" "de type « lance et oublie », rassemblez-les dans une collection ::" # suit un : -#: library/asyncio-task.rst:1251 +#: library/asyncio-task.rst:1239 msgid "Added the *name* parameter." msgstr "ajout du paramètre *name*." # suit un : -#: library/asyncio-task.rst:1258 +#: library/asyncio-task.rst:1246 msgid "Added the *context* parameter." msgstr "ajout du paramètre *context*." @@ -337,7 +339,8 @@ msgid "Added the *eager_start* parameter by passing on all *kwargs*." msgstr "ajout du paramètre *name*." #: library/asyncio-task.rst:304 -msgid "Task Cancellation" +#, fuzzy +msgid "Task cancellation" msgstr "Annulation de tâche" #: library/asyncio-task.rst:306 @@ -388,7 +391,8 @@ msgstr "" "complètement l'état d'annulation." #: library/asyncio-task.rst:328 -msgid "Task Groups" +#, fuzzy +msgid "Task groups" msgstr "Groupes de tâches" #: library/asyncio-task.rst:330 @@ -426,18 +430,70 @@ msgstr "" msgid "Passes on all *kwargs* to :meth:`loop.create_task`" msgstr "" -#: library/asyncio-task.rst:564 library/asyncio-task.rst:795 -#: library/asyncio-task.rst:862 +#: 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:366 +#: 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 " @@ -446,7 +502,7 @@ 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:373 +#: 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 " @@ -466,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:383 +#: 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 " @@ -478,7 +534,7 @@ msgstr "" "combinées dans un :exc:`ExceptionGroup` ou :exc:`BaseExceptionGroup` (selon " "le cas ; voir leur documentation) qui est ensuite levé." -#: library/asyncio-task.rst:390 +#: 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 " @@ -492,7 +548,7 @@ msgstr "" "la :exc:`KeyboardInterrupt` ou la :exc:`SystemExit` initiale est levée à " "nouveau au lieu de :exc:`ExceptionGroup` ou :exc:`BaseExceptionGroup`." -#: library/asyncio-task.rst:396 +#: 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 " @@ -514,7 +570,7 @@ msgstr "" "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:408 +#: 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 " @@ -525,7 +581,7 @@ msgid "" "receive another cancellation and process its own exceptions." msgstr "" -#: library/asyncio-task.rst:416 +#: 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 " @@ -534,43 +590,27 @@ msgid "" "so the cancellation is not lost." msgstr "" -#: library/asyncio-task.rst:422 +#: library/asyncio-task.rst:451 msgid "" "Task groups preserve the cancellation count reported " "by :meth:`asyncio.Task.cancelling`." msgstr "" -#: library/asyncio-task.rst:427 +#: 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:431 -msgid "Terminating a Task Group" -msgstr "" - -#: library/asyncio-task.rst:433 -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:469 -#, fuzzy -msgid "Expected output:" -msgstr "Sortie attendue ::" - -#: library/asyncio-task.rst:478 +#: library/asyncio-task.rst:460 msgid "Sleeping" msgstr "Attente" -#: library/asyncio-task.rst:483 +#: library/asyncio-task.rst:465 msgid "Block for *delay* seconds." msgstr "Attend pendant *delay* secondes." -#: library/asyncio-task.rst:485 +#: library/asyncio-task.rst:467 msgid "" "If *result* is provided, it is returned to the caller when the coroutine " "completes." @@ -578,14 +618,14 @@ msgstr "" "Si *result* est spécifié, il est renvoyé à l'appelant quand la coroutine se " "termine." -#: library/asyncio-task.rst:488 +#: 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:491 +#: 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 " @@ -596,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:497 +#: library/asyncio-task.rst:479 msgid "" "Example of coroutine displaying the current date every second for 5 seconds::" msgstr "" @@ -604,20 +644,21 @@ msgstr "" "secondes ::" # suit un : -#: library/asyncio-task.rst:613 library/asyncio-task.rst:887 -#: library/asyncio-task.rst:999 +#: 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:518 +#: library/asyncio-task.rst:500 msgid "Raises :exc:`ValueError` if *delay* is :data:`~math.nan`." msgstr "" -#: library/asyncio-task.rst:523 -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:527 +#: library/asyncio-task.rst:509 msgid "" "Run :ref:`awaitable objects ` in the *aws* sequence " "*concurrently*." @@ -625,7 +666,7 @@ msgstr "" "Exécute les objets :ref:`awaitable ` de la séquence " "*aws*, *de manière concurrente*." -#: library/asyncio-task.rst:530 +#: library/asyncio-task.rst:512 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task." @@ -633,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:533 +#: 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 " @@ -643,7 +684,7 @@ msgstr "" "des valeurs renvoyées. L'ordre de cette liste correspond à l'ordre des " "*awaitables* dans *aws*." -#: library/asyncio-task.rst:537 +#: 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 " @@ -655,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:542 +#: 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." @@ -664,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:545 +#: library/asyncio-task.rst:527 msgid "" "If ``gather()`` is *cancelled*, all submitted awaitables (that have not " "completed yet) are also *cancelled*." @@ -672,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:548 +#: 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** " @@ -685,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:555 +#: 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:602 +#: library/asyncio-task.rst:584 #, fuzzy msgid "" "If *return_exceptions* is false, cancelling gather() after it has been " @@ -711,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:609 +#: library/asyncio-task.rst:591 msgid "" "If the *gather* itself is cancelled, the cancellation is propagated " "regardless of *return_exceptions*." @@ -719,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:616 +#: 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 " @@ -729,15 +770,15 @@ 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:625 -msgid "Eager Task Factory" +#: library/asyncio-task.rst:607 +msgid "Eager task factory" msgstr "" -#: library/asyncio-task.rst:629 +#: library/asyncio-task.rst:611 msgid "A task factory for eager task execution." msgstr "" -#: library/asyncio-task.rst:631 +#: library/asyncio-task.rst:613 msgid "" "When using this factory " "(via :meth:`loop.set_task_factory(asyncio.eager_task_factory) " @@ -747,13 +788,13 @@ msgid "" "loop scheduling is avoided for coroutines that complete synchronously." msgstr "" -#: library/asyncio-task.rst:637 +#: 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:642 +#: 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 " @@ -762,32 +803,33 @@ msgid "" "the application's task execution order is likely to change." msgstr "" -#: library/asyncio-task.rst:653 +#: 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:657 +#: 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." msgstr "" -#: library/asyncio-task.rst:661 +#: 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) " "`)." msgstr "" -#: library/asyncio-task.rst:668 -msgid "Shielding From Cancellation" +#: library/asyncio-task.rst:650 +#, fuzzy +msgid "Shielding from cancellation" msgstr "Protection contre l'annulation" -#: library/asyncio-task.rst:672 +#: library/asyncio-task.rst:654 msgid "" "Protect an :ref:`awaitable object ` from " "being :meth:`cancelled `." @@ -795,21 +837,21 @@ msgstr "" "Empêche qu'un objet :ref:`awaitable ` puisse " "être :meth:`annulé `." -#: library/asyncio-task.rst:842 +#: library/asyncio-task.rst:827 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." msgstr "" "Si *aw* est une coroutine, elle est planifiée automatiquement comme une " "tâche." -#: library/asyncio-task.rst:677 +#: library/asyncio-task.rst:659 msgid "The statement::" msgstr "L'instruction ::" -#: library/asyncio-task.rst:682 +#: library/asyncio-task.rst:664 msgid "is equivalent to::" msgstr "est équivalente à ::" -#: library/asyncio-task.rst:686 +#: 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 " @@ -822,7 +864,7 @@ msgstr "" "``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:692 +#: library/asyncio-task.rst:674 msgid "" "If ``something()`` is cancelled by other means (i.e. from within itself) " "that would also cancel ``shield()``." @@ -830,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:695 +#: 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 " @@ -841,7 +883,7 @@ msgstr "" "code ci-dessous ::" # suit un : -#: library/asyncio-task.rst:707 +#: 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 " @@ -855,7 +897,7 @@ msgstr "" "miettes à tout moment, même avant qu'elle ne soit terminée." # suit un : -#: library/asyncio-task.rst:715 +#: library/asyncio-task.rst:697 msgid "" "Deprecation warning is emitted if *aw* is not Future-like object and there " "is no running event loop." @@ -863,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:721 +#: library/asyncio-task.rst:703 msgid "Timeouts" msgstr "Délais d'attente" -#: library/asyncio-task.rst:725 +#: library/asyncio-task.rst:707 #, fuzzy msgid "" "Return an :ref:`asynchronous context manager ` that " @@ -876,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:729 +#: 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 " @@ -887,7 +929,7 @@ 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:734 +#: library/asyncio-task.rst:716 msgid "" "In either case, the context manager can be rescheduled after creation " "using :meth:`Timeout.reschedule`." @@ -895,7 +937,7 @@ 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:743 +#: library/asyncio-task.rst:725 #, fuzzy msgid "" "If ``long_running_task`` takes more than 10 seconds to complete, the context " @@ -909,7 +951,7 @@ msgstr "" "une :exc:`asyncio.TimeoutError` qui peut être interceptée et gérée." # suit un : -#: library/asyncio-task.rst:750 +#: library/asyncio-task.rst:732 #, fuzzy msgid "" "The :func:`asyncio.timeout` context manager is what transforms " @@ -921,12 +963,12 @@ msgstr "" "signifie que la :exc:`asyncio.TimeoutError` ne peut être interceptée qu' *en " "dehors* du gestionnaire de contexte." -#: library/asyncio-task.rst:755 +#: library/asyncio-task.rst:737 #, fuzzy msgid "Example of catching :exc:`TimeoutError`::" msgstr "Exemple de capture :exc:`asyncio.TimeoutError` ::" -#: library/asyncio-task.rst:766 +#: library/asyncio-task.rst:748 msgid "" "The context manager produced by :func:`asyncio.timeout` can be rescheduled " "to a different deadline and inspected." @@ -934,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:771 +#: library/asyncio-task.rst:753 msgid "" "An :ref:`asynchronous context manager ` for " "cancelling overdue coroutines." @@ -942,7 +984,13 @@ msgstr "" ":ref:`Gestionnaire de contexte asynchrone ` pour " "annuler les coroutines en retard." -#: library/asyncio-task.rst:774 +#: 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:" @@ -950,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:777 +#: 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:778 +#: library/asyncio-task.rst:763 msgid "" "If ``when < loop.time()``, the timeout will trigger on the next iteration of " "the event loop." @@ -962,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:783 +#: 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:788 +#: library/asyncio-task.rst:773 msgid "Reschedule the timeout." msgstr "Reprogramme le délai d'attente." -#: library/asyncio-task.rst:792 +#: 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:812 +#: 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:818 +#: library/asyncio-task.rst:803 msgid "" "Similar to :func:`asyncio.timeout`, except *when* is the absolute time to " "stop waiting, or ``None``." @@ -993,7 +1041,7 @@ msgstr "" "Semblable à :func:`asyncio.timeout`, sauf que *when* est le temps absolu " "pour arrêter d'attendre, ou ``None``." -#: library/asyncio-task.rst:839 +#: library/asyncio-task.rst:824 msgid "" "Wait for the *aw* :ref:`awaitable ` to complete with a " "timeout." @@ -1001,7 +1049,7 @@ msgstr "" "Attend la fin de l':ref:`awaitable ` *aw* avec délai " "d'attente." -#: library/asyncio-task.rst:844 +#: library/asyncio-task.rst:829 msgid "" "*timeout* can either be ``None`` or a float or int number of seconds to wait " "for. If *timeout* is ``None``, block until the future completes." @@ -1010,14 +1058,14 @@ msgstr "" "décimal) d'attente. Si *timeout* vaut ``None``, la fonction s'interrompt " "jusqu'à ce que le futur s'achève." -#: library/asyncio-task.rst:848 +#: library/asyncio-task.rst:833 msgid "" "If a timeout occurs, it cancels the task and raises :exc:`TimeoutError`." msgstr "" "Si le délai d'attente maximal est dépassé, la tâche est annulée et " "l'exception :exc:`TimeoutError` est levée." -#: library/asyncio-task.rst:851 +#: library/asyncio-task.rst:836 msgid "" "To avoid the task :meth:`cancellation `, wrap it " "in :func:`shield`." @@ -1025,7 +1073,7 @@ msgstr "" "Pour empêcher :meth:`l'annulation ` de la tâche, il est " "nécessaire de l'encapsuler dans une fonction :func:`shield`." -#: library/asyncio-task.rst:854 +#: library/asyncio-task.rst:839 msgid "" "The function will wait until the future is actually cancelled, so the total " "wait time may exceed the *timeout*. If an exception happens during " @@ -1035,11 +1083,11 @@ msgstr "" "d'attente total peut être supérieur à *timeout*. Si une exception se produit " "lors de l'annulation, elle est propagée." -#: library/asyncio-task.rst:858 +#: library/asyncio-task.rst:843 msgid "If the wait is cancelled, the future *aw* is also cancelled." msgstr "Si l'attente est annulée, le futur *aw* est également annulé." -#: library/asyncio-task.rst:882 +#: library/asyncio-task.rst:867 msgid "" "When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " "cancelled. Previously, it raised :exc:`TimeoutError` immediately." @@ -1048,18 +1096,19 @@ msgstr "" "``wait_for`` attend que *aw* soit annulée. Auparavant, " "l'exception :exc:`TimeoutError` était immédiatement levée." -#: library/asyncio-task.rst:890 +#: library/asyncio-task.rst:875 #, fuzzy msgid "Raises :exc:`TimeoutError` instead of :exc:`asyncio.TimeoutError`." msgstr "" "Lève une exception :exc:`TimeoutError` si le délai d'attente est dépassé " "avant que tous les futurs ne soient achevés." -#: library/asyncio-task.rst:895 -msgid "Waiting Primitives" +#: library/asyncio-task.rst:880 +#, fuzzy +msgid "Waiting primitives" msgstr "Primitives d'attente" -#: library/asyncio-task.rst:900 +#: 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 " @@ -1069,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:904 +#: 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:906 +#: 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:908 +#: library/asyncio-task.rst:893 msgid "Usage::" msgstr "Utilisation ::" -#: library/asyncio-task.rst:912 +#: 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." @@ -1090,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:915 +#: 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 " @@ -1100,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:919 +#: library/asyncio-task.rst:904 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -1108,20 +1157,20 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/asyncio-task.rst:925 +#: library/asyncio-task.rst:910 msgid "Constant" msgstr "Constante" -#: library/asyncio-task.rst:926 +#: library/asyncio-task.rst:911 msgid "Description" msgstr "Description" -#: library/asyncio-task.rst:929 +#: 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:932 +#: library/asyncio-task.rst:917 #, fuzzy msgid "" "The function will return when any future finishes by raising an exception. " @@ -1132,12 +1181,12 @@ msgstr "" "exception. Si aucun *futur* ne lève d'exception, équivaut " "à :const:`ALL_COMPLETED`." -#: library/asyncio-task.rst:937 +#: 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:939 +#: library/asyncio-task.rst:924 msgid "" "Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " "when a timeout occurs." @@ -1145,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:945 +#: 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:1006 +#: library/asyncio-task.rst:991 msgid "Added support for generators yielding tasks." msgstr "" -#: library/asyncio-task.rst:954 +#: library/asyncio-task.rst:939 #, fuzzy msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " @@ -1165,7 +1214,7 @@ 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:958 +#: 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 " @@ -1174,27 +1223,27 @@ msgid "" "previously-scheduled tasks with their results. Example::" msgstr "" -#: library/asyncio-task.rst:978 +#: 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:981 +#: 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:995 +#: 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:1002 +#: 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." @@ -1203,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:1009 +#: 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:1015 -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:1020 +#: 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:1022 +#: 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, " @@ -1231,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:1027 +#: 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:1029 +#: 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 " @@ -1249,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:1059 +#: 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. " @@ -1263,7 +1313,7 @@ msgstr "" "séparé sans bloquer la boucle d'événements." # suit un : -#: library/asyncio-task.rst:1066 +#: 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 " @@ -1277,18 +1327,19 @@ msgstr "" "``asyncio.to_thread()`` peut également être utilisée pour les fonctions qui " "sollicitent beaucoup le processeur." -#: library/asyncio-task.rst:1075 -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:1079 +#: 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:1081 +#: library/asyncio-task.rst:1066 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." @@ -1296,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:1084 +#: 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::" @@ -1304,11 +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:1107 +#: library/asyncio-task.rst:1092 msgid "It's also possible to run the other way around. Example::" msgstr "" -#: library/asyncio-task.rst:1141 +#: 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::" @@ -1317,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:1155 +#: library/asyncio-task.rst:1140 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." @@ -1325,7 +1376,7 @@ msgstr "" "Voir la section :ref:`exécution concurrente et multi-fils d'exécution " "` de la documentation." -#: library/asyncio-task.rst:1158 +#: library/asyncio-task.rst:1143 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." @@ -1333,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:1165 +#: library/asyncio-task.rst:1150 msgid "Introspection" msgstr "Introspection" -#: library/asyncio-task.rst:1170 +#: library/asyncio-task.rst:1155 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." @@ -1345,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:1173 +#: library/asyncio-task.rst:1158 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." @@ -1353,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:1181 +#: 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:1184 +#: library/asyncio-task.rst:1169 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." @@ -1367,15 +1418,16 @@ 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:1192 +#: 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:1199 -msgid "Task Object" +#: library/asyncio-task.rst:1184 +#, fuzzy +msgid "Task object" msgstr "Objets *Task*" -#: library/asyncio-task.rst:1203 +#: library/asyncio-task.rst:1188 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." @@ -1384,7 +1436,7 @@ msgstr "" "une :ref:`coroutine ` Python. Cet objet n'est pas utilisable dans " "des programmes à fils d'exécution multiples." -#: library/asyncio-task.rst:1206 +#: 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 " @@ -1396,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:1212 +#: 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 " @@ -1407,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:1217 +#: 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. " @@ -1418,12 +1470,13 @@ msgstr "" "créer des tâches. Il est déconseillé d'instancier manuellement des objets " "*Task*." -#: library/asyncio-task.rst:1222 +#: 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 " @@ -1431,7 +1484,7 @@ msgstr "" "coroutine attendait un *futur* au moment de l'annulation, celui-ci est " "annulé." -#: library/asyncio-task.rst:1227 +#: 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 " @@ -1441,7 +1494,7 @@ msgstr "" "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:1232 +#: 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`." @@ -1449,7 +1502,7 @@ 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:1236 +#: library/asyncio-task.rst:1221 #, fuzzy msgid "" "An optional keyword-only *context* argument allows specifying a " @@ -1461,7 +1514,7 @@ msgstr "" "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:1241 +#: 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 " @@ -1471,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:1248 +#: 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:1254 +#: library/asyncio-task.rst:1242 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." @@ -1486,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:1261 +#: library/asyncio-task.rst:1249 #, fuzzy msgid "Added the *eager_start* parameter." msgstr "ajout du paramètre *name*." -#: library/asyncio-task.rst:1266 +#: 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:1268 +#: 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." @@ -1503,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:1273 +#: 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:1275 +#: 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.)" @@ -1516,7 +1575,7 @@ msgstr "" "renvoyé (sinon, dans le cas où la coroutine a levé une exception, cette " "exception est de nouveau levée)." -#: library/asyncio-task.rst:1293 +#: library/asyncio-task.rst:1281 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." @@ -1524,7 +1583,7 @@ msgstr "" "Si la tâche a été *annulée*, cette méthode lève une " "exception :exc:`CancelledError`." -#: library/asyncio-task.rst:1282 +#: library/asyncio-task.rst:1270 #, fuzzy msgid "" "If the Task's result isn't yet available, this method raises " @@ -1533,11 +1592,11 @@ 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:1287 +#: library/asyncio-task.rst:1275 msgid "Return the exception of the Task." msgstr "Renvoie l'exception de la tâche." -#: library/asyncio-task.rst:1289 +#: 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``." @@ -1545,7 +1604,7 @@ 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:1296 +#: library/asyncio-task.rst:1284 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." @@ -1553,30 +1612,30 @@ msgstr "" "Si la tâche n'est pas encore *achevée*, cette méthode lève une " "exception :exc:`InvalidStateError`." -#: library/asyncio-task.rst:1301 +#: 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:1312 +#: 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:1305 +#: 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:1310 +#: 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:1314 +#: library/asyncio-task.rst:1302 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." @@ -1584,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:1319 +#: 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:1321 +#: 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, " @@ -1601,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:1327 +#: 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:1329 +#: 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:1331 +#: 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 " @@ -1623,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:1340 +#: 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:1342 +#: library/asyncio-task.rst:1330 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." @@ -1635,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:1345 +#: 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:1347 +#: 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`." @@ -1647,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:1352 +#: 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:1356 +#: 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:1363 +#: library/asyncio-task.rst:1351 msgid "Newly added eager task execution means result may be ``None``." msgstr "" -#: library/asyncio-task.rst:1367 +#: library/asyncio-task.rst:1355 msgid "" "Return the :class:`contextvars.Context` object associated with the task." msgstr "" -#: library/asyncio-task.rst:1374 +#: library/asyncio-task.rst:1362 msgid "Return the name of the Task." msgstr "Renvoie le nom de la tâche." -#: library/asyncio-task.rst:1376 +#: 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." @@ -1679,18 +1738,18 @@ msgstr "" "défaut d’une *Task* *asyncio* génère un nom par défaut durant " "l’instanciation." -#: library/asyncio-task.rst:1384 +#: 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:1386 +#: 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:1389 +#: 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." @@ -1698,17 +1757,17 @@ 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:1396 +#: library/asyncio-task.rst:1384 msgid "Request the Task to be cancelled." msgstr "Demande l'annulation d'une tâche." -#: library/asyncio-task.rst:1398 +#: library/asyncio-task.rst:1386 msgid "" "If the Task is already *done* or *cancelled*, return ``False``, otherwise, " "return ``True``." msgstr "" -#: library/asyncio-task.rst:1401 +#: library/asyncio-task.rst:1389 #, fuzzy msgid "" "The method arranges for a :exc:`CancelledError` exception to be thrown into " @@ -1718,7 +1777,7 @@ msgstr "" "encapsulée. L'exception sera levée au prochain cycle de la boucle " "d'exécution." -#: library/asyncio-task.rst:1404 +#: 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 " @@ -1738,18 +1797,25 @@ msgstr "" "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:1414 +#: library/asyncio-task.rst:1406 msgid "Added the *msg* parameter." msgstr "ajout du paramètre *msg*." # suit un : -#: library/asyncio-task.rst:1417 +#: 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:1422 +#: library/asyncio-task.rst:1414 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" @@ -1757,11 +1823,11 @@ msgstr "" "L'exemple ci-dessous illustre comment une coroutine peut intercepter une " "requête d'annulation ::" -#: library/asyncio-task.rst:1461 +#: 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:1463 +#: library/asyncio-task.rst:1455 msgid "" "The Task is *cancelled* when the cancellation was requested " "with :meth:`cancel` and the wrapped coroutine propagated " @@ -1771,15 +1837,15 @@ msgstr "" "et la coroutine encapsulée a propagé l'exception :exc:`CancelledError` qui a " "été levée en son sein." -#: library/asyncio-task.rst:1469 +#: 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:1471 +#: 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:1473 +#: library/asyncio-task.rst:1465 msgid "" "Note that once execution of a cancelled task completed, further calls " "to :meth:`uncancel` are ineffective." @@ -1787,7 +1853,7 @@ 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:1478 +#: 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 " @@ -1802,7 +1868,7 @@ msgstr "" "et :func:`asyncio.timeout` de continuer à s'exécuter, isolant l'annulation " "au bloc concerné. Par exemple ::" -#: library/asyncio-task.rst:1496 +#: 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 " @@ -1816,7 +1882,7 @@ msgstr "" "implémenté avec :meth:`uncancel`. Les gestionnaires de " "contexte :class:`TaskGroup` utilisent :func:`uncancel` de la même manière." -#: library/asyncio-task.rst:1502 +#: library/asyncio-task.rst:1494 #, fuzzy msgid "" "If end-user code is, for some reason, suppressing cancellation by " @@ -1827,7 +1893,7 @@ msgstr "" "l'annulation en interceptant :exc:`CancelledError`, il doit appeler cette " "méthode pour supprimer l'état d'annulation." -#: library/asyncio-task.rst:1506 +#: 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 " @@ -1836,11 +1902,11 @@ msgid "" "``_must_cancel`` flag)." msgstr "" -#: library/asyncio-task.rst:1512 +#: library/asyncio-task.rst:1504 msgid "Changed to rescind pending cancellation requests upon reaching zero." msgstr "" -#: library/asyncio-task.rst:1517 +#: 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." @@ -1849,7 +1915,7 @@ msgstr "" "dire le nombre d'appels à :meth:`cancel` moins le nombre d'appels " "à :meth:`uncancel`." -#: library/asyncio-task.rst:1521 +#: 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 " @@ -1863,7 +1929,7 @@ 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:1527 +#: 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." @@ -1872,6 +1938,10 @@ msgstr "" "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`." diff --git a/library/asyncio.po b/library/asyncio.po index 88e4112ab4..acab2e6dc2 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: 2025-10-17 09:58+0200\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:96 +#: library/asyncio.rst:100 msgid "High-level APIs" msgstr "Bibliothèques de haut-niveau" -#: library/asyncio.rst:109 +#: library/asyncio.rst:113 msgid "Low-level APIs" msgstr "Bibliothèques de bas-niveau" -#: library/asyncio.rst:120 +#: 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 !" @@ -164,27 +164,34 @@ msgstr "" #: 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." msgstr "" "Lève un :ref:`évènement d'audit ` ``cpython.run_stdin`` sans " "argument." -#: library/asyncio.rst:84 +#: 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:87 +#: library/asyncio.rst:91 msgid "" "Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also " "executed. Emits audit events." msgstr "" -#: library/asyncio.rst:95 +#: library/asyncio.rst:99 msgid "Reference" msgstr "Sommaire" -#: library/asyncio.rst:129 +#: 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 index 25189b51ab..0df6326662 100644 --- a/library/asyncore.po +++ b/library/asyncore.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/atexit.po b/library/atexit.po index 4563e727ff..c9aaba526f 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: 2025-10-17 09:58+0200\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,11 +20,12 @@ 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``." @@ -37,7 +38,7 @@ msgstr "" "``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,7 +63,7 @@ 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 " @@ -74,7 +75,7 @@ msgstr "" "ê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,18 +119,19 @@ 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 " +"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." @@ -142,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 " @@ -171,7 +175,7 @@ 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::" @@ -180,11 +184,11 @@ msgstr "" "à :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 index efc2bb8809..74419821d0 100644 --- a/library/audioop.po +++ b/library/audioop.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/base64.po b/library/base64.po index ac22f97b12..36935e6423 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: 2025-10-17 09:58+0200\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" @@ -30,8 +30,9 @@ msgid "" "This module provides functions for encoding binary data to printable ASCII " "characters and decoding such encodings back to binary data. This includes " "the :ref:`encodings specified in ` :rfc:`4648` (Base64, " -"Base32 and Base16) and the non-standard :ref:`Base85 encodings `." +"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,7 +41,7 @@ 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 "" "There are two interfaces provided by this module. The modern interface " @@ -57,7 +58,7 @@ msgstr "" "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:28 +#: library/base64.rst:30 #, fuzzy msgid "" "The :ref:`legacy interface ` does not support decoding from " @@ -75,7 +76,7 @@ msgstr "" "probablement ce que vous cherchez si vous souhaitez une implémentation de " "la :rfc:`2045`." -#: library/base64.rst:36 +#: library/base64.rst:38 msgid "" "ASCII-only Unicode strings are now accepted by the decoding functions of the " "modern interface." @@ -84,7 +85,7 @@ msgstr "" "sont désormais acceptées par les fonctions de décodage de l'interface " "moderne." -#: library/base64.rst:40 +#: 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 " @@ -94,11 +95,11 @@ 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:48 +#: library/base64.rst:50 msgid "RFC 4648 Encodings" msgstr "" -#: library/base64.rst:50 +#: library/base64.rst:52 #, fuzzy msgid "" "The :rfc:`4648` encodings are suitable for encoding binary data so that it " @@ -110,7 +111,7 @@ msgstr "" "requête HTTP POST. L'algorithme d'encodage ne doit pas être confondu avec le " "programme :program:`uuencode`." -#: library/base64.rst:56 +#: library/base64.rst:58 msgid "" "Encode the :term:`bytes-like object` *s* using Base64 and return the " "encoded :class:`bytes`." @@ -118,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:59 +#: library/base64.rst:61 #, fuzzy msgid "" "Optional *altchars* must be a :term:`bytes-like object` of length 2 which " @@ -134,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:64 +#: library/base64.rst:66 +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/base64.rst:323 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 *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:70 +#: library/base64.rst:81 msgid "" "Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." @@ -150,7 +161,7 @@ msgstr "" "de caractères ASCII *s* encodée en base64 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:73 +#: library/base64.rst:84 #, fuzzy msgid "" "Optional *altchars* must be a :term:`bytes-like object` or ASCII string of " @@ -161,19 +172,41 @@ 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:77 +#: 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:80 +#: library/base64.rst:99 +msgid "" +"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`` (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 *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 " @@ -181,18 +214,35 @@ msgstr "" "les caractères hors de l'alphabet de l'entrée produisent " "une :exc:`binascii.Error`." -#: library/base64.rst:86 +#: 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:117 +msgid "" +"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:88 +#: library/base64.rst:220 library/base64.rst:247 +msgid "Added the *canonical*, *ignorechars*, and *padded* parameters." +msgstr "" + +#: 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:92 +#: library/base64.rst:132 msgid "" "Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and " "return the encoded :class:`bytes`." @@ -200,7 +250,7 @@ msgstr "" "Encode un :term:`objet octet-compatible ` *s* en " "utilisant l'alphabet standard base64 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:98 +#: 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`." @@ -209,19 +259,24 @@ msgstr "" "de caractères ASCII *s* utilisant l'alphabet base64 standard et renvoie " "les :class:`bytes` décodés." -#: library/base64.rst:104 +#: 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." -#: library/base64.rst:113 +#: 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 ``_`` " @@ -233,7 +288,17 @@ msgstr "" "de fichiers qui substitue ``-`` et ``_`` à ``+`` et ``/`` dans l'alphabet " "standard base64 et renvoie les :class:`bytes` décodés." -#: library/base64.rst:122 +#: 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`." @@ -241,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:128 +#: 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`." @@ -250,7 +328,7 @@ msgstr "" "de caractères ASCII *s* encodé en base32 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:179 +#: 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``." @@ -259,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:135 +#: library/base64.rst:196 #, fuzzy msgid "" ":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter " @@ -278,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:183 +#: 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." @@ -286,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:149 +#: library/base64.rst:226 msgid "" "Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: library/base64.rst:157 +#: library/base64.rst:237 msgid "" "Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: library/base64.rst:160 +#: 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 " @@ -306,7 +410,7 @@ msgid "" "interchangeable." msgstr "" -#: library/base64.rst:170 +#: library/base64.rst:253 msgid "" "Encode the :term:`bytes-like object` *s* using Base16 and return the " "encoded :class:`bytes`." @@ -314,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:176 +#: 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`." @@ -323,51 +431,68 @@ msgstr "" "de caractères ASCII *s* encodé en base16 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:190 +#: library/base64.rst:280 +msgid "Added the *ignorechars* parameter." +msgstr "" + +#: library/base64.rst:287 msgid "Base85 Encodings" msgstr "" -#: library/base64.rst:192 +#: library/base64.rst:289 msgid "" -"Base85 encoding is not formally specified but rather a de facto standard, " -"thus different systems perform the encoding differently." +"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:195 +#: library/base64.rst:296 msgid "" -"The :func:`a85encode` and :func:`b85encode` functions in this module are two " -"implementations of the de facto standard. You should call the function with " -"the Base85 implementation used by the software you intend to work with." +"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:199 +#: library/base64.rst:300 msgid "" -"The two functions present in this module differ in how they handle the " -"following:" +"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:201 -msgid "Whether to include enclosing ``<~`` and ``~>`` markers" +#: library/base64.rst:304 +msgid "" +"The functions present in this module differ in how they handle the following:" msgstr "" -#: library/base64.rst:202 -msgid "Whether to include newline characters" +#: library/base64.rst:306 +msgid "Whether to include and expect enclosing ``<~`` and ``~>`` markers." msgstr "" -#: library/base64.rst:203 -msgid "The set of ASCII characters used for encoding" +#: library/base64.rst:307 +msgid "Whether to fold the input into multiple lines." msgstr "" -#: library/base64.rst:204 -msgid "Handling of null bytes" +#: library/base64.rst:308 +msgid "The set of ASCII characters used for encoding." msgstr "" -#: library/base64.rst:206 +#: 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:210 +#: library/base64.rst:316 msgid "" "Encode the :term:`bytes-like object` *b* using Ascii85 and return the " "encoded :class:`bytes`." @@ -375,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:213 +#: 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:217 -#, fuzzy +#: library/base64.rst:327 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." +"*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 "" -"*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:221 -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." - -#: library/base64.rst:224 +#: 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:232 +#: library/base64.rst:343 msgid "" "Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." @@ -423,38 +537,50 @@ msgstr "" "de caractères ASCII *s* encodé en Ascii85 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:235 +#: 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:239 +#: 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:242 +#: 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:252 +#: 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`." @@ -463,55 +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:255 +#: 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:263 +#: 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:272 +#: 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: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 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." +"Encode un :term:`objet octet-compatible ` *s* en " +"utilisant l'algorithme base64 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:281 +#: 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 "" + +#: 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:291 +#: library/base64.rst:456 #, fuzzy msgid "Legacy Interface" msgstr "L'interface historique :" -#: library/base64.rst:295 +#: 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 " @@ -523,7 +667,7 @@ msgstr "" "des :term:`objets fichiers `. *input* est lu jusqu'à ce que " "``input.readline()`` renvoie un objet *bytes* vide." -#: library/base64.rst:303 +#: 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`." @@ -532,7 +676,7 @@ msgstr "" "contenir une ou plusieurs lignes de données encodées en base64 et renvoie " "les :class:`bytes` décodés." -#: library/base64.rst:311 +#: 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 " @@ -550,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:321 +#: 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 " @@ -563,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:329 +#: library/base64.rst:494 msgid "An example usage of the module:" msgstr "Un exemple d'utilisation du module :" -#: library/base64.rst:342 +#: library/base64.rst:507 msgid "Security Considerations" msgstr "Considérations de sécurité" -#: library/base64.rst:344 +#: 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:349 +#: library/base64.rst:514 msgid "Module :mod:`binascii`" msgstr "Module :mod:`binascii`" -#: library/base64.rst:350 +#: 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:352 +#: library/base64.rst:517 msgid "" ":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " "Mechanisms for Specifying and Describing the Format of Internet Message " @@ -599,7 +743,7 @@ msgstr "" "Mechanisms for Specifying and Describing the Format of Internet Message " "Bodies*" -#: library/base64.rst:353 +#: library/base64.rst:518 msgid "" "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "of the base64 encoding." @@ -607,6 +751,102 @@ 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 :" diff --git a/library/bdb.po b/library/bdb.po index b43ccdd28b..f6e3cf58d5 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: 2025-10-17 09:58+0200\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 @@ -279,36 +280,22 @@ msgstr "" msgid "``\"exception\"``: An exception has occurred." msgstr "``\"exception\"`` : Une exception est survenue." -#: library/bdb.rst:195 -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:196 -msgid "``\"c_return\"``: A C function has returned." -msgstr "``\"c_return\"`` : Une fonction C s'est terminée." - -#: library/bdb.rst:197 -msgid "``\"c_exception\"``: A C function has raised an exception." +msgid "For all the events, specialized functions (see below) are called." msgstr "" -#: library/bdb.rst:199 -msgid "" -"For the Python events, specialized functions (see below) are called. For " -"the C events, no action is taken." -msgstr "" - -#: library/bdb.rst:202 +#: 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:204 +#: 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`." msgstr "" -#: library/bdb.rst:210 +#: 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). " @@ -317,7 +304,7 @@ msgid "" "to the :meth:`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:218 +#: 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). " @@ -326,7 +313,7 @@ msgid "" "to the :meth:`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:226 +#: 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). " @@ -335,7 +322,7 @@ msgid "" "to the :meth:`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:234 +#: library/bdb.rst:230 msgid "" "If the debugger should stop at this exception, invokes " "the :meth:`user_exception` method (which should be overridden in " @@ -345,164 +332,164 @@ msgid "" "in that scope." msgstr "" -#: library/bdb.rst:240 +#: 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:245 +#: library/bdb.rst:241 msgid "Return ``True`` if *module_name* matches any skip pattern." msgstr "" -#: library/bdb.rst:249 +#: library/bdb.rst:245 msgid "Return ``True`` if *frame* is below the starting frame in the stack." msgstr "" -#: library/bdb.rst:253 +#: library/bdb.rst:249 msgid "Return ``True`` if there is an effective breakpoint for this line." msgstr "" -#: library/bdb.rst:255 +#: 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:260 +#: library/bdb.rst:256 msgid "Return ``True`` if any breakpoint exists for *frame*'s filename." msgstr "" -#: library/bdb.rst:262 +#: library/bdb.rst:258 msgid "" "Derived classes should override these methods to gain control over debugger " "operation." msgstr "" -#: library/bdb.rst:267 +#: library/bdb.rst:263 msgid "" "Called from :meth:`dispatch_call` if a break might stop inside the called " "function." msgstr "" -#: library/bdb.rst:270 +#: 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:275 +#: library/bdb.rst:271 msgid "" "Called from :meth:`dispatch_line` when either :meth:`stop_here` " "or :meth:`break_here` returns ``True``." msgstr "" -#: library/bdb.rst:280 +#: library/bdb.rst:276 msgid "" "Called from :meth:`dispatch_return` when :meth:`stop_here` returns ``True``." msgstr "" -#: library/bdb.rst:284 +#: library/bdb.rst:280 msgid "" "Called from :meth:`dispatch_exception` when :meth:`stop_here` returns " "``True``." msgstr "" -#: library/bdb.rst:289 +#: library/bdb.rst:285 msgid "Handle how a breakpoint must be removed when it is a temporary one." msgstr "" -#: library/bdb.rst:291 +#: library/bdb.rst:287 msgid "This method must be implemented by derived classes." msgstr "" -#: library/bdb.rst:294 +#: library/bdb.rst:290 msgid "" "Derived classes and clients can call the following methods to affect the " "stepping state." msgstr "" -#: library/bdb.rst:299 +#: library/bdb.rst:295 msgid "Stop after one line of code." msgstr "Arrête après une ligne de code." -#: library/bdb.rst:303 +#: library/bdb.rst:299 msgid "Stop on the next line in or below the given frame." msgstr "" -#: library/bdb.rst:307 +#: library/bdb.rst:303 msgid "Stop when returning from the given frame." msgstr "" -#: library/bdb.rst:311 +#: 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:316 +#: library/bdb.rst:312 msgid "" "Start debugging from *frame*. If *frame* is not specified, debugging starts " "from caller's frame." msgstr "" -#: library/bdb.rst:319 +#: 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:325 +#: 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:332 +#: 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:336 +#: 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:342 +#: 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:348 +#: library/bdb.rst:344 msgid "" "Delete the breakpoints in *filename* and *lineno*. If none were set, return " "an error message." msgstr "" -#: library/bdb.rst:353 +#: 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." msgstr "" -#: library/bdb.rst:359 +#: library/bdb.rst:355 msgid "" "Delete all breakpoints in *filename*. If none were set, return an error " "message." msgstr "" -#: library/bdb.rst:364 +#: library/bdb.rst:360 msgid "" "Delete all existing breakpoints. If none were set, return an error message." msgstr "" -#: library/bdb.rst:369 +#: 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 " @@ -510,39 +497,39 @@ msgid "" "raised." msgstr "" -#: library/bdb.rst:378 +#: library/bdb.rst:374 msgid "Return ``True`` if there is a breakpoint for *lineno* in *filename*." msgstr "" -#: library/bdb.rst:382 +#: library/bdb.rst:378 msgid "" "Return all breakpoints for *lineno* in *filename*, or an empty list if none " "are set." msgstr "" -#: library/bdb.rst:387 +#: library/bdb.rst:383 msgid "Return all breakpoints in *filename*, or an empty list if none are set." msgstr "" -#: library/bdb.rst:391 +#: library/bdb.rst:387 msgid "Return all breakpoints that are set." msgstr "Donne tous les points d'arrêt définis." -#: library/bdb.rst:394 +#: 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:400 +#: 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:408 +#: 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 " @@ -550,86 +537,86 @@ msgid "" "restarted after each user interaction." msgstr "" -#: library/bdb.rst:416 +#: 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:421 +#: library/bdb.rst:417 msgid "Return a list of (frame, lineno) tuples in a stack trace, and a size." msgstr "" -#: library/bdb.rst:423 +#: 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:428 +#: 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:431 +#: library/bdb.rst:427 msgid "The canonical filename which contains the frame." msgstr "" -#: library/bdb.rst:432 +#: library/bdb.rst:428 #, fuzzy msgid "The function name or ``\"\"``." msgstr "Le nom de la fonction, ou ``\"\"``." -#: library/bdb.rst:433 +#: library/bdb.rst:429 msgid "The input arguments." msgstr "Les arguments donnés." -#: library/bdb.rst:434 +#: library/bdb.rst:430 msgid "The return value." msgstr "Le résultat." -#: library/bdb.rst:435 +#: library/bdb.rst:431 msgid "The line of code (if it exists)." msgstr "La ligne de code (si elle existe)." -#: library/bdb.rst:438 +#: 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:443 +#: 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:448 +#: 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:453 +#: library/bdb.rst:449 msgid "For backwards compatibility. Calls the :meth:`run` method." msgstr "" -#: library/bdb.rst:457 +#: library/bdb.rst:453 msgid "Debug a single function call, and return its result." msgstr "" -#: library/bdb.rst:460 +#: library/bdb.rst:456 msgid "Finally, the module defines the following functions:" msgstr "" -#: library/bdb.rst:464 +#: library/bdb.rst:460 msgid "" "Return ``True`` if we should break here, depending on the way " "the :class:`Breakpoint` *b* was set." msgstr "" -#: library/bdb.rst:467 +#: 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 " @@ -638,13 +625,13 @@ msgid "" "first executable line." msgstr "" -#: library/bdb.rst:476 +#: library/bdb.rst:472 msgid "" "Return ``(active breakpoint, delete temporary flag)`` or ``(None, None)`` as " "the breakpoint to act upon." msgstr "" -#: library/bdb.rst:479 +#: library/bdb.rst:475 msgid "" "The *active breakpoint* is the first entry in :attr:`bplist " "` for the (:attr:`file " @@ -658,14 +645,20 @@ msgid "" "` count is ignored)." msgstr "" -#: library/bdb.rst:490 +#: library/bdb.rst:486 msgid "If no such entry exists, then ``(None, None)`` is returned." msgstr "" -#: library/bdb.rst:495 +#: 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/binascii.po b/library/binascii.po index 6e38cc562e..b49d8df1bd 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: 2025-10-17 09:58+0200\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" @@ -23,10 +23,10 @@ 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 " @@ -56,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 @@ -86,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." @@ -94,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 " @@ -153,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 " @@ -176,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` " @@ -188,7 +476,7 @@ msgstr "" "*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 " @@ -203,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 " @@ -217,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." @@ -225,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. " @@ -238,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 " @@ -254,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." @@ -279,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 5b7d9979c4..6086e8d018 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: 2025-10-17 09:58+0200\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,9 +40,9 @@ 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 " @@ -51,21 +51,22 @@ msgid "" "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 " +"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." +"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:39 +#: library/bisect.rst:36 msgid "The following functions are provided:" msgstr "Les fonctions suivantes sont fournies :" -#: library/bisect.rst:44 +#: 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 " @@ -81,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:51 +#: library/bisect.rst:48 #, fuzzy msgid "" "The returned insertion point *ip* partitions the array *a* into two slices " @@ -93,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:56 +#: library/bisect.rst:53 #, fuzzy msgid "" "*key* specifies a :term:`key function` of one argument that is used to " @@ -105,17 +106,17 @@ msgstr "" "valeurs renvoyées par la fonction clé. Par défaut, les éléments sont " "comparés directement." -#: library/bisect.rst:60 +#: library/bisect.rst:57 msgid "" "If *key* is ``None``, the elements are compared directly and no key function " "is called." msgstr "" -#: library/bisect.rst:77 library/bisect.rst:115 +#: library/bisect.rst:74 library/bisect.rst:112 msgid "Added the *key* parameter." msgstr "ajout du paramètre *key*." -#: library/bisect.rst:70 +#: library/bisect.rst:67 #, fuzzy msgid "" "Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point " @@ -124,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:73 +#: library/bisect.rst:70 #, fuzzy msgid "" "The returned insertion point *ip* partitions the array *a* into two slices " @@ -136,11 +137,11 @@ 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:83 +#: 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:85 +#: library/bisect.rst:82 #, fuzzy msgid "" "This function first runs :py:func:`~bisect.bisect_left` to locate an " @@ -151,13 +152,13 @@ msgstr "" "position de l'insertion, puis appelle la méthode :meth:`insert` de *a* pour " "ajouter *x* à l'endroit adéquat." -#: library/bisect.rst:109 +#: 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:112 +#: library/bisect.rst:109 #, fuzzy msgid "" "Keep in mind that the *O*\\ (log *n*) search is dominated by the slow *O*\\ " @@ -167,7 +168,7 @@ msgstr "" "recherche est dominée par la lenteur de l'insertion, de complexité " "linéaire :math:`O(n)`." -#: library/bisect.rst:102 +#: library/bisect.rst:99 #, fuzzy msgid "" "Similar to :py:func:`~bisect.insort_left`, but inserting *x* in *a* after " @@ -176,7 +177,7 @@ msgstr "" "Similaire à :func:`insort_left`, mais en insérant *x* dans *a* après une " "potentielle entrée existante égale à *x*." -#: library/bisect.rst:105 +#: library/bisect.rst:102 #, fuzzy msgid "" "This function first runs :py:func:`~bisect.bisect_right` to locate an " @@ -186,11 +187,11 @@ msgstr "" "Le principe est le même que :func:`insort_left`, mais " "avec :func:`bisect_right`." -#: library/bisect.rst:120 +#: library/bisect.rst:117 msgid "Performance Notes" msgstr "Notes sur la performance" -#: library/bisect.rst:122 +#: library/bisect.rst:119 msgid "" "When writing time sensitive code using *bisect()* and *insort()*, keep these " "thoughts in mind:" @@ -198,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:125 +#: library/bisect.rst:122 msgid "" "Bisection is effective for searching ranges of values. For locating specific " "values, dictionaries are more performant." @@ -206,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:128 +#: library/bisect.rst:125 #, fuzzy msgid "" "The *insort()* functions are *O*\\ (*n*) because the logarithmic search step " @@ -215,7 +216,7 @@ 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:131 +#: library/bisect.rst:128 #, fuzzy msgid "" "The search functions are stateless and discard key function results after " @@ -235,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:141 +#: library/bisect.rst:138 #, fuzzy msgid "" "`Sorted Collections `_ is a " @@ -246,7 +247,7 @@ msgstr "" "est un module de haute performance qui fait appel à *bisect* pour maintenir " "des données ordonnées." -#: library/bisect.rst:145 +#: library/bisect.rst:142 msgid "" "The `SortedCollection recipe `_ uses bisect to build a full-featured collection class " @@ -260,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:153 +#: library/bisect.rst:150 msgid "Searching Sorted Lists" msgstr "Chercher dans des listes triées" -#: library/bisect.rst:155 +#: library/bisect.rst:152 #, fuzzy msgid "" "The above `bisect functions`_ are useful for finding insertion points but " @@ -277,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:197 +#: library/bisect.rst:194 msgid "Examples" msgstr "Exemples" -#: library/bisect.rst:201 +#: library/bisect.rst:198 #, fuzzy msgid "" "The :py:func:`~bisect.bisect` function can be useful for numeric table " @@ -295,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:213 +#: 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:247 +#: library/bisect.rst:244 #, fuzzy msgid "" "If the key function is expensive, it is possible to avoid repeated function " diff --git a/library/bz2.po b/library/bz2.po index b0fa0efa6e..da24af0a63 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: 2025-10-17 09:58+0200\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,7 +81,7 @@ 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 " @@ -82,7 +91,7 @@ msgstr "" "*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,7 +101,7 @@ 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." @@ -100,7 +109,7 @@ 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 " @@ -112,7 +121,7 @@ msgstr "" "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 " @@ -122,19 +131,19 @@ msgstr "" "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,7 +192,7 @@ 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 " @@ -196,12 +205,12 @@ msgstr "" "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 " @@ -211,7 +220,7 @@ 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 " @@ -223,56 +232,56 @@ msgstr "" "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." @@ -280,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." @@ -288,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``." @@ -296,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." @@ -305,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` " @@ -320,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 " @@ -334,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``." @@ -342,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." @@ -350,7 +359,7 @@ 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." @@ -358,7 +367,7 @@ 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." @@ -366,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 " @@ -383,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 " @@ -396,7 +405,7 @@ msgstr "" "*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 " @@ -409,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 " @@ -423,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), " @@ -433,7 +442,7 @@ 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 " @@ -444,19 +453,19 @@ msgstr "" "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''``." @@ -464,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." @@ -472,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`." -#: 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." @@ -498,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`." -#: 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:" @@ -526,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 " @@ -544,7 +554,7 @@ 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* :" diff --git a/library/calendar.po b/library/calendar.po index e7b7d94d05..44446c1965 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: 2025-10-17 09:58+0200\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. " @@ -44,7 +44,7 @@ msgstr "" "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. " @@ -63,7 +63,7 @@ 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 " @@ -74,7 +74,7 @@ msgstr "" "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 " @@ -84,50 +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 +#: 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:45 +#: library/calendar.rst:43 msgid "The first weekday as an integer (0--6)." msgstr "" -#: library/calendar.rst:47 +#: library/calendar.rst:45 msgid "" "This property can also be set and read " "using :meth:`~Calendar.setfirstweekday` " "and :meth:`~Calendar.getfirstweekday` respectively." msgstr "" -#: library/calendar.rst:53 +#: library/calendar.rst:51 msgid "Return an :class:`int` for the current first weekday (0--6)." msgstr "" -#: library/calendar.rst:55 +#: library/calendar.rst:53 msgid "Identical to reading the :attr:`~Calendar.firstweekday` property." msgstr "" -#: library/calendar.rst:59 +#: library/calendar.rst:57 msgid "" -"Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)" +"Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)." msgstr "" -#: library/calendar.rst:61 +#: library/calendar.rst:59 msgid "Identical to setting the :attr:`~Calendar.firstweekday` property." msgstr "" -#: library/calendar.rst:65 +#: library/calendar.rst:63 #, fuzzy msgid "" -"Return an iterator for the week day numbers that will be used for one week. " +"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:72 +#: 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 " @@ -139,7 +139,7 @@ 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:80 +#: 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` " @@ -152,19 +152,20 @@ msgstr "" "des jours du mois. Pour les jours en dehors du mois spécifié, le numéro du " "jour est ``0``." -#: library/calendar.rst:88 +#: 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." +"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." -#: library/calendar.rst:96 +#: 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` " @@ -176,7 +177,7 @@ msgstr "" "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:106 +#: 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` " @@ -189,7 +190,7 @@ msgstr "" "contenant le numéro de l'année, du mois, du jour du mois et du jour de la " "semaine." -#: library/calendar.rst:116 +#: 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." @@ -197,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:122 +#: 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." @@ -206,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:129 +#: 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." @@ -214,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:135 +#: 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 " @@ -227,7 +228,7 @@ msgstr "" "de 4 à 6 semaines et chaque semaine 1 à 7 jours. Les jours sont des " "objets :class:`datetime.date`." -#: library/calendar.rst:143 +#: 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 " @@ -238,7 +239,7 @@ msgstr "" "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:150 +#: 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. " @@ -248,23 +249,31 @@ msgstr "" "à :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:157 +#: 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:159 +#: 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:164 +#: 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:171 +#: library/calendar.rst:174 #, fuzzy msgid "" "Return a single week in a string with no newline. If *w* is provided, it " @@ -278,21 +287,21 @@ 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:179 +#: 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:186 +#: 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:193 +#: 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 " @@ -306,7 +315,7 @@ 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:202 +#: 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 " @@ -314,12 +323,12 @@ msgid "" "to be formatted respectively." msgstr "" -#: library/calendar.rst:210 +#: 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:215 +#: 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 " @@ -336,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:225 +#: 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`." -#: library/calendar.rst:230 +#: 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:233 +#: 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:237 +#: 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." @@ -361,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:244 +#: 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." @@ -369,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:250 +#: 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 " @@ -384,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:259 +#: library/calendar.rst:262 #, fuzzy msgid "" "Return a month name as an HTML table row. If *withyear* is true the year " @@ -394,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:264 +#: library/calendar.rst:267 msgid "" ":class:`!HTMLCalendar` has the following attributes you can override to " "customize the CSS classes used by the calendar:" @@ -402,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:269 +#: 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:273 +#: 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:277 +#: 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:282 +#: 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:289 +#: 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`." @@ -431,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:297 +#: library/calendar.rst:300 msgid "" "The month's head CSS class (used by :meth:`formatmonthname`). The default " "value is ``\"month\"``." @@ -439,7 +449,7 @@ msgstr "" "La classe CSS du mois en en-tête (utilisé par :meth:`formatmonthname`). La " "valeur par défaut est ``\"month\"``." -#: library/calendar.rst:305 +#: library/calendar.rst:308 msgid "" "The CSS class for the whole month's table (used by :meth:`formatmonth`). The " "default value is ``\"month\"``." @@ -447,7 +457,7 @@ msgstr "" "La classe CSS pour la table du mois entière (utilisé " "par :meth:`formatmonth`). La valeur par défaut est ``\"month\"``." -#: library/calendar.rst:313 +#: 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\"``." @@ -455,7 +465,7 @@ 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\"``." -#: library/calendar.rst:321 +#: 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\"``." @@ -463,7 +473,7 @@ 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\"``." -#: library/calendar.rst:327 +#: 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 " @@ -474,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:333 +#: 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:345 +#: 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." @@ -488,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:351 +#: 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." @@ -497,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:357 +#: library/calendar.rst:360 #, fuzzy msgid "" "The constructor, :meth:`!formatweekday` and :meth:`!formatmonthname` methods " @@ -511,12 +521,12 @@ msgstr "" "appliqué à l'ensemble du processus, elles ne sont pas verrouillées ni " "isolées par un fil d'exécution." -#: library/calendar.rst:363 +#: 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:367 +#: 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`, " @@ -529,20 +539,20 @@ msgstr "" "et :const:`SUNDAY` sont fournies par commodité. Par exemple, pour fixer le " "premier jour de la semaine à dimanche ::" -#: library/calendar.rst:378 +#: 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:383 +#: 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`." -#: library/calendar.rst:388 +#: 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." @@ -550,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:391 +#: 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:396 +#: library/calendar.rst:399 msgid "" "Returns the day of the week (``0`` is Monday) for *year* (``1970``--...), " "*month* (``1``--``12``), *day* (``1``--``31``)." @@ -563,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:402 +#: library/calendar.rst:405 msgid "" "Return a header containing abbreviated weekday names. *n* specifies the " "width in characters for one weekday." @@ -571,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:408 +#: 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:414 +#: 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 " @@ -591,11 +602,11 @@ msgstr "" "des zéros. Chaque semaine débute avec le lundi à moins de l'avoir modifié " "avec :func:`setfirstweekday`." -#: library/calendar.rst:421 +#: 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:426 +#: library/calendar.rst:429 #, fuzzy msgid "" "Returns a month's calendar in a multi-line string using " @@ -604,14 +615,14 @@ 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:432 +#: 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`." -#: library/calendar.rst:437 +#: library/calendar.rst:440 #, fuzzy msgid "" "Returns a 3-column calendar for an entire year as a multi-line string using " @@ -621,12 +632,13 @@ msgstr "" "multi-lignes en utilisant la méthode :meth:`formatyear` de la " "classe :class:`TextCalendar`." -#: library/calendar.rst:443 +#: 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 " @@ -636,11 +648,12 @@ msgstr "" "POSIX. En fait, :func:`time.gmtime` et :func:`timegm` sont l'inverse l'un de " "l'autre." -#: library/calendar.rst:450 -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:454 +#: library/calendar.rst:457 #, fuzzy msgid "" "A sequence that represents the days of the week in the current locale, where " @@ -649,7 +662,7 @@ msgstr "" "Un tableau qui représente les jours de la semaine pour les paramètres " "régionaux actifs." -#: library/calendar.rst:464 +#: library/calendar.rst:467 #, fuzzy msgid "" "A sequence that represents the abbreviated days of the week in the current " @@ -658,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:479 +#: library/calendar.rst:482 #, fuzzy msgid "" "Aliases for the days of the week, where ``MONDAY`` is ``0`` and ``SUNDAY`` " @@ -667,14 +680,14 @@ msgstr "" "Alias pour les nombres des jours de la semaine. Lundi (``MONDAY``) est ``0`` " "et dimanche (``SUNDAY``) est ``6``." -#: library/calendar.rst:487 +#: 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`." msgstr "" -#: library/calendar.rst:496 +#: library/calendar.rst:499 #, fuzzy msgid "" "A sequence that represents the months of the year in the current locale. " @@ -686,7 +699,16 @@ msgstr "" "numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la chaîne " "vide." -#: library/calendar.rst:507 +#: 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 " @@ -699,6 +721,38 @@ msgstr "" "chaîne vide." #: 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 " @@ -707,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:536 +#: 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:543 +#: 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:547 +#: 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:552 +#: 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:557 +#: 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:562 +#: library/calendar.rst:603 msgid "The invalid weekday number." msgstr "" -#: library/calendar.rst:567 +#: library/calendar.rst:608 msgid "Module :mod:`datetime`" msgstr "Module :mod:`datetime`" -#: library/calendar.rst:568 +#: library/calendar.rst:609 msgid "" "Object-oriented interface to dates and times with similar functionality to " "the :mod:`time` module." @@ -751,105 +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:571 +#: library/calendar.rst:612 msgid "Module :mod:`time`" msgstr "Module :mod:`time`" -#: library/calendar.rst:572 +#: library/calendar.rst:613 msgid "Low-level time related functions." msgstr "Fonctions bas niveau relatives au temps." -#: library/calendar.rst:578 +#: library/calendar.rst:619 #, fuzzy msgid "Command-line usage" msgstr "Utilisation en ligne de commande." -#: library/calendar.rst:582 +#: 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:592 +#: library/calendar.rst:633 msgid "For example, to print a calendar for the year 2000:" msgstr "" -#: library/calendar.rst:635 +#: library/calendar.rst:676 msgid "The following options are accepted:" msgstr "Les options suivantes sont acceptées :" -#: library/calendar.rst:642 +#: library/calendar.rst:683 msgid "Show the help message and exit." msgstr "Affiche un message d'aide et quitte." -#: library/calendar.rst:647 +#: library/calendar.rst:688 msgid "The locale to use for month and weekday names. Defaults to English." msgstr "" -#: library/calendar.rst:653 +#: library/calendar.rst:694 msgid "" "The encoding to use for output. :option:`--encoding` is required " "if :option:`--locale` is set." msgstr "" -#: library/calendar.rst:659 +#: library/calendar.rst:700 msgid "Print the calendar to the terminal as text, or as an HTML document." msgstr "" -#: library/calendar.rst:665 +#: 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:673 +#: library/calendar.rst:714 msgid "The year to print the calendar for. Defaults to the current year." msgstr "" -#: library/calendar.rst:679 +#: 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:685 +#: library/calendar.rst:725 msgid "*Text-mode options:*" msgstr "" -#: library/calendar.rst:689 +#: 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:697 +#: 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:705 +#: 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:712 +#: library/calendar.rst:752 msgid "The number of months printed per row. Defaults to 3." msgstr "" -#: library/calendar.rst:715 +#: 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:719 +#: 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:723 +#: 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 index d1b03216b9..28ffd2b8a2 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/cgitb.po b/library/cgitb.po index f028e378da..ede007ed4c 100644 --- a/library/cgitb.po +++ b/library/cgitb.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/chunk.po b/library/chunk.po index 9d6f206c56..8f4f6d3b7a 100644 --- a/library/chunk.po +++ b/library/chunk.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/cmath.po b/library/cmath.po index 41dd867e7a..a24baa8192 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: 2025-10-17 09:58+0200\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" @@ -418,8 +418,8 @@ msgstr "" #, fuzzy msgid "" "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." +"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 " @@ -723,15 +723,16 @@ msgstr "" "un *NaN*. Équivalent à ``complex(0.0, float('nan'))``." #: 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 as a real number (in which case the complex number has an " -"imaginary part of zero)." +"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 "" "Notez que la sélection de fonctions est similaire, mais pas identique, à " "celles du module :mod:`math`. La raison d'avoir deux modules est que " diff --git a/library/cmd.po b/library/cmd.po index e59c1a35d7..f34a75c36a 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: 2025-10-17 09:58+0200\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; " @@ -50,7 +50,7 @@ msgstr "" "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 " @@ -62,7 +62,7 @@ msgstr "" "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, " @@ -71,7 +71,7 @@ msgid "" "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 " @@ -84,7 +84,7 @@ msgstr "" "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* " @@ -94,19 +94,19 @@ msgstr "" "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,7 +125,7 @@ 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` " @@ -140,13 +140,13 @@ msgstr "" "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 " @@ -162,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 " @@ -173,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, " @@ -195,7 +195,7 @@ msgstr "" "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 " @@ -216,7 +216,7 @@ msgstr "" "commande ayant une *docstring*, elle lisera aussi les commandes non " "documentées." -#: library/cmd.rst:110 +#: library/cmd.rst:108 #, fuzzy msgid "" "Interpret the argument as though it had been typed in response to the " @@ -237,7 +237,7 @@ msgstr "" "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." @@ -246,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." @@ -255,7 +255,7 @@ 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:`!" @@ -265,7 +265,7 @@ msgstr "" "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 " @@ -276,7 +276,7 @@ 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 " @@ -292,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* " @@ -311,7 +311,7 @@ msgstr "" "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." @@ -320,7 +320,7 @@ msgstr "" "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." @@ -329,26 +329,26 @@ msgstr "" "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 " @@ -359,7 +359,7 @@ msgstr "" "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." @@ -367,14 +367,14 @@ 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 " @@ -385,7 +385,7 @@ msgstr "" "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 " @@ -396,7 +396,7 @@ msgstr "" "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 ``'='``." @@ -405,7 +405,7 @@ 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 " @@ -424,20 +424,21 @@ msgstr "" "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." @@ -445,7 +446,7 @@ 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 " @@ -459,7 +460,7 @@ msgstr "" "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 " @@ -474,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 010984bf12..85d22b82a8 100644 --- a/library/cmdline.po +++ b/library/cmdline.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -48,7 +48,7 @@ msgid ":ref:`compileall `" msgstr "" #: library/cmdline.rst:15 -msgid ":mod:`cProfile`: see :ref:`profile `" +msgid "``cProfile``: see :ref:`profiling.tracing `" msgstr "" #: library/cmdline.rst:16 @@ -64,7 +64,7 @@ msgid ":mod:`!encodings.rot_13`" msgstr "" #: library/cmdline.rst:19 -msgid ":mod:`ensurepip`" +msgid ":ref:`ensurepip `" msgstr "" #: library/cmdline.rst:20 @@ -88,7 +88,7 @@ msgid ":ref:`http.server `" msgstr "" #: library/cmdline.rst:25 -msgid ":mod:`!idlelib`" +msgid ":ref:`idlelib `" msgstr "" #: library/cmdline.rst:26 @@ -104,7 +104,7 @@ msgid ":ref:`mimetypes `" msgstr "" #: library/cmdline.rst:29 -msgid ":mod:`pdb`" +msgid ":ref:`pdb `" msgstr "" #: library/cmdline.rst:30 @@ -124,105 +124,109 @@ msgid ":mod:`poplib`" msgstr "" #: library/cmdline.rst:34 -msgid ":ref:`profile `" +msgid ":ref:`profiling.sampling `" msgstr "" #: library/cmdline.rst:35 -msgid ":mod:`pstats`" +msgid ":ref:`profiling.tracing `" msgstr "" #: library/cmdline.rst:36 -msgid ":ref:`py_compile `" +msgid ":ref:`pstats `" msgstr "" #: library/cmdline.rst:37 -msgid ":mod:`pyclbr`" +msgid ":ref:`py_compile `" msgstr "" #: library/cmdline.rst:38 -msgid ":mod:`pydoc`" +msgid ":mod:`pyclbr`" msgstr "" #: library/cmdline.rst:39 -msgid ":mod:`quopri`" +msgid ":mod:`pydoc`" msgstr "" #: library/cmdline.rst:40 -msgid ":ref:`random `" +msgid ":mod:`quopri`" msgstr "" #: library/cmdline.rst:41 -msgid ":mod:`runpy`" +msgid ":ref:`random `" msgstr "" #: library/cmdline.rst:42 -msgid ":ref:`site `" +msgid ":mod:`runpy`" msgstr "" #: library/cmdline.rst:43 -msgid ":ref:`sqlite3 `" +msgid ":ref:`site `" msgstr "" #: library/cmdline.rst:44 -msgid ":ref:`symtable `" +msgid ":ref:`sqlite3 `" msgstr "" #: library/cmdline.rst:45 -msgid ":ref:`sysconfig `" +msgid ":ref:`symtable `" msgstr "" #: library/cmdline.rst:46 -msgid ":mod:`tabnanny`" +msgid ":ref:`sysconfig `" msgstr "" #: library/cmdline.rst:47 -msgid ":ref:`tarfile `" +msgid ":mod:`tabnanny`" msgstr "" #: library/cmdline.rst:48 -msgid ":mod:`!this`" +msgid ":ref:`tarfile `" msgstr "" #: library/cmdline.rst:49 -msgid ":ref:`timeit `" +msgid ":mod:`!this`" msgstr "" #: library/cmdline.rst:50 -msgid ":ref:`tokenize `" +msgid ":ref:`timeit `" msgstr "" #: library/cmdline.rst:51 -msgid ":ref:`trace `" +msgid ":ref:`tokenize `" msgstr "" #: library/cmdline.rst:52 -msgid ":mod:`turtledemo`" +msgid ":ref:`trace `" msgstr "" #: library/cmdline.rst:53 -msgid ":ref:`unittest `" +msgid ":mod:`turtledemo`" msgstr "" #: library/cmdline.rst:54 -msgid ":ref:`uuid `" +msgid ":ref:`unittest `" msgstr "" #: library/cmdline.rst:55 -msgid ":mod:`venv`" +msgid ":ref:`uuid `" msgstr "" #: library/cmdline.rst:56 -msgid ":mod:`webbrowser`" +msgid ":ref:`venv `" msgstr "" #: library/cmdline.rst:57 -msgid ":ref:`zipapp `" +msgid ":ref:`webbrowser `" msgstr "" #: library/cmdline.rst:58 +msgid ":ref:`zipapp `" +msgstr "" + +#: library/cmdline.rst:59 msgid ":ref:`zipfile `" msgstr "" -#: library/cmdline.rst:60 +#: library/cmdline.rst:61 msgid "See also the :ref:`Python command-line interface `." msgstr "" diff --git a/library/cmdlinelibs.po b/library/cmdlinelibs.po index 098f5c573e..2294468914 100644 --- a/library/cmdlinelibs.po +++ b/library/cmdlinelibs.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/codecs.po b/library/codecs.po index e5009364b0..03bec0b624 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: 2025-10-17 09:58+0200\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 " @@ -49,7 +49,7 @@ msgstr "" "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,11 +57,11 @@ 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 " @@ -76,11 +76,11 @@ msgstr "" "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 " @@ -95,7 +95,7 @@ msgstr "" "aux :ref:`classes de base des codecs ` pour plus " "d'informations sur la gestion des erreurs par les codecs." -#: library/codecs.rst:58 +#: 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 " @@ -104,12 +104,12 @@ msgid "" "to byte values. Raises a :exc:`TypeError` on invalid input." msgstr "" -#: library/codecs.rst:64 +#: 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:68 +#: library/codecs.rst:64 msgid "" "Looks up the codec info in the Python codec registry and returns " "a :class:`CodecInfo` object as defined below." @@ -117,13 +117,15 @@ 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:71 +#: 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 " @@ -131,7 +133,19 @@ msgstr "" "une :exc:`LookupError` est levée. Sinon, l'objet :class:`CodecInfo` est mis " "en cache et renvoyé vers l'appelant." -#: library/codecs.rst:78 +#: 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:84 msgid "" "Codec details when looking up the codec registry. The constructor arguments " "are stored in attributes of the same name:" @@ -139,11 +153,11 @@ 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:84 +#: library/codecs.rst:90 msgid "The name of the encoding." msgstr "Le nom de l'encodeur." -#: library/codecs.rst:90 +#: 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` " @@ -157,7 +171,7 @@ msgstr "" "codecs `). Les fonctions et méthodes sont censées fonctionner " "sans état interne." -#: library/codecs.rst:100 +#: library/codecs.rst:106 msgid "" "Incremental encoder and decoder classes or factory functions. These have to " "provide the interface defined by the base " @@ -170,7 +184,7 @@ msgstr "" "et :class:`IncrementalDecoder`. Les codecs incrémentaux peuvent conserver " "des états internes." -#: library/codecs.rst:109 +#: 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` " @@ -181,7 +195,7 @@ msgstr "" "base :class:`StreamWriter` et :class:`StreamReader`, respectivement. Les " "codecs de flux peuvent conserver un état interne." -#: library/codecs.rst:114 +#: 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:" @@ -190,25 +204,25 @@ msgstr "" "fournit les fonctions supplémentaires suivantes qui utilisent :func:`lookup` " "pour la recherche du codec :" -#: library/codecs.rst:119 +#: 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:128 library/codecs.rst:162 +#: 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:126 +#: 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:133 +#: library/codecs.rst:139 msgid "" "Look up the codec for the given encoding and return its incremental encoder " "class or factory function." @@ -216,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:136 +#: 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." @@ -224,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:142 +#: library/codecs.rst:148 msgid "" "Look up the codec for the given encoding and return its incremental decoder " "class or factory function." @@ -232,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:145 +#: 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." @@ -240,7 +254,7 @@ 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:151 +#: library/codecs.rst:157 msgid "" "Look up the codec for the given encoding and return " "its :class:`StreamReader` class or factory function." @@ -248,7 +262,7 @@ msgstr "" "Recherche le codec pour l'encodage *encoding* et renvoie sa " "classe :class:`StreamReader` ou la fonction usine." -#: library/codecs.rst:159 +#: library/codecs.rst:165 msgid "" "Look up the codec for the given encoding and return " "its :class:`StreamWriter` class or factory function." @@ -256,7 +270,7 @@ msgstr "" "Recherche le codec pour l'encodage *encoding* et renvoie sa " "classe :class:`StreamWriter` ou la fonction usine." -#: library/codecs.rst:164 +#: library/codecs.rst:170 msgid "" "Custom codecs are made available by registering a suitable codec search " "function:" @@ -264,14 +278,13 @@ msgstr "" "Les codecs personnalisés sont mis à disposition en enregistrant une fonction " "de recherche de codecs adaptée :" -#: library/codecs.rst:169 +#: 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 " @@ -279,17 +292,13 @@ msgstr "" "recherche ne trouve pas un encodage donné, il convient qu'elle renvoie `` " "None``." -#: library/codecs.rst:175 -msgid "Hyphens and spaces are converted to underscore." -msgstr "" - -#: library/codecs.rst:181 +#: 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:187 +#: 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 " @@ -302,7 +311,7 @@ msgstr "" "qui permettent l'utilisation d'une plus large gamme de codecs si vous " "travaillez avec des fichiers binaires :" -#: library/codecs.rst:194 +#: 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 " @@ -314,7 +323,7 @@ msgstr "" "est ouvert en lecture." # Pas de majuscule en début car suit un deux-points. -#: library/codecs.rst:200 +#: library/codecs.rst:203 #, fuzzy msgid "" "If *encoding* is not ``None``, then the underlying encoded files are always " @@ -328,7 +337,7 @@ msgstr "" "acceptable pour la fonction native :func:`open` ; le ``'b'`` est " "automatiquement ajouté." -#: library/codecs.rst:206 +#: 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 " @@ -339,7 +348,7 @@ msgstr "" "données pris en charge par les méthodes relatives aux fichiers dépendent du " "codec utilisé." -#: library/codecs.rst:210 +#: 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 " @@ -349,7 +358,7 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:213 +#: 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." @@ -358,15 +367,15 @@ msgstr "" "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:216 +#: library/codecs.rst:219 msgid "The ``'U'`` mode has been removed." msgstr "le mode ``'U``` a été enlevé." -#: library/codecs.rst:221 +#: library/codecs.rst:224 msgid ":func:`codecs.open` has been superseded by :func:`open`." msgstr "" -#: library/codecs.rst:226 +#: 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 " @@ -376,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:230 +#: 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 " @@ -389,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:236 +#: 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:238 +#: 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 " @@ -405,7 +414,7 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:245 +#: library/codecs.rst:248 #, fuzzy msgid "" "Uses an incremental encoder to iteratively encode the input provided by " @@ -418,7 +427,7 @@ msgstr "" "`. L'argument *errors* (ainsi que tout autre argument passé par " "son nom) est transmis à l'encodeur incrémental." -#: library/codecs.rst:250 +#: 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 " @@ -428,7 +437,7 @@ msgstr "" "(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:257 +#: library/codecs.rst:260 #, fuzzy msgid "" "Uses an incremental decoder to iteratively decode the input provided by " @@ -441,7 +450,7 @@ msgstr "" "*errors* (ainsi que tout autre argument passé par son nom) est transmis au " "décodeur incrémental." -#: library/codecs.rst:262 +#: 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 " @@ -453,18 +462,18 @@ msgstr "" "vers texte tels que ``rot_13``, bien que ``rot_13`` puisse être utilisé de " "manière équivalente avec :func:`iterencode`." -#: library/codecs.rst:270 +#: 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:274 +#: library/codecs.rst:277 msgid "The *errors* argument is ignored." msgstr "" -#: library/codecs.rst:282 +#: library/codecs.rst:285 msgid "" "The module also provides the following constants which are useful for " "reading and writing to platform dependent files:" @@ -472,7 +481,7 @@ 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:297 +#: 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 " @@ -494,13 +503,14 @@ msgstr "" "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:311 +#: library/codecs.rst:314 msgid "Codec Base Classes" msgstr "Classes de base de codecs" -#: library/codecs.rst:313 +#: 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 "" @@ -509,7 +519,7 @@ msgstr "" "peuvent également être utilisées comme base pour des implémentations de " "codecs personnalisés." -#: library/codecs.rst:317 +#: 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 " @@ -524,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:328 +#: library/codecs.rst:331 msgid "Error Handlers" msgstr "Gestionnaires d'erreurs" -#: library/codecs.rst:330 +#: library/codecs.rst:333 #, fuzzy msgid "" "To simplify and standardize error handling, codecs may implement different " @@ -540,7 +550,7 @@ msgstr "" "les gestionnaires correspondants implémentés par tous les codecs Python " "standards :" -#: library/codecs.rst:350 +#: library/codecs.rst:353 #, fuzzy msgid "" "The following error handlers can be used with all Python :ref:`standard-" @@ -549,19 +559,19 @@ msgstr "" "Les gestionnaires d'erreurs suivants ne s'appliquent que pour " "les :term:`encodeurs de texte ` :" -#: library/codecs.rst:399 library/codecs.rst:419 +#: library/codecs.rst:402 library/codecs.rst:422 msgid "Value" msgstr "Valeur" -#: library/codecs.rst:399 library/codecs.rst:1371 library/codecs.rst:1528 +#: library/codecs.rst:402 library/codecs.rst:1379 library/codecs.rst:1536 msgid "Meaning" msgstr "Signification" -#: library/codecs.rst:358 +#: library/codecs.rst:361 msgid "``'strict'``" msgstr "``'strict'``" -#: library/codecs.rst:358 +#: library/codecs.rst:361 #, fuzzy msgid "" "Raise :exc:`UnicodeError` (or a subclass), this is the default. Implemented " @@ -570,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:362 +#: library/codecs.rst:365 msgid "``'ignore'``" msgstr "``'ignore'``" -#: library/codecs.rst:362 +#: library/codecs.rst:365 msgid "" "Ignore the malformed data and continue without further notice. Implemented " "in :func:`ignore_errors`." @@ -582,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:366 +#: library/codecs.rst:369 msgid "``'replace'``" msgstr "``'replace'``" -#: library/codecs.rst:366 +#: library/codecs.rst:369 #, fuzzy msgid "" "Replace with a replacement marker. On encoding, use ``?`` (ASCII character). " @@ -597,11 +607,11 @@ 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:372 +#: library/codecs.rst:375 msgid "``'backslashreplace'``" msgstr "``'backslashreplace'``" -#: library/codecs.rst:372 +#: 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}" @@ -610,11 +620,11 @@ msgid "" "in :func:`backslashreplace_errors`." msgstr "" -#: library/codecs.rst:381 +#: library/codecs.rst:384 msgid "``'surrogateescape'``" msgstr "``'surrogateescape'``" -#: library/codecs.rst:381 +#: 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 " @@ -626,7 +636,7 @@ 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:395 +#: library/codecs.rst:398 #, fuzzy msgid "" "The following error handlers are only applicable to encoding " @@ -635,11 +645,11 @@ msgstr "" "Les gestionnaires d'erreurs suivants ne s'appliquent que pour " "les :term:`encodeurs de texte ` :" -#: library/codecs.rst:401 +#: library/codecs.rst:404 msgid "``'xmlcharrefreplace'``" msgstr "``'xmlcharrefreplace'``" -#: library/codecs.rst:401 +#: library/codecs.rst:404 #, fuzzy msgid "" "Replace with XML/HTML numeric character reference, which is a decimal form " @@ -649,11 +659,11 @@ 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:407 +#: library/codecs.rst:410 msgid "``'namereplace'``" msgstr "``'namereplace'``" -#: library/codecs.rst:407 +#: library/codecs.rst:410 #, fuzzy msgid "" "Replace with ``\\N{...}`` escape sequences, what appears in the braces is " @@ -663,26 +673,26 @@ msgstr "" "Remplace avec des séquences échappées par ``\\N{...}`` (uniquement pour " "l'encodage). Implémenté dans :func:`namereplace_errors`." -#: library/codecs.rst:416 +#: 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:419 +#: library/codecs.rst:422 msgid "Codecs" msgstr "Codecs" -#: library/codecs.rst:421 +#: library/codecs.rst:424 msgid "``'surrogatepass'``" msgstr "``'surrogatepass'``" -#: library/codecs.rst:421 +#: 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:421 +#: library/codecs.rst:424 #, fuzzy msgid "" "Allow encoding and decoding surrogate code point (``U+D800`` - ``U+DFFF``) " @@ -693,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:428 +#: 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:431 +#: library/codecs.rst:434 #, fuzzy msgid "" "The ``'surrogatepass'`` error handler now works with utf-16\\* and utf-32\\* " @@ -709,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:435 +#: 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:438 +#: library/codecs.rst:441 #, fuzzy msgid "" "The ``'backslashreplace'`` error handler now works with decoding and " @@ -723,7 +733,7 @@ msgstr "" "le gestionnaire d'erreurs ``'backslashreplace'`` fonctionne maintenant pour " "le décodage et la traduction." -#: library/codecs.rst:442 +#: library/codecs.rst:445 msgid "" "The set of allowed values can be extended by registering a new named error " "handler:" @@ -731,14 +741,14 @@ msgstr "" "L'ensemble des valeurs autorisées peut être étendu en enregistrant un " "nouveau gestionnaire d'erreurs nommé :" -#: library/codecs.rst:447 +#: 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:451 +#: library/codecs.rst:454 msgid "" "For encoding, *error_handler* will be called with " "a :exc:`UnicodeEncodeError` instance, which contains information about the " @@ -754,74 +764,74 @@ msgid "" "will be raised." msgstr "" -#: library/codecs.rst:463 +#: 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:468 +#: library/codecs.rst:471 msgid "" "Previously registered error handlers (including the standard error handlers) " "can be looked up by name:" msgstr "" -#: library/codecs.rst:473 +#: library/codecs.rst:476 msgid "Return the error handler previously registered under the name *name*." msgstr "" -#: library/codecs.rst:475 +#: library/codecs.rst:478 msgid "Raises a :exc:`LookupError` in case the handler cannot be found." msgstr "" -#: library/codecs.rst:477 +#: 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:482 +#: library/codecs.rst:485 #, fuzzy msgid "Implements the ``'strict'`` error handling." msgstr "le gestionnaire d'erreurs ``'namereplace'``." -#: library/codecs.rst:484 +#: 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:489 +#: library/codecs.rst:492 #, fuzzy msgid "Implements the ``'ignore'`` error handling." msgstr "le gestionnaire d'erreurs ``'namereplace'``." -#: library/codecs.rst:491 +#: 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:497 +#: library/codecs.rst:500 #, fuzzy msgid "Implements the ``'replace'`` error handling." msgstr "le gestionnaire d'erreurs ``'namereplace'``." -#: library/codecs.rst:499 +#: 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:505 +#: library/codecs.rst:508 #, fuzzy msgid "Implements the ``'backslashreplace'`` error handling." msgstr "le gestionnaire d'erreurs ``'namereplace'``." -#: library/codecs.rst:507 +#: 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}" @@ -829,17 +839,17 @@ msgid "" "hexadecimal form of byte value with format :samp:`\\\\x{hh}`." msgstr "" -#: library/codecs.rst:513 +#: library/codecs.rst:516 msgid "Works with decoding and translating." msgstr "" -#: library/codecs.rst:519 +#: library/codecs.rst:522 msgid "" "Implements the ``'xmlcharrefreplace'`` error handling (for encoding " "within :term:`text encoding` only)." msgstr "" -#: library/codecs.rst:522 +#: library/codecs.rst:525 #, fuzzy msgid "" "The unencodable character is replaced by an appropriate XML/HTML numeric " @@ -849,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:529 +#: library/codecs.rst:532 msgid "" "Implements the ``'namereplace'`` error handling (for encoding " "within :term:`text encoding` only)." msgstr "" -#: library/codecs.rst:532 +#: 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 " @@ -863,17 +873,17 @@ msgid "" "will be converted to byte sequence ``\\N{LATIN SMALL LETTER SHARP S}`` ." msgstr "" -#: library/codecs.rst:543 +#: library/codecs.rst:546 msgid "Stateless Encoding and Decoding" msgstr "" -#: library/codecs.rst:545 +#: 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:553 +#: 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 " @@ -881,26 +891,26 @@ msgid "" "``iso-8859-1``)." msgstr "" -#: library/codecs.rst:580 +#: library/codecs.rst:583 msgid "" "The *errors* argument defines the error handling to apply. It defaults to " "``'strict'`` handling." msgstr "" -#: library/codecs.rst:561 +#: 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." msgstr "" -#: library/codecs.rst:565 +#: 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:571 +#: 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 " @@ -908,31 +918,31 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:576 +#: 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:583 +#: 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." msgstr "" -#: library/codecs.rst:587 +#: 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:592 +#: library/codecs.rst:595 msgid "Incremental Encoding and Decoding" msgstr "" -#: library/codecs.rst:594 +#: library/codecs.rst:597 msgid "" "The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " "provide the basic interface for incremental encoding and decoding. Encoding/" @@ -943,7 +953,7 @@ msgid "" "keeps track of the encoding/decoding process during method calls." msgstr "" -#: library/codecs.rst:602 +#: library/codecs.rst:605 msgid "" "The joined output of calls to " "the :meth:`~IncrementalEncoder.encode`/:meth:`~IncrementalDecoder.decode` " @@ -951,36 +961,36 @@ msgid "" "this input was encoded/decoded with the stateless encoder/decoder." msgstr "" -#: library/codecs.rst:611 +#: library/codecs.rst:614 msgid "IncrementalEncoder Objects" msgstr "" -#: library/codecs.rst:613 +#: 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:620 +#: library/codecs.rst:623 msgid "Constructor for an :class:`IncrementalEncoder` instance." msgstr "" -#: library/codecs.rst:622 +#: 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:626 +#: 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:630 +#: 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 " @@ -988,21 +998,21 @@ msgid "" "the :class:`IncrementalEncoder` object." msgstr "" -#: library/codecs.rst:638 +#: 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)." msgstr "" -#: library/codecs.rst:645 +#: 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 " "necessary, to reset the encoder and to get the output." msgstr "" -#: library/codecs.rst:652 +#: 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 " @@ -1011,42 +1021,42 @@ msgid "" "into an integer.)" msgstr "" -#: library/codecs.rst:661 +#: 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:668 +#: library/codecs.rst:671 msgid "IncrementalDecoder Objects" msgstr "" -#: library/codecs.rst:670 +#: 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:677 +#: library/codecs.rst:680 msgid "Constructor for an :class:`IncrementalDecoder` instance." msgstr "" -#: library/codecs.rst:679 +#: 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:683 +#: 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:687 +#: 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 " @@ -1054,7 +1064,7 @@ msgid "" "the :class:`IncrementalDecoder` object." msgstr "" -#: library/codecs.rst:695 +#: 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 " @@ -1065,11 +1075,11 @@ msgid "" "stateless case (which might raise an exception)." msgstr "" -#: library/codecs.rst:706 +#: library/codecs.rst:709 msgid "Reset the decoder to the initial state." msgstr "" -#: library/codecs.rst:711 +#: 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. " @@ -1084,59 +1094,59 @@ msgid "" "bytes of the resulting string into an integer.)" msgstr "" -#: library/codecs.rst:726 +#: 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:731 +#: library/codecs.rst:734 msgid "Stream Encoding and Decoding" msgstr "" -#: library/codecs.rst:734 +#: 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:742 +#: library/codecs.rst:745 msgid "StreamWriter Objects" msgstr "" -#: library/codecs.rst:744 +#: 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:751 +#: library/codecs.rst:754 msgid "Constructor for a :class:`StreamWriter` instance." msgstr "" -#: library/codecs.rst:753 +#: 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:757 +#: 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:760 +#: 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:764 +#: 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 " @@ -1144,70 +1154,70 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:770 +#: library/codecs.rst:773 msgid "Writes the object's contents encoded to the stream." msgstr "" -#: library/codecs.rst:775 +#: 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:878 +#: library/codecs.rst:881 msgid "Resets the codec buffers used for keeping internal state." msgstr "" -#: library/codecs.rst:785 +#: 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:790 +#: 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:797 +#: library/codecs.rst:800 msgid "StreamReader Objects" msgstr "" -#: library/codecs.rst:799 +#: 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:806 +#: library/codecs.rst:809 msgid "Constructor for a :class:`StreamReader` instance." msgstr "" -#: library/codecs.rst:808 +#: 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:812 +#: 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:815 +#: 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:819 +#: 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 " @@ -1215,24 +1225,24 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:823 +#: library/codecs.rst:826 msgid "" "The set of allowed values for the *errors* argument can be extended " "with :func:`register_error`." msgstr "" -#: library/codecs.rst:829 +#: library/codecs.rst:832 msgid "Decodes data from the stream and returns the resulting object." msgstr "" -#: library/codecs.rst:831 +#: 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:836 +#: 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 " @@ -1241,13 +1251,13 @@ msgid "" "huge files in one step." msgstr "" -#: library/codecs.rst:843 +#: 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:847 +#: 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 " @@ -1255,68 +1265,68 @@ msgid "" "the stream, these should be read too." msgstr "" -#: library/codecs.rst:855 +#: library/codecs.rst:858 msgid "Read one line from the input stream and return the decoded data." msgstr "" -#: library/codecs.rst:857 +#: library/codecs.rst:860 msgid "" "*size*, if given, is passed as size argument to the stream's :meth:`read` " "method." msgstr "" -#: library/codecs.rst:860 +#: library/codecs.rst:863 msgid "" "If *keepends* is false line-endings will be stripped from the lines returned." msgstr "" -#: library/codecs.rst:866 +#: 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:869 +#: 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:872 +#: library/codecs.rst:875 msgid "" "*sizehint*, if given, is passed as the *size* argument to the " "stream's :meth:`read` method." msgstr "" -#: library/codecs.rst:880 +#: 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:884 +#: 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:890 +#: library/codecs.rst:893 msgid "StreamReaderWriter Objects" msgstr "" -#: library/codecs.rst:892 +#: 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:919 +#: 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." msgstr "" -#: library/codecs.rst:901 +#: 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 " @@ -1325,24 +1335,24 @@ msgid "" "writers." msgstr "" -#: library/codecs.rst:906 +#: library/codecs.rst:909 msgid "" ":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:914 +#: library/codecs.rst:917 msgid "StreamRecoder Objects" msgstr "" -#: library/codecs.rst:916 +#: 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:925 +#: 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 " @@ -1350,17 +1360,17 @@ msgid "" "while *Reader* and *Writer* work on the backend — the data in *stream*." msgstr "" -#: library/codecs.rst:931 +#: 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:934 +#: library/codecs.rst:937 msgid "The *stream* argument must be a file-like object." msgstr "" -#: library/codecs.rst:936 +#: 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 " @@ -1368,24 +1378,24 @@ msgid "" "interface respectively." msgstr "" -#: library/codecs.rst:941 +#: 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:945 +#: 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." msgstr "" -#: library/codecs.rst:953 +#: library/codecs.rst:956 msgid "Encodings and Unicode" msgstr "" -#: library/codecs.rst:955 +#: 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 " @@ -1397,7 +1407,7 @@ msgid "" "which are collectivity referred to as :term:`text encodings `." msgstr "" -#: library/codecs.rst:965 +#: 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 " @@ -1408,7 +1418,7 @@ msgid "" "position 3: ordinal not in range(256)``." msgstr "" -#: library/codecs.rst:973 +#: 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 " @@ -1418,37 +1428,45 @@ msgid "" "that shows you which character is mapped to which byte value." msgstr "" -#: library/codecs.rst:980 +#: 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:1006 +"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 " @@ -1459,60 +1477,60 @@ msgid "" "which when concatenated give the Unicode character):" msgstr "" -#: library/codecs.rst:1015 +#: library/codecs.rst:1023 msgid "Range" msgstr "*Range*" -#: library/codecs.rst:1015 +#: library/codecs.rst:1023 #, fuzzy msgid "Encoding" msgstr "Encodages" -#: library/codecs.rst:1017 +#: library/codecs.rst:1025 msgid "``U-00000000`` ... ``U-0000007F``" msgstr "``U-00000000`` ... ``U-0000007F``" -#: library/codecs.rst:1017 +#: library/codecs.rst:1025 msgid "0xxxxxxx" msgstr "0xxxxxxx" -#: library/codecs.rst:1019 +#: library/codecs.rst:1027 msgid "``U-00000080`` ... ``U-000007FF``" msgstr "``U-00000080`` ... ``U-000007FF``" -#: library/codecs.rst:1019 +#: library/codecs.rst:1027 msgid "110xxxxx 10xxxxxx" msgstr "110xxxxx 10xxxxxx" -#: library/codecs.rst:1021 +#: library/codecs.rst:1029 msgid "``U-00000800`` ... ``U-0000FFFF``" msgstr "``U-00000800`` ... ``U-0000FFFF``" -#: library/codecs.rst:1021 +#: library/codecs.rst:1029 msgid "1110xxxx 10xxxxxx 10xxxxxx" msgstr "1110xxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:1023 +#: library/codecs.rst:1031 msgid "``U-00010000`` ... ``U-0010FFFF``" msgstr "``U-00010000`` ... ``U-0010FFFF``" -#: library/codecs.rst:1023 +#: library/codecs.rst:1031 msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" msgstr "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:1026 +#: library/codecs.rst:1034 msgid "" "The least significant bit of the Unicode character is the rightmost x bit." msgstr "" -#: library/codecs.rst:1028 +#: 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:1032 +#: 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 " @@ -1526,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:1048 +#: 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 " @@ -1550,37 +1568,37 @@ msgid "" "the use of the BOM is discouraged and should generally be avoided." msgstr "" -#: library/codecs.rst:1061 +#: library/codecs.rst:1069 msgid "Standard Encodings" msgstr "" -#: library/codecs.rst:1063 +#: 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 because they are equivalent when " +"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:1075 +#: 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:1078 +#: library/codecs.rst:1086 msgid "" "On Windows, ``cpXXX`` codecs are available for all code pages. But only " -"codecs listed in the following table are guarantead to exist on other " +"codecs listed in the following table are guaranteed to exist on other " "platforms." msgstr "" -#: library/codecs.rst:1084 +#: 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 " @@ -1590,11 +1608,11 @@ msgid "" "Using alternative aliases for these encodings may result in slower execution." msgstr "" -#: library/codecs.rst:1092 +#: library/codecs.rst:1100 msgid "Optimization opportunity recognized for us-ascii." msgstr "" -#: library/codecs.rst:1095 +#: 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 " @@ -1602,487 +1620,488 @@ msgid "" "languages in particular, the following variants typically exist:" msgstr "" -#: library/codecs.rst:1100 +#: library/codecs.rst:1108 msgid "an ISO 8859 codeset" msgstr "" -#: library/codecs.rst:1102 +#: 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:1105 +#: library/codecs.rst:1113 msgid "an IBM EBCDIC code page" msgstr "" -#: library/codecs.rst:1107 +#: library/codecs.rst:1115 msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: library/codecs.rst:1371 library/codecs.rst:1528 +#: library/codecs.rst:1379 library/codecs.rst:1536 msgid "Codec" msgstr "" -#: library/codecs.rst:1371 library/codecs.rst:1528 +#: library/codecs.rst:1379 library/codecs.rst:1536 msgid "Aliases" msgstr "" -#: library/codecs.rst:1112 +#: library/codecs.rst:1120 msgid "Languages" msgstr "" -#: library/codecs.rst:1114 +#: library/codecs.rst:1122 msgid "ascii" msgstr "*ascii*" -#: library/codecs.rst:1114 +#: library/codecs.rst:1122 msgid "646, us-ascii" msgstr "*646*, *us-ascii*" -#: library/codecs.rst:1120 library/codecs.rst:1128 +#: library/codecs.rst:1128 library/codecs.rst:1136 msgid "English" msgstr "Anglais" -#: library/codecs.rst:1116 +#: library/codecs.rst:1124 msgid "big5" msgstr "*big5*" -#: library/codecs.rst:1116 +#: library/codecs.rst:1124 msgid "big5-tw, csbig5" msgstr "*big5-tw*, *csbig5*" -#: library/codecs.rst:1118 library/codecs.rst:1177 +#: library/codecs.rst:1126 library/codecs.rst:1185 msgid "Traditional Chinese" msgstr "Chinois Traditionnel" -#: library/codecs.rst:1118 +#: library/codecs.rst:1126 msgid "big5hkscs" msgstr "*big5hkscs*" -#: library/codecs.rst:1118 +#: library/codecs.rst:1126 msgid "big5-hkscs, hkscs" msgstr "*big5-hkscs*, *hkscs*" -#: library/codecs.rst:1120 +#: library/codecs.rst:1128 msgid "cp037" msgstr "*cp037*" -#: library/codecs.rst:1120 +#: library/codecs.rst:1128 msgid "IBM037, IBM039" msgstr "*IBM037*, *IBM039*" -#: library/codecs.rst:1122 +#: library/codecs.rst:1130 msgid "cp273" msgstr "*cp273*" -#: library/codecs.rst:1122 +#: library/codecs.rst:1130 msgid "273, IBM273, csIBM273" msgstr "*273*, *IBM273*, *csIBM273*" -#: library/codecs.rst:1122 +#: library/codecs.rst:1130 msgid "German" msgstr "Allemand" -#: library/codecs.rst:1126 +#: library/codecs.rst:1134 msgid "cp424" msgstr "*cp424*" -#: library/codecs.rst:1126 +#: library/codecs.rst:1134 msgid "EBCDIC-CP-HE, IBM424" msgstr "*EBCDIC-CP-HE*, *IBM424*" -#: library/codecs.rst:1146 library/codecs.rst:1200 library/codecs.rst:1263 +#: library/codecs.rst:1154 library/codecs.rst:1208 library/codecs.rst:1271 msgid "Hebrew" msgstr "Hébreux" -#: library/codecs.rst:1128 +#: library/codecs.rst:1136 msgid "cp437" msgstr "*cp437*" -#: library/codecs.rst:1128 +#: library/codecs.rst:1136 msgid "437, IBM437" msgstr "*437*, *IBM437*" -#: library/codecs.rst:1130 +#: library/codecs.rst:1138 msgid "cp500" msgstr "*cp500*" -#: library/codecs.rst:1130 +#: library/codecs.rst:1138 msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" msgstr "*EBCDIC-CP-BE*, *EBCDIC-CP-CH*, *IBM500*" -#: library/codecs.rst:1139 library/codecs.rst:1187 library/codecs.rst:1247 -#: library/codecs.rst:1303 +#: 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:1133 +#: library/codecs.rst:1141 msgid "cp720" msgstr "*cp720*" -#: library/codecs.rst:1160 library/codecs.rst:1259 +#: library/codecs.rst:1168 library/codecs.rst:1267 msgid "Arabic" msgstr "Arabe" -#: library/codecs.rst:1135 +#: library/codecs.rst:1143 msgid "cp737" msgstr "*cp737*" -#: library/codecs.rst:1166 library/codecs.rst:1196 library/codecs.rst:1296 +#: library/codecs.rst:1174 library/codecs.rst:1204 library/codecs.rst:1304 msgid "Greek" msgstr "Grec" -#: library/codecs.rst:1137 +#: library/codecs.rst:1145 msgid "cp775" msgstr "*cp775*" -#: library/codecs.rst:1137 +#: library/codecs.rst:1145 msgid "IBM775" msgstr "*IBM775*" -#: library/codecs.rst:1204 library/codecs.rst:1271 +#: library/codecs.rst:1212 library/codecs.rst:1279 msgid "Baltic languages" msgstr "Langues Baltiques" -#: library/codecs.rst:1139 +#: library/codecs.rst:1147 msgid "cp850" msgstr "*cp850*" -#: library/codecs.rst:1139 +#: library/codecs.rst:1147 msgid "850, IBM850" msgstr "*850*, *IBM850*" -#: library/codecs.rst:1141 +#: library/codecs.rst:1149 msgid "cp852" msgstr "*cp852*" -#: library/codecs.rst:1141 +#: library/codecs.rst:1149 msgid "852, IBM852" msgstr "*852*, *IBM852*" -#: library/codecs.rst:1189 library/codecs.rst:1300 +#: library/codecs.rst:1197 library/codecs.rst:1308 msgid "Central and Eastern Europe" msgstr "Europe centrale et Europe de l'Est" -#: library/codecs.rst:1143 +#: library/codecs.rst:1151 msgid "cp855" msgstr "*cp855*" -#: library/codecs.rst:1143 +#: library/codecs.rst:1151 msgid "855, IBM855" msgstr "*855*, *IBM855*" -#: library/codecs.rst:1191 library/codecs.rst:1293 +#: 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:1146 +#: library/codecs.rst:1154 msgid "cp856" msgstr "*cp856*" -#: library/codecs.rst:1148 +#: library/codecs.rst:1156 msgid "cp857" msgstr "*cp857*" -#: library/codecs.rst:1148 +#: library/codecs.rst:1156 msgid "857, IBM857" msgstr "*857*, *IBM857*" -#: library/codecs.rst:1181 library/codecs.rst:1265 library/codecs.rst:1305 +#: library/codecs.rst:1189 library/codecs.rst:1273 library/codecs.rst:1313 msgid "Turkish" msgstr "Turc" -#: library/codecs.rst:1150 +#: library/codecs.rst:1158 msgid "cp858" msgstr "*cp858*" -#: library/codecs.rst:1150 -msgid "858, IBM858" +#: library/codecs.rst:1158 +#, fuzzy +msgid "858, IBM00858" msgstr "*858*, *IBM858*" -#: library/codecs.rst:1152 +#: library/codecs.rst:1160 msgid "cp860" msgstr "*cp860*" -#: library/codecs.rst:1152 +#: library/codecs.rst:1160 msgid "860, IBM860" msgstr "*860*, *IBM860*" -#: library/codecs.rst:1152 +#: library/codecs.rst:1160 msgid "Portuguese" msgstr "Portugais" -#: library/codecs.rst:1154 +#: library/codecs.rst:1162 msgid "cp861" msgstr "*cp861*" -#: library/codecs.rst:1154 +#: library/codecs.rst:1162 msgid "861, CP-IS, IBM861" msgstr "*861*, *CP-IS*, *IBM861*" -#: library/codecs.rst:1298 +#: library/codecs.rst:1306 msgid "Icelandic" msgstr "Islandais" -#: library/codecs.rst:1156 +#: library/codecs.rst:1164 msgid "cp862" msgstr "*cp862*" -#: library/codecs.rst:1156 +#: library/codecs.rst:1164 msgid "862, IBM862" msgstr "*862*, *IBM862*" -#: library/codecs.rst:1158 +#: library/codecs.rst:1166 msgid "cp863" msgstr "*cp863*" -#: library/codecs.rst:1158 +#: library/codecs.rst:1166 msgid "863, IBM863" msgstr "*863*, *IBM863*" -#: library/codecs.rst:1158 +#: library/codecs.rst:1166 msgid "Canadian" msgstr "Canadien" -#: library/codecs.rst:1160 +#: library/codecs.rst:1168 msgid "cp864" msgstr "*cp864*" -#: library/codecs.rst:1160 +#: library/codecs.rst:1168 msgid "IBM864" msgstr "*IBM864*" -#: library/codecs.rst:1162 +#: library/codecs.rst:1170 msgid "cp865" msgstr "*cp865*" -#: library/codecs.rst:1162 +#: library/codecs.rst:1170 msgid "865, IBM865" msgstr "*865*, *IBM865*" -#: library/codecs.rst:1162 +#: library/codecs.rst:1170 msgid "Danish, Norwegian" msgstr "" -#: library/codecs.rst:1164 +#: library/codecs.rst:1172 msgid "cp866" msgstr "*cp866*" -#: library/codecs.rst:1164 +#: library/codecs.rst:1172 msgid "866, IBM866" msgstr "*866*, *IBM866*" -#: library/codecs.rst:1281 +#: library/codecs.rst:1289 msgid "Russian" msgstr "Russe" -#: library/codecs.rst:1166 +#: library/codecs.rst:1174 msgid "cp869" msgstr "*cp869*" -#: library/codecs.rst:1166 +#: library/codecs.rst:1174 msgid "869, CP-GR, IBM869" msgstr "*869*, *CP-GR*, *IBM869*" -#: library/codecs.rst:1168 +#: library/codecs.rst:1176 msgid "cp874" msgstr "*cp874*" -#: library/codecs.rst:1168 +#: library/codecs.rst:1176 msgid "Thai" msgstr "" -#: library/codecs.rst:1170 +#: library/codecs.rst:1178 msgid "cp875" msgstr "*cp875*" -#: library/codecs.rst:1172 +#: library/codecs.rst:1180 msgid "cp932" msgstr "*cp932*" -#: library/codecs.rst:1172 +#: library/codecs.rst:1180 #, fuzzy msgid "932, ms932, mskanji, ms-kanji, windows-31j" msgstr "*932*, *ms932*, *mskanji*, *ms-kanji*" -#: library/codecs.rst:1208 library/codecs.rst:1212 library/codecs.rst:1232 -#: library/codecs.rst:1240 library/codecs.rst:1310 library/codecs.rst:1316 +#: 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:1175 +#: library/codecs.rst:1183 msgid "cp949" msgstr "*cp949*" -#: library/codecs.rst:1175 +#: library/codecs.rst:1183 msgid "949, ms949, uhc" msgstr "*949*, *ms949*, *uhc*" -#: library/codecs.rst:1214 library/codecs.rst:1279 +#: library/codecs.rst:1222 library/codecs.rst:1287 msgid "Korean" msgstr "" -#: library/codecs.rst:1177 +#: library/codecs.rst:1185 msgid "cp950" msgstr "*cp950*" -#: library/codecs.rst:1177 +#: library/codecs.rst:1185 msgid "950, ms950" msgstr "*950*, *ms950*" -#: library/codecs.rst:1179 +#: library/codecs.rst:1187 msgid "cp1006" msgstr "*cp1006*" -#: library/codecs.rst:1179 +#: library/codecs.rst:1187 msgid "Urdu" msgstr "" -#: library/codecs.rst:1181 +#: library/codecs.rst:1189 msgid "cp1026" msgstr "*cp1026*" -#: library/codecs.rst:1181 +#: library/codecs.rst:1189 msgid "ibm1026" msgstr "*ibm1026*" -#: library/codecs.rst:1183 +#: library/codecs.rst:1191 msgid "cp1125" msgstr "*cp1125*" -#: library/codecs.rst:1183 +#: library/codecs.rst:1191 msgid "1125, ibm1125, cp866u, ruscii" msgstr "*1125*, *ibm1125*, *cp866u*, *ruscii*" -#: library/codecs.rst:1287 +#: library/codecs.rst:1295 msgid "Ukrainian" msgstr "" -#: library/codecs.rst:1187 +#: library/codecs.rst:1195 msgid "cp1140" msgstr "*cp1140*" -#: library/codecs.rst:1187 -msgid "ibm1140" -msgstr "*ibm1140*" +#: library/codecs.rst:1195 +msgid "IBM01140" +msgstr "" -#: library/codecs.rst:1189 +#: library/codecs.rst:1197 msgid "cp1250" msgstr "*cp1250*" -#: library/codecs.rst:1189 +#: library/codecs.rst:1197 msgid "windows-1250" msgstr "*windows-1250*" -#: library/codecs.rst:1191 +#: library/codecs.rst:1199 msgid "cp1251" msgstr "*cp1251*" -#: library/codecs.rst:1191 +#: library/codecs.rst:1199 msgid "windows-1251" msgstr "*windows-1251*" -#: library/codecs.rst:1194 +#: library/codecs.rst:1202 msgid "cp1252" msgstr "*cp1252*" -#: library/codecs.rst:1194 +#: library/codecs.rst:1202 msgid "windows-1252" msgstr "*windows-1252*" -#: library/codecs.rst:1196 +#: library/codecs.rst:1204 msgid "cp1253" msgstr "*cp1253*" -#: library/codecs.rst:1196 +#: library/codecs.rst:1204 msgid "windows-1253" msgstr "*windows-1253*" -#: library/codecs.rst:1198 +#: library/codecs.rst:1206 msgid "cp1254" msgstr "*cp1254*" -#: library/codecs.rst:1198 +#: library/codecs.rst:1206 msgid "windows-1254" msgstr "*windows-1254*" -#: library/codecs.rst:1200 +#: library/codecs.rst:1208 msgid "cp1255" msgstr "*cp1255*" -#: library/codecs.rst:1200 +#: library/codecs.rst:1208 msgid "windows-1255" msgstr "*windows-1255*" -#: library/codecs.rst:1202 +#: library/codecs.rst:1210 msgid "cp1256" msgstr "*cp1256*" -#: library/codecs.rst:1202 +#: library/codecs.rst:1210 msgid "windows-1256" msgstr "*windows-1256*" -#: library/codecs.rst:1204 +#: library/codecs.rst:1212 msgid "cp1257" msgstr "*cp1257*" -#: library/codecs.rst:1204 +#: library/codecs.rst:1212 msgid "windows-1257" msgstr "*windows-1257*" -#: library/codecs.rst:1206 +#: library/codecs.rst:1214 msgid "cp1258" msgstr "*cp1258*" -#: library/codecs.rst:1206 +#: library/codecs.rst:1214 msgid "windows-1258" msgstr "*windows-1258*" -#: library/codecs.rst:1206 +#: library/codecs.rst:1214 msgid "Vietnamese" msgstr "" -#: library/codecs.rst:1208 +#: library/codecs.rst:1216 msgid "euc_jp" msgstr "*euc_jp*" -#: library/codecs.rst:1208 +#: library/codecs.rst:1216 msgid "eucjp, ujis, u-jis" msgstr "*eucjp*, *ujis*, *u-jis*" -#: library/codecs.rst:1210 +#: library/codecs.rst:1218 msgid "euc_jis_2004" msgstr "*euc_jis_2004*" -#: library/codecs.rst:1210 +#: library/codecs.rst:1218 msgid "jisx0213, eucjis2004" msgstr "*jisx0213*, *eucjis2004*" -#: library/codecs.rst:1212 +#: library/codecs.rst:1220 msgid "euc_jisx0213" msgstr "*euc_jisx0213*" -#: library/codecs.rst:1212 +#: library/codecs.rst:1220 msgid "eucjisx0213" msgstr "*eucjisx0213*" -#: library/codecs.rst:1214 +#: library/codecs.rst:1222 msgid "euc_kr" msgstr "*euc_kr*" -#: library/codecs.rst:1214 +#: 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:1218 +#: library/codecs.rst:1226 msgid "gb2312" msgstr "*gb2312*" -#: library/codecs.rst:1218 +#: library/codecs.rst:1226 msgid "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" @@ -2090,454 +2109,458 @@ msgstr "" "*chinese*, *csiso58gb231280*, *euc-cn*, *euccn*, *eucgb2312-cn*, " "*gb2312-1980*, *gb2312-80*, *iso-ir-58*" -#: library/codecs.rst:1227 +#: library/codecs.rst:1235 msgid "Simplified Chinese" msgstr "" -#: library/codecs.rst:1223 +#: library/codecs.rst:1231 msgid "gbk" msgstr "*gbk*" -#: library/codecs.rst:1223 +#: library/codecs.rst:1231 msgid "936, cp936, ms936" msgstr "*936*, *cp936*, *ms936*" -#: library/codecs.rst:1225 +#: library/codecs.rst:1233 msgid "Unified Chinese" msgstr "" -#: library/codecs.rst:1225 +#: library/codecs.rst:1233 msgid "gb18030" msgstr "*gb18030*" -#: library/codecs.rst:1225 +#: library/codecs.rst:1233 msgid "gb18030-2000" msgstr "*gb18030-2000*" -#: library/codecs.rst:1227 +#: library/codecs.rst:1235 msgid "hz" msgstr "*hz*" -#: library/codecs.rst:1227 +#: library/codecs.rst:1235 msgid "hzgb, hz-gb, hz-gb-2312" msgstr "*hzgb*, *hz-gb*, *hz-gb-2312*" -#: library/codecs.rst:1229 +#: library/codecs.rst:1237 msgid "iso2022_jp" msgstr "*iso2022_jp*" -#: library/codecs.rst:1229 +#: library/codecs.rst:1237 msgid "csiso2022jp, iso2022jp, iso-2022-jp" msgstr "*csiso2022jp*, *iso2022jp*, *iso-2022-jp*" -#: library/codecs.rst:1232 +#: library/codecs.rst:1240 msgid "iso2022_jp_1" msgstr "*iso2022_jp_1*" -#: library/codecs.rst:1232 +#: library/codecs.rst:1240 msgid "iso2022jp-1, iso-2022-jp-1" msgstr "*iso2022jp-1*, *iso-2022-jp-1*" -#: library/codecs.rst:1234 +#: library/codecs.rst:1242 msgid "iso2022_jp_2" msgstr "*iso2022_jp_2*" -#: library/codecs.rst:1234 +#: library/codecs.rst:1242 msgid "iso2022jp-2, iso-2022-jp-2" msgstr "*iso2022jp-2*, *iso-2022-jp-2*" -#: library/codecs.rst:1234 +#: library/codecs.rst:1242 msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" msgstr "" -#: library/codecs.rst:1237 +#: library/codecs.rst:1245 msgid "iso2022_jp_2004" msgstr "*iso2022_jp_2004*" -#: library/codecs.rst:1237 +#: library/codecs.rst:1245 msgid "iso2022jp-2004, iso-2022-jp-2004" msgstr "*iso2022jp-2004*, *iso-2022-jp-2004*" -#: library/codecs.rst:1240 +#: library/codecs.rst:1248 msgid "iso2022_jp_3" msgstr "*iso2022_jp_3*" -#: library/codecs.rst:1240 +#: library/codecs.rst:1248 msgid "iso2022jp-3, iso-2022-jp-3" msgstr "*iso2022jp-3*, *iso-2022-jp-3*" -#: library/codecs.rst:1242 +#: library/codecs.rst:1250 msgid "iso2022_jp_ext" msgstr "*iso2022_jp_ext*" -#: library/codecs.rst:1242 +#: library/codecs.rst:1250 msgid "iso2022jp-ext, iso-2022-jp-ext" msgstr "*iso2022jp-ext*, *iso-2022-jp-ext*" -#: library/codecs.rst:1244 +#: library/codecs.rst:1252 msgid "iso2022_kr" msgstr "*iso2022_kr*" -#: library/codecs.rst:1244 +#: library/codecs.rst:1252 msgid "csiso2022kr, iso2022kr, iso-2022-kr" msgstr "*csiso2022kr*, *iso2022kr*, *iso-2022-kr*" -#: library/codecs.rst:1247 +#: library/codecs.rst:1255 msgid "latin_1" msgstr "*latin_1*" -#: library/codecs.rst:1247 +#: 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:1250 +#: library/codecs.rst:1258 msgid "iso8859_2" msgstr "*iso8859_2*" -#: library/codecs.rst:1250 +#: library/codecs.rst:1258 msgid "iso-8859-2, latin2, L2" msgstr "*iso-8859-2*, *latin2*, *L2*" -#: library/codecs.rst:1252 +#: library/codecs.rst:1260 msgid "iso8859_3" msgstr "*iso8859_3*" -#: library/codecs.rst:1252 +#: library/codecs.rst:1260 msgid "iso-8859-3, latin3, L3" msgstr "*iso-8859-3*, *latin3*, *L3*" -#: library/codecs.rst:1252 +#: library/codecs.rst:1260 msgid "Esperanto, Maltese" msgstr "" -#: library/codecs.rst:1254 +#: library/codecs.rst:1262 msgid "iso8859_4" msgstr "*iso8859_4*" -#: library/codecs.rst:1254 +#: library/codecs.rst:1262 msgid "iso-8859-4, latin4, L4" msgstr "*iso-8859-4*, *latin4*, *L4*" -#: library/codecs.rst:1254 +#: library/codecs.rst:1262 #, fuzzy msgid "Northern Europe" msgstr "Europe de l'ouest" -#: library/codecs.rst:1256 +#: library/codecs.rst:1264 msgid "iso8859_5" msgstr "*iso8859_5*" -#: library/codecs.rst:1256 +#: library/codecs.rst:1264 msgid "iso-8859-5, cyrillic" msgstr "*iso-8859-5*, *cyrillic*" -#: library/codecs.rst:1259 +#: library/codecs.rst:1267 msgid "iso8859_6" msgstr "*iso8859_6*" -#: library/codecs.rst:1259 +#: library/codecs.rst:1267 msgid "iso-8859-6, arabic" msgstr "*iso-8859-6*, *arabic*" -#: library/codecs.rst:1261 +#: library/codecs.rst:1269 msgid "iso8859_7" msgstr "*iso8859_7*" -#: library/codecs.rst:1261 +#: library/codecs.rst:1269 msgid "iso-8859-7, greek, greek8" msgstr "*iso-8859-7*, *greek*, *greek8*" -#: library/codecs.rst:1263 +#: library/codecs.rst:1271 msgid "iso8859_8" msgstr "*iso8859_8*" -#: library/codecs.rst:1263 +#: library/codecs.rst:1271 msgid "iso-8859-8, hebrew" msgstr "*iso-8859-8*, *hebrew*" -#: library/codecs.rst:1265 +#: library/codecs.rst:1273 msgid "iso8859_9" msgstr "*iso8859_9*" -#: library/codecs.rst:1265 +#: library/codecs.rst:1273 msgid "iso-8859-9, latin5, L5" msgstr "*iso-8859-9*, *latin5*, *L5*" -#: library/codecs.rst:1267 +#: library/codecs.rst:1275 msgid "iso8859_10" msgstr "*iso8859_10*" -#: library/codecs.rst:1267 +#: library/codecs.rst:1275 msgid "iso-8859-10, latin6, L6" msgstr "*iso-8859-10*, *latin6*, *L6*" -#: library/codecs.rst:1267 +#: library/codecs.rst:1275 msgid "Nordic languages" msgstr "" -#: library/codecs.rst:1269 +#: library/codecs.rst:1277 msgid "iso8859_11" msgstr "*iso8859_11*" -#: library/codecs.rst:1269 +#: library/codecs.rst:1277 msgid "iso-8859-11, thai" msgstr "*iso-8859-11*, *thai*" -#: library/codecs.rst:1269 +#: library/codecs.rst:1277 msgid "Thai languages" msgstr "" -#: library/codecs.rst:1271 +#: library/codecs.rst:1279 msgid "iso8859_13" msgstr "*iso8859_13*" -#: library/codecs.rst:1271 +#: library/codecs.rst:1279 msgid "iso-8859-13, latin7, L7" msgstr "*iso-8859-13*, *latin7*, *L7*" -#: library/codecs.rst:1273 +#: library/codecs.rst:1281 msgid "iso8859_14" msgstr "*iso8859_14*" -#: library/codecs.rst:1273 +#: library/codecs.rst:1281 msgid "iso-8859-14, latin8, L8" msgstr "*iso-8859-14*, *latin8*, *L8*" -#: library/codecs.rst:1273 +#: library/codecs.rst:1281 msgid "Celtic languages" msgstr "" -#: library/codecs.rst:1275 +#: library/codecs.rst:1283 msgid "iso8859_15" msgstr "*iso8859_15*" -#: library/codecs.rst:1275 +#: library/codecs.rst:1283 msgid "iso-8859-15, latin9, L9" msgstr "*iso-8859-15*, *latin9*, *L9*" -#: library/codecs.rst:1277 +#: library/codecs.rst:1285 msgid "iso8859_16" msgstr "*iso8859_16*" -#: library/codecs.rst:1277 +#: library/codecs.rst:1285 msgid "iso-8859-16, latin10, L10" msgstr "*iso-8859-16*, *latin10*, *L10*" -#: library/codecs.rst:1277 +#: library/codecs.rst:1285 msgid "South-Eastern Europe" msgstr "" -#: library/codecs.rst:1279 +#: library/codecs.rst:1287 msgid "johab" msgstr "*johab*" -#: library/codecs.rst:1279 +#: library/codecs.rst:1287 msgid "cp1361, ms1361" msgstr "*cp1361*, *ms1361*" -#: library/codecs.rst:1281 +#: library/codecs.rst:1289 msgid "koi8_r" msgstr "*koi8_r*" -#: library/codecs.rst:1283 +#: library/codecs.rst:1291 msgid "koi8_t" msgstr "*koi8_t*" -#: library/codecs.rst:1283 +#: library/codecs.rst:1291 msgid "Tajik" msgstr "*Tajik*" -#: library/codecs.rst:1287 +#: library/codecs.rst:1295 msgid "koi8_u" msgstr "*koi8_u*" -#: library/codecs.rst:1289 +#: library/codecs.rst:1297 msgid "kz1048" msgstr "*kz1048*" -#: library/codecs.rst:1289 +#: library/codecs.rst:1297 msgid "kz_1048, strk1048_2002, rk1048" msgstr "*kz_1048*, *strk1048_2002*, *rk1048*" -#: library/codecs.rst:1307 +#: library/codecs.rst:1315 msgid "Kazakh" msgstr "" -#: library/codecs.rst:1293 +#: library/codecs.rst:1301 msgid "mac_cyrillic" msgstr "*mac_cyrillic*" -#: library/codecs.rst:1293 +#: library/codecs.rst:1301 msgid "maccyrillic" msgstr "*maccyrillic*" -#: library/codecs.rst:1296 +#: library/codecs.rst:1304 msgid "mac_greek" msgstr "*mac_greek*" -#: library/codecs.rst:1296 +#: library/codecs.rst:1304 msgid "macgreek" msgstr "*macgreek*" -#: library/codecs.rst:1298 +#: library/codecs.rst:1306 msgid "mac_iceland" msgstr "*mac_iceland*" -#: library/codecs.rst:1298 +#: library/codecs.rst:1306 msgid "maciceland" msgstr "*maciceland*" -#: library/codecs.rst:1300 +#: library/codecs.rst:1308 msgid "mac_latin2" msgstr "*mac_latin2*" -#: library/codecs.rst:1300 +#: library/codecs.rst:1308 #, fuzzy msgid "maclatin2, maccentraleurope, mac_centeuro" msgstr "*maclatin2*, *maccentraleurope*" -#: library/codecs.rst:1303 +#: library/codecs.rst:1311 msgid "mac_roman" msgstr "*mac_roman*" -#: library/codecs.rst:1303 +#: library/codecs.rst:1311 msgid "macroman, macintosh" msgstr "*macroman*, *macintosh*" -#: library/codecs.rst:1305 +#: library/codecs.rst:1313 msgid "mac_turkish" msgstr "*mac_turkish*" -#: library/codecs.rst:1305 +#: library/codecs.rst:1313 msgid "macturkish" msgstr "*macturkish*" -#: library/codecs.rst:1307 +#: library/codecs.rst:1315 msgid "ptcp154" msgstr "*ptcp154*" -#: library/codecs.rst:1307 +#: library/codecs.rst:1315 msgid "csptcp154, pt154, cp154, cyrillic-asian" msgstr "*csptcp154*, *pt154*, *cp154*, *cyrillic-asian*" -#: library/codecs.rst:1310 +#: library/codecs.rst:1318 msgid "shift_jis" msgstr "*shift_jis*" -#: library/codecs.rst:1310 +#: library/codecs.rst:1318 msgid "csshiftjis, shiftjis, sjis, s_jis" msgstr "*csshiftjis*, *shiftjis*, *sjis*, *s_jis*" -#: library/codecs.rst:1313 +#: library/codecs.rst:1321 msgid "shift_jis_2004" msgstr "*shift_jis_2004*" -#: library/codecs.rst:1313 +#: library/codecs.rst:1321 msgid "shiftjis2004, sjis_2004, sjis2004" msgstr "*shiftjis2004*, *sjis_2004*, *sjis2004*" -#: library/codecs.rst:1316 +#: library/codecs.rst:1324 msgid "shift_jisx0213" msgstr "*shift_jisx0213*" -#: library/codecs.rst:1316 +#: library/codecs.rst:1324 msgid "shiftjisx0213, sjisx0213, s_jisx0213" msgstr "*shiftjisx0213*, *sjisx0213*, *s_jisx0213*" -#: library/codecs.rst:1319 +#: library/codecs.rst:1327 msgid "utf_32" msgstr "*utf_32*" -#: library/codecs.rst:1319 +#: library/codecs.rst:1327 msgid "U32, utf32" msgstr "*U32*, *utf32*" -#: library/codecs.rst:1321 library/codecs.rst:1325 library/codecs.rst:1329 -#: library/codecs.rst:1333 library/codecs.rst:1335 +#: 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:1321 +#: library/codecs.rst:1329 msgid "utf_32_be" msgstr "*utf_32_be*" -#: library/codecs.rst:1321 +#: library/codecs.rst:1329 msgid "UTF-32BE" msgstr "*UTF-32BE*" -#: library/codecs.rst:1323 +#: library/codecs.rst:1331 msgid "utf_32_le" msgstr "*utf_32_le*" -#: library/codecs.rst:1323 +#: library/codecs.rst:1331 msgid "UTF-32LE" msgstr "*UTF-32LE*" -#: library/codecs.rst:1325 +#: library/codecs.rst:1333 msgid "utf_16" msgstr "*utf_16*" -#: library/codecs.rst:1325 +#: library/codecs.rst:1333 msgid "U16, utf16" msgstr "*U16*, *utf16*" -#: library/codecs.rst:1327 +#: library/codecs.rst:1335 msgid "utf_16_be" msgstr "*utf_16_be*" -#: library/codecs.rst:1327 +#: library/codecs.rst:1335 msgid "UTF-16BE" msgstr "*UTF-16BE*" -#: library/codecs.rst:1329 +#: library/codecs.rst:1337 msgid "utf_16_le" msgstr "*utf_16_le*" -#: library/codecs.rst:1329 +#: library/codecs.rst:1337 msgid "UTF-16LE" msgstr "*UTF-16LE*" -#: library/codecs.rst:1331 +#: library/codecs.rst:1339 msgid "utf_7" msgstr "*utf_7*" -#: library/codecs.rst:1331 +#: library/codecs.rst:1339 msgid "U7, unicode-1-1-utf-7" msgstr "*U7*, *unicode-1-1-utf-7*" -#: library/codecs.rst:1333 +#: library/codecs.rst:1341 msgid "utf_8" msgstr "*utf_8*" -#: library/codecs.rst:1333 +#: library/codecs.rst:1341 #, fuzzy msgid "U8, UTF, utf8, cp65001" msgstr "*U8*, *UTF*, *utf8*" -#: library/codecs.rst:1335 +#: library/codecs.rst:1343 msgid "utf_8_sig" msgstr "*utf_8_sig*" -#: library/codecs.rst:1338 +#: 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:1344 +#: library/codecs.rst:1352 msgid "``cp65001`` is now an alias to ``utf_8``." msgstr "" -#: library/codecs.rst:1347 +#: library/codecs.rst:1355 msgid "On Windows, ``cpXXX`` codecs are now available for all code pages." msgstr "" -#: library/codecs.rst:1352 +#: library/codecs.rst:1360 msgid "Python Specific Encodings" msgstr "" -#: library/codecs.rst:1354 +#: 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 " @@ -2547,240 +2570,240 @@ msgid "" "asymmetric codecs, the stated meaning describes the encoding direction." msgstr "" -#: library/codecs.rst:1362 +#: library/codecs.rst:1370 msgid "Text Encodings" msgstr "" -#: library/codecs.rst:1364 +#: 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." msgstr "" -#: library/codecs.rst:1373 +#: library/codecs.rst:1381 msgid "idna" msgstr "idna" -#: library/codecs.rst:1373 +#: library/codecs.rst:1381 msgid "" "Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " "``errors='strict'`` is supported." msgstr "" -#: library/codecs.rst:1379 +#: library/codecs.rst:1387 msgid "mbcs" msgstr "mbcs" -#: library/codecs.rst:1379 +#: library/codecs.rst:1387 msgid "ansi, dbcs" msgstr "" -#: library/codecs.rst:1379 +#: library/codecs.rst:1387 msgid "" "Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1383 +#: library/codecs.rst:1391 msgid "oem" msgstr "" -#: library/codecs.rst:1383 +#: library/codecs.rst:1391 msgid "" "Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." msgstr "" -#: library/codecs.rst:1389 +#: library/codecs.rst:1397 msgid "palmos" msgstr "palmos" -#: library/codecs.rst:1389 +#: library/codecs.rst:1397 msgid "Encoding of PalmOS 3.5." msgstr "" -#: library/codecs.rst:1391 +#: library/codecs.rst:1399 msgid "punycode" msgstr "punycode" -#: library/codecs.rst:1391 +#: library/codecs.rst:1399 msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: library/codecs.rst:1395 +#: library/codecs.rst:1403 msgid "raw_unicode_escape" msgstr "raw_unicode_escape" -#: library/codecs.rst:1395 +#: 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:1405 +#: library/codecs.rst:1413 msgid "undefined" msgstr "undefined" -#: library/codecs.rst:1405 +#: library/codecs.rst:1413 msgid "This Codec should only be used for testing purposes." msgstr "" -#: library/codecs.rst:1409 +#: library/codecs.rst:1417 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: library/codecs.rst:1414 +#: library/codecs.rst:1422 msgid "unicode_escape" msgstr "unicode_escape" -#: library/codecs.rst:1414 +#: 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:1426 +#: library/codecs.rst:1434 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: library/codecs.rst:1433 +#: library/codecs.rst:1441 msgid "Binary Transforms" msgstr "" -#: library/codecs.rst:1435 +#: 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:1443 +#: library/codecs.rst:1451 msgid "Encoder / decoder" msgstr "" -#: library/codecs.rst:1445 +#: library/codecs.rst:1453 msgid "base64_codec [#b64]_" msgstr "base64_codec [#b64]_" -#: library/codecs.rst:1445 +#: library/codecs.rst:1453 msgid "base64, base_64" msgstr "base64, base_64" -#: library/codecs.rst:1445 +#: library/codecs.rst:1453 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: library/codecs.rst:1450 +#: library/codecs.rst:1458 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: library/codecs.rst:1445 +#: library/codecs.rst:1453 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr "" -#: library/codecs.rst:1456 +#: library/codecs.rst:1464 msgid "bz2_codec" msgstr "bz2_codec" -#: library/codecs.rst:1456 +#: library/codecs.rst:1464 msgid "bz2" msgstr "bz2" -#: library/codecs.rst:1456 +#: library/codecs.rst:1464 msgid "Compress the operand using bz2." msgstr "" -#: library/codecs.rst:1456 +#: library/codecs.rst:1464 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr "" -#: library/codecs.rst:1459 +#: library/codecs.rst:1467 msgid "hex_codec" msgstr "hex_codec" -#: library/codecs.rst:1459 +#: library/codecs.rst:1467 msgid "hex" msgstr "hex" -#: library/codecs.rst:1459 +#: library/codecs.rst:1467 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: library/codecs.rst:1459 +#: library/codecs.rst:1467 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr "" -#: library/codecs.rst:1464 +#: library/codecs.rst:1472 msgid "quopri_codec" msgstr "quopri_codec" -#: library/codecs.rst:1464 +#: library/codecs.rst:1472 msgid "quopri, quotedprintable, quoted_printable" msgstr "" -#: library/codecs.rst:1464 +#: library/codecs.rst:1472 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: library/codecs.rst:1464 +#: library/codecs.rst:1472 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr "" -#: library/codecs.rst:1468 +#: library/codecs.rst:1476 msgid "uu_codec" msgstr "uu_codec" -#: library/codecs.rst:1468 +#: library/codecs.rst:1476 msgid "uu" msgstr "uu" -#: library/codecs.rst:1468 +#: library/codecs.rst:1476 msgid "Convert the operand using uuencode." msgstr "" -#: library/codecs.rst:1471 +#: library/codecs.rst:1479 msgid "zlib_codec" msgstr "zlib_codec" -#: library/codecs.rst:1471 +#: library/codecs.rst:1479 msgid "zip, zlib" msgstr "zip, zlib" -#: library/codecs.rst:1471 +#: library/codecs.rst:1479 msgid "Compress the operand using gzip." msgstr "" -#: library/codecs.rst:1471 +#: library/codecs.rst:1479 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr ":meth:`zlib.compress` / :meth:`zlib.decompress`" -#: library/codecs.rst:1475 +#: 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:1479 +#: library/codecs.rst:1487 msgid "Restoration of the binary transforms." msgstr "" -#: library/codecs.rst:1482 +#: library/codecs.rst:1490 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: library/codecs.rst:1489 +#: library/codecs.rst:1497 msgid "Standalone Codec Functions" msgstr "" -#: library/codecs.rst:1491 +#: library/codecs.rst:1499 msgid "" "The following functions provide encoding and decoding functionality similar " "to codecs, but are not available as named codecs " @@ -2789,74 +2812,74 @@ msgid "" "``string_escape`` codec that was removed in Python 3." msgstr "" -#: library/codecs.rst:1498 +#: 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:1501 +#: library/codecs.rst:1509 msgid "*input* must be a :class:`bytes` object." msgstr "" -#: library/codecs.rst:1512 +#: 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:1508 +#: library/codecs.rst:1516 msgid "Decode *input* from escape sequences back to the original bytes." msgstr "" -#: library/codecs.rst:1510 +#: library/codecs.rst:1518 msgid "*input* must be a :term:`bytes-like object`." msgstr "" -#: library/codecs.rst:1519 +#: library/codecs.rst:1527 msgid "Text Transforms" msgstr "" -#: library/codecs.rst:1521 +#: 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)." msgstr "" -#: library/codecs.rst:1530 +#: library/codecs.rst:1538 msgid "rot_13" msgstr "rot_13" -#: library/codecs.rst:1530 +#: library/codecs.rst:1538 msgid "rot13" msgstr "rot13" -#: library/codecs.rst:1530 +#: library/codecs.rst:1538 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: library/codecs.rst:1535 +#: library/codecs.rst:1543 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: library/codecs.rst:1538 +#: library/codecs.rst:1546 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: library/codecs.rst:1543 -msgid ":mod:`encodings` --- Encodings package" +#: library/codecs.rst:1551 +msgid ":mod:`!encodings` --- Encodings package" msgstr "" -#: library/codecs.rst:1548 +#: library/codecs.rst:1556 msgid "This module implements the following functions:" msgstr "" -#: library/codecs.rst:1552 +#: library/codecs.rst:1560 msgid "Normalize encoding name *encoding*." msgstr "" -#: library/codecs.rst:1554 +#: library/codecs.rst:1562 msgid "" "Normalization works as follows: all non-alphanumeric characters except the " "dot used for Python package names are collapsed and replaced with a single " @@ -2864,23 +2887,23 @@ msgid "" "-;#'`` becomes ``'_'``." msgstr "" -#: library/codecs.rst:1559 +#: library/codecs.rst:1567 msgid "Note that *encoding* should be ASCII only." msgstr "" -#: library/codecs.rst:1563 +#: 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:1569 +#: library/codecs.rst:1577 msgid "" "Search for the codec module corresponding to the given encoding name " "*encoding*." msgstr "" -#: library/codecs.rst:1572 +#: library/codecs.rst:1580 msgid "" "This function first normalizes the *encoding* " "using :func:`normalize_encoding`, then looks for a corresponding alias. It " @@ -2890,41 +2913,41 @@ msgid "" "the codec is cached and returned." msgstr "" -#: library/codecs.rst:1579 +#: 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:1585 +#: library/codecs.rst:1593 msgid "" "Search for a Windows code page encoding *encoding* of the form ``cpXXXX``." msgstr "" -#: library/codecs.rst:1587 +#: 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:1676 +#: library/codecs.rst:1683 msgid "Availability" msgstr "Disponibilité" -#: library/codecs.rst:1595 +#: library/codecs.rst:1603 msgid "This module implements the following exception:" msgstr "" -#: library/codecs.rst:1599 +#: library/codecs.rst:1607 msgid "Raised when a codec is invalid or incompatible." msgstr "" -#: library/codecs.rst:1603 +#: library/codecs.rst:1611 msgid "" -":mod:`encodings.idna` --- Internationalized Domain Names in Applications" +":mod:`!encodings.idna` --- Internationalized Domain Names in Applications" msgstr "" -#: library/codecs.rst:1609 +#: library/codecs.rst:1616 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2932,13 +2955,13 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: library/codecs.rst:1614 +#: 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:1617 +#: 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 " @@ -2952,7 +2975,7 @@ msgid "" "Unicode before presenting them to the user." msgstr "" -#: library/codecs.rst:1628 +#: 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 " @@ -2969,60 +2992,60 @@ msgid "" "sends that field at all)." msgstr "" -#: library/codecs.rst:1641 +#: 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:1645 +#: 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:1653 +#: 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:1659 +#: 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:1665 +#: library/codecs.rst:1672 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: library/codecs.rst:1669 -msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" +#: library/codecs.rst:1676 +msgid ":mod:`!encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: library/codecs.rst:1674 +#: library/codecs.rst:1681 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1678 +#: 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:1682 +#: library/codecs.rst:1689 msgid "Support any error handler." msgstr "" -#: library/codecs.rst:1687 -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:1693 +#: 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 " @@ -3031,6 +3054,9 @@ msgid "" "skipped." msgstr "" +#~ msgid "ibm1140" +#~ msgstr "*ibm1140*" + #, fuzzy #~ msgid "Unicode" #~ msgstr "punycode" diff --git a/library/codeop.po b/library/codeop.po index 0925c58747..3b7fc9fefc 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: 2025-10-17 09:58+0200\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,7 +90,7 @@ 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, " @@ -99,7 +101,7 @@ msgstr "" "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 " @@ -112,7 +114,7 @@ msgstr "" "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, " @@ -127,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 " @@ -142,7 +144,7 @@ msgstr "" "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 a76664f1bb..6fba78d015 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -22,15 +22,15 @@ msgid ":mod:`!collections.abc` --- Abstract Base Classes for Containers" msgstr "" ":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 ` " @@ -43,13 +43,13 @@ msgstr "" "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 "" "A newly written class can inherit directly from one of the abstract base " "classes. The class must supply the required abstract methods. The " @@ -57,7 +57,7 @@ msgid "" "desired. Other methods may be added as needed:" msgstr "" -#: library/collections.abc.rst:50 +#: library/collections.abc.rst:47 msgid "" "Existing classes and built-in classes can be registered as \"virtual " "subclasses\" of the ABCs. Those classes should define the full API " @@ -67,7 +67,7 @@ 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 " @@ -76,13 +76,13 @@ msgid "" "``__getitem__`` and ``__len__``." msgstr "" -#: library/collections.abc.rst:82 +#: library/collections.abc.rst:79 msgid "" "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:98 +#: 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:106 +#: library/collections.abc.rst:103 msgid "" "These abstract classes now support ``[]``. See :ref:`types-genericalias` " "and :pep:`585`." msgstr "" -#: library/collections.abc.rst:113 +#: library/collections.abc.rst:110 msgid "Collections Abstract Base Classes" msgstr "Classes de base abstraites de collections" -#: library/collections.abc.rst:115 +#: 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:120 +#: library/collections.abc.rst:117 msgid "ABC" msgstr "ABC" -#: library/collections.abc.rst:120 +#: library/collections.abc.rst:117 msgid "Inherits from" msgstr "Hérite de" -#: library/collections.abc.rst:120 +#: library/collections.abc.rst:117 msgid "Abstract Methods" msgstr "Méthodes abstraites" -#: library/collections.abc.rst:120 +#: library/collections.abc.rst:117 msgid "Mixin Methods" msgstr "Méthodes *mixin*" -#: library/collections.abc.rst:122 +#: library/collections.abc.rst:119 #, fuzzy msgid ":class:`Container` [1]_" msgstr ":class:`Container`" -#: library/collections.abc.rst:122 +#: library/collections.abc.rst:119 msgid "``__contains__``" msgstr "``__contains__``" -#: library/collections.abc.rst:123 +#: library/collections.abc.rst:120 #, fuzzy msgid ":class:`Hashable` [1]_" msgstr ":class:`Hashable`" -#: library/collections.abc.rst:123 +#: library/collections.abc.rst:120 msgid "``__hash__``" msgstr "``__hash__``" -#: library/collections.abc.rst:124 +#: library/collections.abc.rst:121 #, fuzzy msgid ":class:`Iterable` [1]_ [2]_" msgstr ":class:`Iterable`" -#: library/collections.abc.rst:124 library/collections.abc.rst:125 +#: library/collections.abc.rst:121 library/collections.abc.rst:122 msgid "``__iter__``" msgstr "``__iter__``" -#: library/collections.abc.rst:125 +#: library/collections.abc.rst:122 #, fuzzy msgid ":class:`Iterator` [1]_" msgstr ":class:`Iterator`" -#: library/collections.abc.rst:125 library/collections.abc.rst:126 +#: library/collections.abc.rst:122 library/collections.abc.rst:123 msgid ":class:`Iterable`" msgstr ":class:`Iterable`" -#: library/collections.abc.rst:125 +#: library/collections.abc.rst:122 msgid "``__next__``" msgstr "``__next__``" -#: library/collections.abc.rst:126 +#: library/collections.abc.rst:123 #, fuzzy msgid ":class:`Reversible` [1]_" msgstr ":class:`Reversible`" -#: library/collections.abc.rst:126 +#: library/collections.abc.rst:123 msgid "``__reversed__``" msgstr "``__reversed__``" -#: library/collections.abc.rst:127 +#: library/collections.abc.rst:124 #, fuzzy msgid ":class:`Generator` [1]_" msgstr ":class:`Generator`" -#: library/collections.abc.rst:127 +#: library/collections.abc.rst:124 msgid ":class:`Iterator`" msgstr ":class:`Iterator`" -#: library/collections.abc.rst:127 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:127 +#: library/collections.abc.rst:124 msgid "``close``, ``__iter__``, ``__next__``" msgstr "``close``, ``__iter__``, ``__next__``" -#: library/collections.abc.rst:128 +#: library/collections.abc.rst:125 #, fuzzy msgid ":class:`Sized` [1]_" msgstr ":class:`Sized`" -#: library/collections.abc.rst:128 +#: library/collections.abc.rst:125 msgid "``__len__``" msgstr "``__len__``" -#: library/collections.abc.rst:129 +#: library/collections.abc.rst:126 #, fuzzy msgid ":class:`Callable` [1]_" msgstr ":class:`Callable`" -#: library/collections.abc.rst:129 +#: library/collections.abc.rst:126 msgid "``__call__``" msgstr "``__call__``" -#: library/collections.abc.rst:130 +#: library/collections.abc.rst:127 #, fuzzy msgid ":class:`Collection` [1]_" msgstr ":class:`Collection`" -#: library/collections.abc.rst:130 +#: library/collections.abc.rst:127 msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`" msgstr ":class:`Sized`, :class:`Iterable`, :class:`Container`" -#: library/collections.abc.rst:130 library/collections.abc.rst:146 +#: library/collections.abc.rst:127 library/collections.abc.rst:143 msgid "``__contains__``, ``__iter__``, ``__len__``" msgstr "``__contains__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:134 library/collections.abc.rst:137 -#: library/collections.abc.rst:143 +#: 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:134 +#: library/collections.abc.rst:131 msgid ":class:`Reversible`, :class:`Collection`" msgstr ":class:`Reversible`, :class:`Collection`" -#: library/collections.abc.rst:134 library/collections.abc.rst:143 +#: library/collections.abc.rst:131 library/collections.abc.rst:140 msgid "``__getitem__``, ``__len__``" msgstr "``__getitem__``, ``__len__``" -#: library/collections.abc.rst:134 +#: library/collections.abc.rst:131 msgid "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" msgstr "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index`` et ``count``" -#: library/collections.abc.rst:137 +#: library/collections.abc.rst:134 msgid ":class:`MutableSequence`" msgstr ":class:`MutableSequence`" -#: library/collections.abc.rst:137 +#: library/collections.abc.rst:134 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" -#: library/collections.abc.rst:137 +#: library/collections.abc.rst:134 #, fuzzy msgid "" "Inherited :class:`Sequence` methods and ``append``, ``clear``, ``reverse``, " @@ -261,23 +261,23 @@ msgstr "" "Méthodes héritées de :class:`Sequence`, et ``append``, ``reverse``, " "``extend``, ``pop``, ``remove`` et ``__iadd__``" -#: library/collections.abc.rst:143 +#: library/collections.abc.rst:140 msgid ":class:`ByteString`" msgstr ":class:`ByteString`" -#: library/collections.abc.rst:143 +#: library/collections.abc.rst:140 msgid "Inherited :class:`Sequence` methods" msgstr "Méthodes héritées de :class:`Sequence`" -#: library/collections.abc.rst:146 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:146 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:146 +#: library/collections.abc.rst:143 #, fuzzy msgid "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " @@ -287,15 +287,15 @@ 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__``" @@ -303,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__``" @@ -319,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``" @@ -337,120 +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:168 +#: library/collections.abc.rst:165 #, fuzzy msgid "``__init__``, ``__len__`` and ``__repr__``" msgstr "``__getitem__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:169 +#: 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 " @@ -458,7 +458,7 @@ 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 " @@ -473,43 +473,43 @@ msgstr "" "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 " @@ -524,11 +524,11 @@ msgstr "" "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 " @@ -538,7 +538,7 @@ msgstr "" "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__` " @@ -547,7 +547,7 @@ msgstr "" "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 " @@ -561,17 +561,17 @@ msgstr "" "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." 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 " @@ -591,20 +591,20 @@ msgstr "" "est linéaire, les *mixin* auront une performance quadratique, il serait " "alors judicieux de les surcharger." -#: library/collections.abc.rst:282 +#: library/collections.abc.rst:279 msgid "Return first index of *value*." msgstr "" -#: library/collections.abc.rst:284 +#: library/collections.abc.rst:281 msgid "Raises :exc:`ValueError` if the value is not present." msgstr "" -#: library/collections.abc.rst:286 +#: library/collections.abc.rst:283 msgid "" "Supporting the *start* and *stop* arguments is optional, but recommended." msgstr "" -#: library/collections.abc.rst:288 +#: library/collections.abc.rst:285 #, fuzzy msgid "" "The :meth:`~sequence.index` method gained support for the *stop* and *start* " @@ -612,11 +612,11 @@ msgid "" msgstr "" "La méthode index() a ajouté le support des arguments *start* et *stop*." -#: library/collections.abc.rst:292 +#: library/collections.abc.rst:289 msgid "The :class:`ByteString` ABC has been deprecated." msgstr "" -#: library/collections.abc.rst:295 +#: 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 " @@ -625,7 +625,7 @@ msgid "" "memoryview``)." msgstr "" -#: library/collections.abc.rst:301 +#: 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`. " @@ -636,29 +636,29 @@ msgid "" "or by static type checkers)." msgstr "" -#: library/collections.abc.rst:309 +#: library/collections.abc.rst:306 msgid "See :pep:`PEP 688 <688#current-options>` for more details." msgstr "" -#: library/collections.abc.rst:314 +#: 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:319 +#: 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:326 +#: 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:330 +#: library/collections.abc.rst:327 #, fuzzy msgid "" "ABC for :term:`awaitable` objects, which can be used in :keyword:`await` " @@ -669,7 +669,7 @@ msgstr "" "utilisés dans les expressions :keyword:`await`. Les implémentations " "personnalisées doivent définir la méthode :meth:`__await__`." -#: library/collections.abc.rst:334 +#: library/collections.abc.rst:331 msgid "" ":term:`Coroutine ` objects and instances of " "the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC." @@ -678,7 +678,7 @@ msgstr "" "l'ABC :class:`~collections.abc.Coroutine` sont tous des instances de cette " "ABC." -#: library/collections.abc.rst:338 +#: library/collections.abc.rst:335 #, fuzzy msgid "" "In CPython, generator-based coroutines (:term:`generators ` " @@ -694,7 +694,7 @@ msgstr "" "décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " "détecter." -#: library/collections.abc.rst:348 +#: library/collections.abc.rst:345 #, fuzzy msgid "" "ABC for :term:`coroutine` compatible classes. These implement the following " @@ -712,7 +712,7 @@ msgstr "" "de :class:`Coroutine` sont également des instances de :class:`Awaitable`. " "Voir aussi la définition de :term:`coroutine`." -#: library/collections.abc.rst:356 +#: library/collections.abc.rst:353 #, fuzzy msgid "" "In CPython, generator-based coroutines (:term:`generators ` " @@ -728,14 +728,14 @@ msgstr "" "décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " "détecter." -#: library/collections.abc.rst:362 +#: 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`." msgstr "" -#: library/collections.abc.rst:371 +#: library/collections.abc.rst:368 #, fuzzy msgid "" "ABC for classes that provide an ``__aiter__`` method. See also the " @@ -744,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:378 +#: library/collections.abc.rst:375 msgid "" "ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See " "also the definition of :term:`asynchronous iterator`." @@ -753,7 +753,7 @@ msgstr "" "``__anext__``. Voir aussi la définition d':term:`itérateur asynchrone " "`." -#: library/collections.abc.rst:385 +#: library/collections.abc.rst:382 #, fuzzy msgid "" "ABC for :term:`asynchronous generator` classes that implement the protocol " @@ -762,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:388 +#: library/collections.abc.rst:385 msgid "" "See :ref:`annotating-generators-and-coroutines` for details on " "using :class:`!AsyncGenerator` in type annotations." msgstr "" -#: library/collections.abc.rst:395 +#: 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:401 +#: library/collections.abc.rst:398 msgid "Examples and Recipes" msgstr "Exemples et recettes" -#: library/collections.abc.rst:403 +#: library/collections.abc.rst:400 #, fuzzy msgid "" "ABCs allow us to ask classes or instances if they provide particular " @@ -787,7 +787,7 @@ 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:410 +#: library/collections.abc.rst:407 #, fuzzy msgid "" "Several of the ABCs are also useful as mixins that make it easier to develop " @@ -806,13 +806,13 @@ msgstr "" "apporte les méthodes restantes, comme :meth:`__and__` " "et :meth:`isdisjoint` ::" -#: library/collections.abc.rst:439 +#: 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:442 +#: library/collections.abc.rst:439 #, fuzzy msgid "" "Since some set operations create new sets, the default mixin methods need a " @@ -837,7 +837,7 @@ msgstr "" "ordinaire qui peut construire de nouvelles instances à partir d'un argument " "itérable." -#: library/collections.abc.rst:453 +#: library/collections.abc.rst:450 #, fuzzy msgid "" "To override the comparisons (presumably for speed, as the semantics are " @@ -848,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:459 +#: library/collections.abc.rst:456 #, fuzzy msgid "" "The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash " @@ -864,7 +864,7 @@ msgstr "" "de :meth:`Set` et de :meth:`Hashable`, puis définissez ``__hash__ = " "Set._hash``." -#: library/collections.abc.rst:467 +#: library/collections.abc.rst:464 msgid "" "`OrderedSet recipe `_ for an " "example built on :class:`MutableSet`." @@ -872,7 +872,7 @@ msgstr "" "`OrderedSet recipe `_ pour un " "exemple construit sur :class:`MutableSet`." -#: library/collections.abc.rst:470 +#: 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 " diff --git a/library/collections.po b/library/collections.po index cc9b970047..125cc43211 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: 2025-10-17 09:58+0200\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,11 +21,11 @@ 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 " @@ -35,99 +35,99 @@ msgstr "" "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 " @@ -139,14 +139,14 @@ msgstr "" "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,15 +230,15 @@ 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 " @@ -256,7 +256,7 @@ msgstr "" "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 " @@ -265,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::" @@ -273,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`." -#: library/collections.rst:123 +#: library/collections.rst:120 msgid "" "The `MultiContext class `_ in the Enthought `CodeTools package " @@ -291,7 +291,7 @@ 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 " @@ -306,7 +306,7 @@ msgstr "" "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 `_." @@ -327,21 +327,21 @@ 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 " @@ -350,7 +350,7 @@ 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::" @@ -358,7 +358,7 @@ msgstr "" "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. " @@ -371,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::" @@ -383,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` " @@ -399,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):" @@ -407,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`:" @@ -416,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:" @@ -424,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 " @@ -439,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 " @@ -448,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 " @@ -459,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` " @@ -472,7 +472,7 @@ 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 " @@ -483,26 +483,27 @@ msgstr "" "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." -#: 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`." -#: 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 " @@ -515,7 +516,7 @@ msgstr "" "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 " @@ -528,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 " @@ -542,20 +543,22 @@ 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." +"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 " @@ -567,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." @@ -576,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 " @@ -596,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 " @@ -607,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." @@ -615,7 +626,7 @@ 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 " @@ -629,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 " @@ -642,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." @@ -650,7 +661,7 @@ 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." @@ -658,7 +669,7 @@ msgstr "" "`Bag class `_ dans Smalltalk." -#: library/collections.rst:435 +#: library/collections.rst:445 msgid "" "Wikipedia entry for `Multisets `_." msgstr "" @@ -666,7 +677,7 @@ msgstr "" "Multiensemble>`_ sur Wikipédia (ou `l'article en anglais `_)." -#: library/collections.rst:437 +#: library/collections.rst:447 msgid "" "`C++ multisets `_ tutorial with examples." @@ -675,7 +686,7 @@ msgstr "" "www.java2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-" "multiset.htm>`_." -#: 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 " @@ -685,7 +696,7 @@ 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`::" @@ -694,11 +705,11 @@ msgstr "" "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 " @@ -708,7 +719,7 @@ msgstr "" "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 " @@ -724,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 " @@ -738,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. " @@ -757,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." @@ -790,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 " @@ -800,9 +818,10 @@ 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 "" @@ -810,11 +829,12 @@ msgstr "" "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." @@ -822,7 +842,7 @@ 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`." @@ -830,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`." @@ -838,7 +858,7 @@ 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`." @@ -846,13 +866,13 @@ 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." @@ -860,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 " @@ -870,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)``, " @@ -897,7 +917,7 @@ msgstr "" "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__()``." @@ -905,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::" @@ -926,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::" @@ -935,7 +955,7 @@ 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 " @@ -951,7 +971,7 @@ 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 " @@ -963,7 +983,7 @@ msgstr "" "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 " @@ -982,11 +1002,11 @@ msgstr "" "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 " @@ -999,7 +1019,7 @@ msgstr "" "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 " @@ -1012,7 +1032,13 @@ msgstr "" "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:" @@ -1020,7 +1046,7 @@ msgstr "" "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." @@ -1028,7 +1054,7 @@ msgstr "" "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 " @@ -1038,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." @@ -1046,7 +1072,7 @@ 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 " @@ -1057,7 +1083,7 @@ msgstr "" "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 " @@ -1070,11 +1096,11 @@ msgstr "" "``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:`~defaultdict.__missing__` method; it is " @@ -1085,18 +1111,18 @@ msgstr "" "initialisé par le premier argument passé au constructeur, s'il est spécifié, " "sinon par ``None``." -#: library/collections.rst:1192 +#: 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:" @@ -1105,7 +1131,7 @@ 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 " @@ -1127,7 +1153,7 @@ 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 " @@ -1137,7 +1163,7 @@ msgstr "" "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 " @@ -1149,7 +1175,7 @@ msgstr "" "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 " @@ -1161,7 +1187,7 @@ 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:" @@ -1169,13 +1195,13 @@ 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 " @@ -1188,7 +1214,7 @@ 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 " @@ -1206,7 +1232,7 @@ msgstr "" "méthode :meth:`__repr__` pratique qui liste le contenu du *n*-uplet au " "format ``nom=valeur``." -#: library/collections.rst:856 +#: 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 " @@ -1217,7 +1243,7 @@ msgstr "" "sont séparés par un espace et/ou une virgule, par exemple ``'x y'`` ou ``'x, " "y'``." -#: library/collections.rst:860 +#: 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, " @@ -1232,7 +1258,7 @@ msgstr "" "un :mod:`keyword` tel que ``class``, ``for``, ``return``, ``global``, " "``pass`` ou ``raise``." -#: library/collections.rst:866 +#: library/collections.rst:883 msgid "" "If *rename* is true, invalid fieldnames are automatically replaced with " "positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " @@ -1244,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:871 +#: 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, " @@ -1260,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:878 +#: library/collections.rst:895 #, fuzzy msgid "" "If *module* is defined, the :attr:`~type.__module__` attribute of the named " @@ -1269,7 +1295,7 @@ msgstr "" "Si *module* est spécifié, alors il est assigné à l'attribut ``__module__`` " "du *n*-uplet nommé." -#: library/collections.rst:881 +#: 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." @@ -1278,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:884 +#: library/collections.rst:901 msgid "" "To support pickling, the named tuple class should be assigned to a variable " "that matches *typename*." @@ -1286,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:887 +#: library/collections.rst:904 msgid "Added support for *rename*." msgstr "Gestion de *rename*." -#: library/collections.rst:890 +#: library/collections.rst:907 msgid "" "The *verbose* and *rename* parameters became :ref:`keyword-only arguments " "`." @@ -1298,16 +1324,16 @@ msgstr "" "Les paramètres *verbose* et *rename* deviennent des :ref:`arguments " "obligatoirement nommés `." -#: library/collections.rst:894 +#: library/collections.rst:911 msgid "Added the *module* parameter." msgstr "Ajout du paramètre *module*." -#: library/collections.rst:897 +#: 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:900 +#: library/collections.rst:917 #, fuzzy msgid "" "Added the *defaults* parameter and " @@ -1315,7 +1341,7 @@ msgid "" msgstr "" "Ajout du paramètre *defaults* et de l'attribut :attr:`_field_defaults`." -#: library/collections.rst:920 +#: 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::" @@ -1324,7 +1350,7 @@ msgstr "" "champs à des *n*-uplets renvoyés par les modules :mod:`csv` " "ou :mod:`sqlite3` ::" -#: library/collections.rst:936 +#: 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 " @@ -1334,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:942 +#: 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:952 +#: library/collections.rst:969 msgid "" "Return a new :class:`dict` which maps field names to their corresponding " "values:" @@ -1349,11 +1375,11 @@ msgstr "" "Renvoie un nouveau :class:`dict` qui associe chaque nom de champ à sa valeur " "correspondante :" -#: library/collections.rst:961 +#: 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:964 +#: 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 " @@ -1366,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:973 +#: library/collections.rst:990 msgid "" "Return a new instance of the named tuple replacing specified fields with new " "values::" @@ -1374,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:983 +#: library/collections.rst:1000 msgid "" "Named tuples are also supported by generic function :func:`copy.replace`." msgstr "" -#: library/collections.rst:985 +#: library/collections.rst:1002 msgid "" "Raise :exc:`TypeError` instead of :exc:`ValueError` for invalid keyword " "arguments." msgstr "" -#: library/collections.rst:991 +#: 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." @@ -1394,11 +1420,11 @@ msgstr "" "l'introspection et pour créer de nouveaux types de *n*-uplets nommés à " "partir d'existants." -#: library/collections.rst:1006 +#: 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:1016 +#: library/collections.rst:1033 msgid "" "To retrieve a field whose name is stored in a string, use " "the :func:`getattr` function:" @@ -1406,7 +1432,7 @@ 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:1022 +#: 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`):" @@ -1414,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:1029 +#: 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 " @@ -1424,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:1048 +#: 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 " @@ -1434,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:1051 +#: 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` " @@ -1444,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:1056 +#: library/collections.rst:1073 msgid "" "Docstrings can be customized by making direct assignments to the ``__doc__`` " "fields:" @@ -1452,11 +1478,11 @@ msgstr "" "Les *docstrings* peuvent être personnalisées en modifiant directement " "l'attribut ``__doc__`` :" -#: library/collections.rst:1065 +#: library/collections.rst:1082 msgid "Property docstrings became writeable." msgstr "La propriété devient éditable." -#: library/collections.rst:1070 +#: 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` " @@ -1466,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:1079 +#: library/collections.rst:1096 msgid "" "See :meth:`types.SimpleNamespace` for a mutable namespace based on an " "underlying dictionary instead of a tuple." @@ -1474,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:1082 +#: library/collections.rst:1099 msgid "" "The :mod:`dataclasses` module provides a decorator and functions for " "automatically adding generated special methods to user-defined classes." @@ -1483,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:1087 +#: library/collections.rst:1104 msgid ":class:`OrderedDict` objects" msgstr "Objets :class:`OrderedDict`" -#: library/collections.rst:1089 +#: 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 " @@ -1499,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:1095 +#: 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:1097 +#: library/collections.rst:1114 msgid "" "The regular :class:`dict` was designed to be very good at mapping " "operations. Tracking insertion order was secondary." @@ -1512,7 +1538,7 @@ msgstr "" "opérations de correspondance. Garder une trace de l'ordre d'insertion était " "secondaire." -#: library/collections.rst:1100 +#: 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 " @@ -1522,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:1104 +#: library/collections.rst:1121 #, fuzzy msgid "" "The :class:`OrderedDict` algorithm can handle frequent reordering operations " @@ -1535,19 +1561,19 @@ msgstr "" "medium.com/@krishankantsinghal/my-first-blog-on-medium-583159139237>`_ pour " "*Least Recently Used* en anglais)." -#: library/collections.rst:1108 +#: 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:1110 +#: 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:1113 +#: library/collections.rst:1130 #, fuzzy msgid "" "The :meth:`~OrderedDict.popitem` method of :class:`OrderedDict` has a " @@ -1558,20 +1584,20 @@ msgstr "" "différente. Elle accepte un argument optionnel pour spécifier quel élément " "doit être enlevé." -#: library/collections.rst:1116 +#: 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:1119 +#: 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:1123 +#: library/collections.rst:1140 #, fuzzy msgid "" ":class:`OrderedDict` has a :meth:`~OrderedDict.move_to_end` method to " @@ -1580,28 +1606,28 @@ msgstr "" ":class:`OrderedDict` possède une méthode :meth:`move_to_end` pour déplacer " "efficacement un élément à la fin." -#: library/collections.rst:1126 +#: 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:1130 +#: 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:1134 +#: 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:1139 +#: library/collections.rst:1158 msgid "" "Return an instance of a :class:`dict` subclass that has methods specialized " "for rearranging dictionary order." @@ -1609,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:1146 +#: 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-" @@ -1623,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:1153 +#: library/collections.rst:1172 #, fuzzy msgid "" "Move an existing *key* to either end of an ordered dictionary. The item is " @@ -1635,7 +1661,7 @@ msgstr "" "à gauche sinon. Lève une exception :exc:`KeyError` si la clé *key* n'est pas " "trouvée :" -#: library/collections.rst:1170 +#: library/collections.rst:1189 msgid "" "In addition to the usual mapping methods, ordered dictionaries also support " "reverse iteration using :func:`reversed`." @@ -1643,13 +1669,13 @@ 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:1175 +#: 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:1178 +#: library/collections.rst:1197 #, fuzzy msgid "" "Equality tests between :class:`OrderedDict` objects and " @@ -1665,7 +1691,7 @@ msgstr "" "objets :class:`OrderedDict` partout où les dictionnaires natifs sont " "utilisés." -#: library/collections.rst:1183 +#: library/collections.rst:1202 msgid "" "The items, keys, and values :term:`views ` " "of :class:`OrderedDict` now support reverse iteration using :func:`reversed`." @@ -1674,7 +1700,7 @@ msgstr "" "de :class:`OrderedDict` gèrent maintenant l'itération en sens inverse en " "utilisant :func:`reversed`." -#: library/collections.rst:1187 +#: library/collections.rst:1206 #, fuzzy msgid "" "With the acceptance of :pep:`468`, order is retained for keyword arguments " @@ -1685,11 +1711,11 @@ msgstr "" "au constructeur et à la méthode :meth:`update` de :class:`OrderedDict` est " "conservé." -#: library/collections.rst:1197 +#: library/collections.rst:1216 msgid ":class:`OrderedDict` Examples and Recipes" msgstr "Exemples et cas pratiques utilisant :class:`OrderDict`" -#: library/collections.rst:1199 +#: 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 " @@ -1701,7 +1727,7 @@ msgstr "" "entrée écrase une existante, la position d'insertion d'origine est modifiée " "et déplacée à la fin ::" -#: library/collections.rst:1211 +#: library/collections.rst:1230 msgid "" "An :class:`OrderedDict` would also be useful for implementing variants " "of :func:`functools.lru_cache`:" @@ -1709,11 +1735,11 @@ msgstr "" "Un :class:`OrderedDict` peut aussi être utile pour implémenter des variantes " "de :func:`functools.lru_cache` :" -#: library/collections.rst:1310 +#: library/collections.rst:1329 msgid ":class:`UserDict` objects" msgstr "Objets :class:`UserDict`" -#: library/collections.rst:1312 +#: 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 " @@ -1726,13 +1752,13 @@ msgstr "" "travailler avec celle-ci, car le dictionnaire sous-jacent est accessible " "comme attribut." -#: library/collections.rst:1320 +#: 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." +"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 " @@ -1740,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:1326 +#: 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:1331 +#: 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`." -#: library/collections.rst:1337 +#: 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:1339 +#: 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 " @@ -1771,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:1344 +#: 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 " @@ -1782,7 +1821,7 @@ msgstr "" "de travailler avec cette classe, car la liste sous-jacente est accessible " "via un attribut." -#: library/collections.rst:1350 +#: 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 " @@ -1796,7 +1835,7 @@ msgstr "" "*list* peut être un itérable, par exemple une liste native ou un " "objet :class:`UserList`." -#: library/collections.rst:1356 +#: library/collections.rst:1383 msgid "" "In addition to supporting the methods and operations of mutable " "sequences, :class:`UserList` instances provide the following attribute:" @@ -1804,7 +1843,7 @@ 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:1361 +#: library/collections.rst:1388 msgid "" "A real :class:`list` object used to store the contents of " "the :class:`UserList` class." @@ -1812,7 +1851,7 @@ msgstr "" "Un objet :class:`list` natif utilisé pour stocker le contenu de la " "classe :class:`UserList`." -#: library/collections.rst:1364 +#: 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 " @@ -1828,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:1371 +#: 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 " @@ -1840,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:1377 +#: library/collections.rst:1404 msgid ":class:`UserString` objects" msgstr "Objets :class:`UserString`" -#: library/collections.rst:1379 +#: 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 " @@ -1857,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:1387 +#: 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 " @@ -1871,7 +1910,7 @@ msgstr "" "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:1394 +#: library/collections.rst:1421 msgid "" "In addition to supporting the methods and operations of " "strings, :class:`UserString` instances provide the following attribute:" @@ -1879,7 +1918,7 @@ 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:1399 +#: library/collections.rst:1426 msgid "" "A real :class:`str` object used to store the contents of " "the :class:`UserString` class." @@ -1887,7 +1926,7 @@ msgstr "" "Un objet :class:`str` natif utilisé pour stocker le contenu de la " "classe :class:`UserString`." -#: library/collections.rst:1402 +#: library/collections.rst:1429 msgid "" "New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " "``isprintable``, and ``maketrans``." diff --git a/library/colorsys.po b/library/colorsys.po index 0b0f2951a1..92bb00751d 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: 2025-10-17 09:58+0200\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,7 +45,7 @@ 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-" @@ -55,44 +55,45 @@ msgstr "" "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/compression.po b/library/compression.po index 09e2fe628e..3af216abde 100644 --- a/library/compression.po +++ b/library/compression.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/compression.zstd.po b/library/compression.zstd.po index d27bbdb559..ae096e3194 100644 --- a/library/compression.zstd.po +++ b/library/compression.zstd.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -74,27 +73,35 @@ msgid "" "parameters." msgstr "" -#: library/compression.zstd.rst:38 +#: 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:42 +#: 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:47 +#: library/compression.zstd.rst:49 msgid "Reading and writing compressed files" msgstr "Lire et écrire des fichiers compressés" -#: library/compression.zstd.rst:52 +#: 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:55 +#: 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 ` " @@ -102,7 +109,7 @@ msgid "" "file object to read from or write to." msgstr "" -#: library/compression.zstd.rst:60 +#: 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. " @@ -111,7 +118,7 @@ msgid "" "``'at'``, and ``'xt'`` respectively." msgstr "" -#: library/compression.zstd.rst:66 library/compression.zstd.rst:110 +#: 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 " @@ -120,35 +127,35 @@ msgid "" "if the *level* argument is not None, a :exc:`!TypeError` will be raised." msgstr "" -#: library/compression.zstd.rst:73 +#: library/compression.zstd.rst:75 msgid "" "When writing, the *options* argument can be a dictionary providing advanced " -"decompression parameters; see :class:`CompressionParameter` for detailed " +"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:81 +#: 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:85 +#: 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:93 +#: library/compression.zstd.rst:95 msgid "Open a Zstandard-compressed file in binary mode." msgstr "" -#: library/compression.zstd.rst:95 +#: 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 " @@ -158,7 +165,7 @@ msgid "" "closed when the :class:`ZstdFile` is closed." msgstr "" -#: library/compression.zstd.rst:102 +#: 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. " @@ -166,23 +173,23 @@ msgid "" "respectively." msgstr "" -#: library/compression.zstd.rst:107 +#: 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:117 +#: library/compression.zstd.rst:119 msgid "" "When writing, the *options* argument can be a dictionary providing advanced " -"decompression parameters; see :class:`CompressionParameter` for detailed " +"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:125 +#: library/compression.zstd.rst:127 msgid "" ":class:`!ZstdFile` supports all the members specified " "by :class:`io.BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach` " @@ -190,11 +197,11 @@ msgid "" "are supported." msgstr "" -#: library/compression.zstd.rst:130 +#: library/compression.zstd.rst:132 msgid "The following method and attributes are also provided:" msgstr "" -#: library/compression.zstd.rst:134 +#: 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 " @@ -205,7 +212,7 @@ msgstr "" "atteinte. Le nombre exact d'octets renvoyés demeure indéterminé (l'argument " "*taille* est ignoré)." -#: library/compression.zstd.rst:138 +#: 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 " @@ -213,27 +220,27 @@ msgid "" "file object for *file*)." msgstr "" -#: library/compression.zstd.rst:145 +#: library/compression.zstd.rst:147 msgid "``'rb'`` for reading and ``'wb'`` for writing." msgstr "" -#: library/compression.zstd.rst:149 +#: 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:154 +#: 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:158 +#: 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:161 library/compression.zstd.rst:205 +#: 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 " @@ -245,27 +252,27 @@ msgid "" "CompressionParameter.compression_level` parameter should be set." msgstr "" -#: library/compression.zstd.rst:170 library/compression.zstd.rst:214 +#: 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:174 +#: 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:181 +#: 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:184 library/compression.zstd.rst:306 +#: 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 " @@ -273,40 +280,40 @@ msgid "" "documentation." msgstr "" -#: library/compression.zstd.rst:189 library/compression.zstd.rst:311 +#: 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:193 +#: 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:199 +#: 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:202 +#: 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:218 +#: 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:225 +#: 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:`!" @@ -315,13 +322,13 @@ msgid "" "concatenated with the output of any previous calls to :meth:`~.compress`." msgstr "" -#: library/compression.zstd.rst:232 +#: 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:236 +#: 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 " @@ -329,7 +336,7 @@ msgid "" "called, as it would write out a new empty frame." msgstr "" -#: library/compression.zstd.rst:244 +#: 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." @@ -338,13 +345,13 @@ msgstr "" "constitué de toutes les données stockées dans les tampons interne du " "compresseur." -#: library/compression.zstd.rst:247 +#: 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:252 +#: 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 " @@ -355,7 +362,7 @@ msgid "" "compression levels." msgstr "" -#: library/compression.zstd.rst:260 +#: 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 " @@ -364,34 +371,34 @@ msgid "" "the last chunk of data may be lost." msgstr "" -#: library/compression.zstd.rst:267 +#: 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:273 +#: 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:279 +#: 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:286 +#: 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:292 +#: 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`, " @@ -399,7 +406,7 @@ msgid "" "signifying that the compressor is at the start of a new frame." msgstr "" -#: library/compression.zstd.rst:300 +#: library/compression.zstd.rst:302 msgid "" "Create a decompressor object, which can be used to decompress data " "incrementally." @@ -407,13 +414,13 @@ msgstr "" "Créé un objet de décompression, pour décompresser de façon incrémentale une " "donnée." -#: library/compression.zstd.rst:303 +#: 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:316 +#: library/compression.zstd.rst:318 msgid "" "This class does not transparently handle inputs containing multiple " "compressed frames, unlike the :func:`decompress` function " @@ -422,7 +429,7 @@ msgid "" "object`, or multiple :class:`!ZstdDecompressor` instances." msgstr "" -#: library/compression.zstd.rst:324 +#: 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 " @@ -430,16 +437,17 @@ msgid "" "output of any previous calls to :meth:`!decompress`." msgstr "" -#: library/compression.zstd.rst:330 +#: 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, 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." +"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:337 +#: 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), " @@ -449,36 +457,36 @@ 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/compression.zstd.rst:342 +#: 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:348 +#: 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:352 +#: 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:354 +#: library/compression.zstd.rst:360 msgid "Before the end of the stream is reached, this will be ``b''``." msgstr "" -#: library/compression.zstd.rst:358 +#: 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:363 +#: library/compression.zstd.rst:369 msgid "Zstandard dictionaries" msgstr "" -#: library/compression.zstd.rst:368 +#: 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 " @@ -488,13 +496,13 @@ msgid "" "significantly." msgstr "" -#: library/compression.zstd.rst:375 +#: 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:378 +#: 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 " @@ -504,7 +512,7 @@ msgid "" "faster compression, but reduce the compression ratio." msgstr "" -#: library/compression.zstd.rst:388 +#: 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 " @@ -512,26 +520,26 @@ msgid "" "Zstandard dictionary." msgstr "" -#: library/compression.zstd.rst:393 +#: 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:396 +#: 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:399 +#: 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:403 +#: 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 " @@ -539,20 +547,20 @@ msgid "" "level can make compression more efficient." msgstr "" -#: library/compression.zstd.rst:411 +#: 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:415 +#: 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:418 +#: 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 " @@ -562,7 +570,7 @@ msgid "" "CLI." msgstr "" -#: library/compression.zstd.rst:424 +#: 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 " @@ -574,25 +582,25 @@ msgid "" "dictionary." msgstr "" -#: library/compression.zstd.rst:433 +#: library/compression.zstd.rst:439 msgid "Difference for compression" msgstr "" -#: library/compression.zstd.rst:438 +#: library/compression.zstd.rst:444 msgid "Digested dictionary" msgstr "" -#: library/compression.zstd.rst:439 +#: library/compression.zstd.rst:445 msgid "Undigested dictionary" msgstr "" -#: library/compression.zstd.rst:440 +#: 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:442 +#: library/compression.zstd.rst:448 msgid "" "``window_log``, ``hash_log``, ``chain_log``, ``search_log``, ``min_match``, " "``target_length``, ``strategy``, ``enable_long_distance_matching``, " @@ -600,102 +608,102 @@ msgid "" "``ldm_hash_rate_log``, and some non-public parameters." msgstr "" -#: library/compression.zstd.rst:447 +#: library/compression.zstd.rst:453 msgid "None" msgstr "None" -#: library/compression.zstd.rst:448 +#: library/compression.zstd.rst:454 msgid ":class:`!ZstdDict` internally caches the dictionary" msgstr "" -#: library/compression.zstd.rst:449 +#: 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:451 +#: 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:454 +#: 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:460 +#: 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:466 +#: library/compression.zstd.rst:472 msgid "Identifier of the Zstandard dictionary, a non-negative int value." msgstr "" -#: library/compression.zstd.rst:468 +#: 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:471 +#: 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:476 +#: 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:482 +#: library/compression.zstd.rst:488 msgid "Load as a digested dictionary." msgstr "" -#: library/compression.zstd.rst:486 +#: library/compression.zstd.rst:492 msgid "Load as an undigested dictionary." msgstr "" -#: library/compression.zstd.rst:490 +#: library/compression.zstd.rst:496 msgid "Advanced parameter control" msgstr "" -#: library/compression.zstd.rst:494 +#: 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:497 library/compression.zstd.rst:731 +#: 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:500 +#: library/compression.zstd.rst:506 msgid "" "Parameters are optional; any omitted parameter will have it's value selected " "automatically." msgstr "" -#: library/compression.zstd.rst:503 +#: library/compression.zstd.rst:509 msgid "" "Example getting the lower and upper bound of :attr:`~.compression_level`::" msgstr "" -#: library/compression.zstd.rst:507 +#: library/compression.zstd.rst:513 msgid "Example setting the :attr:`~.window_log` to the maximum size::" msgstr "" -#: library/compression.zstd.rst:515 +#: 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 " @@ -704,17 +712,17 @@ msgid "" "``CompressionParameter.compression_level.bounds()``." msgstr "" -#: library/compression.zstd.rst:521 library/compression.zstd.rst:749 +#: library/compression.zstd.rst:527 library/compression.zstd.rst:755 msgid "Both the lower and upper bounds are inclusive." msgstr "" -#: library/compression.zstd.rst:525 +#: 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:528 +#: 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 " @@ -722,11 +730,11 @@ msgid "" "for worse compression ratios." msgstr "" -#: library/compression.zstd.rst:533 +#: library/compression.zstd.rst:539 msgid "Setting the level to zero uses :attr:`COMPRESSION_LEVEL_DEFAULT`." msgstr "" -#: library/compression.zstd.rst:537 +#: 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 " @@ -734,16 +742,16 @@ msgid "" "require more memory but gain better compression values." msgstr "" -#: library/compression.zstd.rst:542 library/compression.zstd.rst:551 -#: library/compression.zstd.rst:562 library/compression.zstd.rst:570 -#: library/compression.zstd.rst:581 library/compression.zstd.rst:596 -#: library/compression.zstd.rst:627 library/compression.zstd.rst:634 -#: library/compression.zstd.rst:642 library/compression.zstd.rst:650 -#: library/compression.zstd.rst:709 library/compression.zstd.rst:758 +#: 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:546 +#: 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 " @@ -751,7 +759,7 @@ msgid "" "speed of strategies > :attr:`~Strategy.dfast`." msgstr "" -#: library/compression.zstd.rst:555 +#: 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 " @@ -761,14 +769,14 @@ msgid "" "probe table." msgstr "" -#: library/compression.zstd.rst:566 +#: 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:574 +#: 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 " @@ -778,11 +786,11 @@ msgid "" "effective maximum is ``6``." msgstr "" -#: library/compression.zstd.rst:585 +#: library/compression.zstd.rst:591 msgid "The impact of this field depends on the selected :class:`Strategy`." msgstr "" -#: library/compression.zstd.rst:587 +#: 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 " @@ -790,38 +798,38 @@ msgid "" "ratios better, but compresses slower." msgstr "" -#: library/compression.zstd.rst:592 +#: 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:600 +#: 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:604 +#: library/compression.zstd.rst:610 msgid ":class:`Strategy`" msgstr "" -#: library/compression.zstd.rst:608 +#: 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:612 +#: library/compression.zstd.rst:618 msgid "" "``True`` or ``1`` enable long distance matching while ``False`` or ``0`` " "disable it." msgstr "" -#: library/compression.zstd.rst:615 +#: library/compression.zstd.rst:621 msgid "" "Enabling this parameter increases " "default :attr:`~CompressionParameter.window_log` to 128 MiB except when " @@ -830,55 +838,55 @@ msgid "" ">= :attr:`~Strategy.btopt` (compression level 16+)." msgstr "" -#: library/compression.zstd.rst:623 +#: 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:631 +#: 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:638 +#: 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:646 +#: 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:654 +#: 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:657 +#: library/compression.zstd.rst:663 msgid "This flag only takes effect under the following scenarios:" msgstr "" -#: library/compression.zstd.rst:659 +#: library/compression.zstd.rst:665 msgid "Calling :func:`compress` for one-shot compression" msgstr "" -#: library/compression.zstd.rst:660 +#: 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:663 +#: 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 " @@ -886,44 +894,44 @@ msgid "" "ZstdCompressor.set_pledged_input_size` must be called for each new frame." msgstr "" -#: library/compression.zstd.rst:669 +#: 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:672 +#: 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:677 +#: 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:682 +#: library/compression.zstd.rst:688 msgid "" "``True`` or ``1`` enable checksum generation while ``False`` or ``0`` " "disable it." msgstr "" -#: library/compression.zstd.rst:687 +#: 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:690 +#: 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:695 +#: 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 " @@ -931,11 +939,11 @@ msgid "" "but also increase memory usage and slightly reduce compression ratio." msgstr "" -#: library/compression.zstd.rst:700 +#: library/compression.zstd.rst:706 msgid "A value of zero disables multi-threading." msgstr "" -#: library/compression.zstd.rst:704 +#: 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 " @@ -943,7 +951,7 @@ msgid "" "active threads." msgstr "" -#: library/compression.zstd.rst:713 +#: 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 " @@ -951,43 +959,43 @@ msgid "" "vary from 0 to 9." msgstr "" -#: library/compression.zstd.rst:718 +#: library/compression.zstd.rst:724 msgid "0 means dynamically set the overlap amount" msgstr "" -#: library/compression.zstd.rst:719 +#: library/compression.zstd.rst:725 msgid "1 means no overlap" msgstr "" -#: library/compression.zstd.rst:720 +#: library/compression.zstd.rst:726 msgid "9 means use a full window size from the previous job" msgstr "" -#: library/compression.zstd.rst:722 +#: 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:727 +#: 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:734 +#: library/compression.zstd.rst:740 msgid "Example setting the :attr:`~.window_log_max` to the maximum size::" msgstr "" -#: library/compression.zstd.rst:745 +#: 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:753 +#: 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 " @@ -995,42 +1003,42 @@ msgid "" "decompression." msgstr "" -#: library/compression.zstd.rst:763 +#: 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:769 +#: 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:773 +#: library/compression.zstd.rst:779 msgid "The following strategies are available:" msgstr "" -#: library/compression.zstd.rst:795 +#: library/compression.zstd.rst:801 msgid "Miscellaneous" msgstr "Divers" -#: library/compression.zstd.rst:799 +#: 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:805 +#: library/compression.zstd.rst:811 msgid "Metadata related to a Zstandard frame." msgstr "" -#: library/compression.zstd.rst:809 +#: library/compression.zstd.rst:815 msgid "The size of the decompressed contents of the frame." msgstr "" -#: library/compression.zstd.rst:813 +#: 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 " @@ -1038,40 +1046,40 @@ msgid "" "ID of a required dictionary was not recorded." msgstr "" -#: library/compression.zstd.rst:821 +#: library/compression.zstd.rst:827 msgid "The default compression level for Zstandard: ``3``." msgstr "" -#: library/compression.zstd.rst:826 +#: 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:831 +#: library/compression.zstd.rst:837 msgid "Examples" msgstr "Exemples" -#: library/compression.zstd.rst:833 +#: library/compression.zstd.rst:839 msgid "Reading in a compressed file:" msgstr "" -#: library/compression.zstd.rst:842 +#: library/compression.zstd.rst:848 msgid "Creating a compressed file:" msgstr "" -#: library/compression.zstd.rst:852 +#: library/compression.zstd.rst:858 msgid "Compressing data in memory:" msgstr "" -#: library/compression.zstd.rst:861 +#: library/compression.zstd.rst:867 msgid "Incremental compression:" msgstr "" -#: library/compression.zstd.rst:875 +#: library/compression.zstd.rst:881 msgid "Writing compressed data to an already-open file:" msgstr "" -#: library/compression.zstd.rst:887 +#: 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 d769231837..372d8b3e28 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 81d4ba6ce9..0ce402f61f 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: 2025-10-17 09:58+0200\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 "" #: 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 "" @@ -40,6 +40,14 @@ msgid "" "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 "Disponibilité" @@ -50,28 +58,28 @@ msgid "" "availability` for more information." msgstr "" -#: library/concurrent.futures.rst:27 +#: library/concurrent.futures.rst:32 msgid "Executor Objects" msgstr "" -#: library/concurrent.futures.rst:31 +#: 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:36 +#: 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:46 +#: library/concurrent.futures.rst:51 msgid "Similar to :func:`map(fn, *iterables) ` except:" msgstr "" -#: library/concurrent.futures.rst:48 +#: 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 " @@ -79,13 +87,13 @@ msgid "" "*iterables* pauses until a result is yielded from the buffer." msgstr "" -#: library/concurrent.futures.rst:53 +#: library/concurrent.futures.rst:58 msgid "" "*fn* is executed asynchronously and several calls to *fn* may be made " "concurrently." msgstr "" -#: library/concurrent.futures.rst:56 +#: 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 " @@ -94,13 +102,13 @@ msgid "" "is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:62 +#: 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:65 +#: 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 " @@ -111,15 +119,15 @@ msgid "" "and :class:`InterpreterPoolExecutor`, *chunksize* has no effect." msgstr "" -#: library/concurrent.futures.rst:74 +#: library/concurrent.futures.rst:79 msgid "Added the *chunksize* parameter." msgstr "" -#: library/concurrent.futures.rst:77 +#: library/concurrent.futures.rst:82 msgid "Added the *buffersize* parameter." msgstr "" -#: library/concurrent.futures.rst:82 +#: 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 " @@ -127,7 +135,7 @@ msgid "" "raise :exc:`RuntimeError`." msgstr "" -#: library/concurrent.futures.rst:87 +#: 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 " @@ -138,21 +146,21 @@ msgid "" "are done executing." msgstr "" -#: library/concurrent.futures.rst:95 +#: 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:100 +#: 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:104 +#: library/concurrent.futures.rst:109 msgid "" "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 " @@ -160,37 +168,37 @@ msgid "" "called with *wait* set to ``True``)::" msgstr "" -#: library/concurrent.futures.rst:116 +#: library/concurrent.futures.rst:121 msgid "Added *cancel_futures*." msgstr "" -#: library/concurrent.futures.rst:121 +#: library/concurrent.futures.rst:126 msgid "ThreadPoolExecutor" msgstr "ThreadPoolExecutor" -#: library/concurrent.futures.rst:123 +#: 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:126 +#: 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:145 +#: library/concurrent.futures.rst:150 msgid "And::" msgstr "Et ::" -#: library/concurrent.futures.rst:159 +#: 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:162 +#: 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 " @@ -200,7 +208,7 @@ msgid "" "``ThreadPoolExecutor`` not be used for long-running tasks." msgstr "" -#: library/concurrent.futures.rst:169 +#: 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 " @@ -209,7 +217,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: library/concurrent.futures.rst:175 +#: 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 " @@ -218,18 +226,18 @@ msgid "" "for :class:`ProcessPoolExecutor`." msgstr "" -#: library/concurrent.futures.rst:183 +#: 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." msgstr "" -#: library/concurrent.futures.rst:188 library/concurrent.futures.rst:391 +#: library/concurrent.futures.rst:195 library/concurrent.futures.rst:405 msgid "Added the *initializer* and *initargs* arguments." msgstr "" -#: library/concurrent.futures.rst:191 +#: 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. " @@ -237,28 +245,28 @@ msgid "" "And it avoids using very large resources implicitly on many-core machines." msgstr "" -#: library/concurrent.futures.rst:197 +#: library/concurrent.futures.rst:204 msgid "" "ThreadPoolExecutor now reuses idle worker threads before starting " "*max_workers* worker threads too." msgstr "" -#: library/concurrent.futures.rst:200 +#: library/concurrent.futures.rst:207 msgid "" "Default value of *max_workers* is changed to ``min(32, " "(os.process_cpu_count() or 1) + 4)``." msgstr "" -#: library/concurrent.futures.rst:208 +#: library/concurrent.futures.rst:215 msgid "ThreadPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:240 +#: library/concurrent.futures.rst:247 #, fuzzy msgid "InterpreterPoolExecutor" msgstr "ThreadPoolExecutor" -#: library/concurrent.futures.rst:242 +#: 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, " @@ -267,7 +275,7 @@ msgid "" "interpreter." msgstr "" -#: library/concurrent.futures.rst:248 +#: 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 " @@ -276,7 +284,7 @@ msgid "" "unblocked on a different core." msgstr "" -#: library/concurrent.futures.rst:254 +#: 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 " @@ -289,7 +297,7 @@ msgid "" "conditions." msgstr "" -#: library/concurrent.futures.rst:264 +#: 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 " @@ -303,7 +311,7 @@ msgid "" "``__main__``." msgstr "" -#: library/concurrent.futures.rst:276 +#: 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 " @@ -313,7 +321,7 @@ msgid "" "strings, and tuples of immutable objects, don't have these limitations." msgstr "" -#: library/concurrent.futures.rst:284 +#: 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 " @@ -321,7 +329,7 @@ msgid "" "bytes over a shared :mod:`socket ` or :func:`pipe `." msgstr "" -#: library/concurrent.futures.rst:292 +#: 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 " @@ -332,7 +340,7 @@ msgid "" "executor has true multi-core parallelism." msgstr "" -#: library/concurrent.futures.rst:300 +#: 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 " @@ -341,17 +349,17 @@ msgid "" "when sending them to the worker's interpreter." msgstr "" -#: library/concurrent.futures.rst:308 +#: library/concurrent.futures.rst:317 msgid "" "The executor may replace uncaught exceptions from *initializer* " -"with :class:`~concurrent.futures.interpreter.ExecutionFailed`." +"with :class:`~concurrent.interpreters.ExecutionFailed`." msgstr "" -#: library/concurrent.futures.rst:311 +#: library/concurrent.futures.rst:320 msgid "Other caveats from parent :class:`ThreadPoolExecutor` apply here." msgstr "" -#: library/concurrent.futures.rst:313 +#: 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 " @@ -359,24 +367,24 @@ msgid "" "value when sending it back." msgstr "" -#: library/concurrent.futures.rst:318 +#: 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.futures.interpreter.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.futures.interpreter.ExecutionFailed` " -"instance instead." +"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:330 +#: library/concurrent.futures.rst:339 msgid "ProcessPoolExecutor" msgstr "ProcessPoolExecutor" -#: library/concurrent.futures.rst:332 +#: library/concurrent.futures.rst:341 msgid "" "The :class:`ProcessPoolExecutor` class is an :class:`Executor` subclass that " "uses a pool of processes to execute calls " @@ -386,20 +394,20 @@ msgid "" "executed and returned." msgstr "" -#: library/concurrent.futures.rst:339 +#: 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:342 +#: 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:345 +#: library/concurrent.futures.rst:354 msgid "" "Note that the restrictions on functions and arguments needing to picklable " "as per :class:`multiprocessing.Process` apply when " @@ -408,7 +416,7 @@ msgid "" "should not be expected to work." msgstr "" -#: library/concurrent.futures.rst:352 +#: 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 " @@ -423,7 +431,7 @@ msgid "" "See :ref:`multiprocessing-start-methods`." msgstr "" -#: library/concurrent.futures.rst:366 +#: 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 " @@ -432,7 +440,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: library/concurrent.futures.rst:372 +#: 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 " @@ -443,7 +451,14 @@ msgid "" "with the \"fork\" start method." msgstr "" -#: library/concurrent.futures.rst:380 +#: library/concurrent.futures.rst:390 +msgid "" +"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:394 msgid "" "When one of the worker processes terminates abruptly, " "a :exc:`~concurrent.futures.process.BrokenProcessPool` error is now raised. " @@ -451,19 +466,19 @@ msgid "" "futures would often freeze or deadlock." msgstr "" -#: library/concurrent.futures.rst:387 +#: library/concurrent.futures.rst:401 msgid "" "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:393 +#: 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:397 +#: 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: " @@ -473,13 +488,13 @@ msgid "" "explanation." msgstr "" -#: library/concurrent.futures.rst:405 +#: 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:409 +#: library/concurrent.futures.rst:423 msgid "" "The default process start method (see :ref:`multiprocessing-start-methods`) " "changed away from *fork*. If you require the *fork* start method " @@ -487,7 +502,7 @@ msgid "" "``mp_context=multiprocessing.get_context(\"fork\")``." msgstr "" -#: library/concurrent.futures.rst:417 +#: library/concurrent.futures.rst:431 msgid "" "Attempt to terminate all living worker processes immediately by " "calling :meth:`Process.terminate ` on " @@ -495,13 +510,13 @@ msgid "" "ensure that all other resources associated with the executor are freed." msgstr "" -#: library/concurrent.futures.rst:422 library/concurrent.futures.rst:434 +#: 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:429 +#: library/concurrent.futures.rst:443 msgid "" "Attempt to kill all living worker processes immediately by " "calling :meth:`Process.kill ` on each of them. " @@ -509,28 +524,28 @@ msgid "" "other resources associated with the executor are freed." msgstr "" -#: library/concurrent.futures.rst:442 +#: library/concurrent.futures.rst:456 msgid "ProcessPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:480 +#: library/concurrent.futures.rst:494 msgid "Future Objects" msgstr "" -#: library/concurrent.futures.rst:482 +#: 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:487 +#: 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:493 +#: 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 " @@ -538,22 +553,22 @@ msgid "" "``True``." msgstr "" -#: library/concurrent.futures.rst:500 +#: library/concurrent.futures.rst:514 msgid "Return ``True`` if the call was successfully cancelled." msgstr "" -#: library/concurrent.futures.rst:504 +#: library/concurrent.futures.rst:518 msgid "" "Return ``True`` if the call is currently being executed and cannot be " "cancelled." msgstr "" -#: library/concurrent.futures.rst:509 +#: library/concurrent.futures.rst:523 msgid "" "Return ``True`` if the call was successfully cancelled or finished running." msgstr "" -#: library/concurrent.futures.rst:514 +#: 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 " @@ -562,18 +577,18 @@ msgid "" "no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:521 library/concurrent.futures.rst:535 +#: 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:524 +#: library/concurrent.futures.rst:538 msgid "" "If the call raised an exception, this method will raise the same exception." msgstr "" -#: library/concurrent.futures.rst:528 +#: 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 " @@ -582,18 +597,18 @@ msgid "" "``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:538 +#: library/concurrent.futures.rst:552 msgid "If the call completed without raising, ``None`` is returned." msgstr "" -#: library/concurrent.futures.rst:542 +#: 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:546 +#: 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 " @@ -602,26 +617,26 @@ msgid "" "behavior is undefined." msgstr "" -#: library/concurrent.futures.rst:552 +#: 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:555 +#: library/concurrent.futures.rst:569 msgid "" "The following :class:`Future` methods are meant for use in unit tests " "and :class:`Executor` implementations." msgstr "" -#: library/concurrent.futures.rst:560 +#: 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:564 +#: 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 " @@ -629,48 +644,48 @@ msgid "" "or :func:`wait`) will be woken up." msgstr "" -#: library/concurrent.futures.rst:569 +#: 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:573 +#: 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." msgstr "" -#: library/concurrent.futures.rst:579 +#: library/concurrent.futures.rst:593 msgid "" "Sets the result of the work associated with the :class:`Future` to *result*." msgstr "" -#: library/concurrent.futures.rst:582 library/concurrent.futures.rst:595 +#: 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:585 library/concurrent.futures.rst:598 +#: 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." msgstr "" -#: library/concurrent.futures.rst:592 +#: library/concurrent.futures.rst:606 msgid "" "Sets the result of the work associated with the :class:`Future` to " "the :class:`Exception` *exception*." msgstr "" -#: library/concurrent.futures.rst:604 +#: library/concurrent.futures.rst:618 msgid "Module Functions" msgstr "" -#: library/concurrent.futures.rst:608 +#: 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 " @@ -681,14 +696,14 @@ msgid "" "complete (pending or running futures)." msgstr "" -#: library/concurrent.futures.rst:616 +#: 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:620 +#: library/concurrent.futures.rst:634 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -696,20 +711,20 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/concurrent.futures.rst:626 +#: library/concurrent.futures.rst:640 msgid "Constant" msgstr "Constante" -#: library/concurrent.futures.rst:627 +#: library/concurrent.futures.rst:641 msgid "Description" msgstr "Description" -#: library/concurrent.futures.rst:630 +#: 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:633 +#: library/concurrent.futures.rst:647 #, fuzzy msgid "" "The function will return when any future finishes by raising an exception. " @@ -720,12 +735,12 @@ msgstr "" "exception. Si aucun *futur* ne lève d'exception, équivaut " "à :const:`ALL_COMPLETED`." -#: library/concurrent.futures.rst:638 +#: 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:642 +#: 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 " @@ -738,55 +753,55 @@ msgid "" "*timeout* is not specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:655 +#: library/concurrent.futures.rst:669 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: library/concurrent.futures.rst:656 +#: library/concurrent.futures.rst:670 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: library/concurrent.futures.rst:661 +#: library/concurrent.futures.rst:675 msgid "Exception classes" msgstr "" -#: library/concurrent.futures.rst:667 +#: library/concurrent.futures.rst:681 msgid "Raised when a future is cancelled." msgstr "" -#: library/concurrent.futures.rst:671 +#: 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:676 +#: 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:681 +#: 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:689 +#: 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:698 +#: 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." msgstr "" -#: library/concurrent.futures.rst:709 +#: library/concurrent.futures.rst:723 msgid "" "Derived from :exc:`~concurrent.futures.thread.BrokenThreadPool`, this " "exception class is raised when one of the workers of " @@ -794,14 +809,7 @@ msgid "" "initializing." msgstr "" -#: library/concurrent.futures.rst:718 -msgid "" -"Raised from :class:`~concurrent.futures.InterpreterPoolExecutor` when the " -"given initializer fails or from :meth:`~concurrent.futures.Executor.submit` " -"when there's an uncaught exception from the submitted task." -msgstr "" - -#: library/concurrent.futures.rst:729 +#: library/concurrent.futures.rst:734 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor` " "(formerly :exc:`RuntimeError`), this exception class is raised when one of " diff --git a/library/concurrent.interpreters.po b/library/concurrent.interpreters.po index a7d7be6006..18ffb20b87 100644 --- a/library/concurrent.interpreters.po +++ b/library/concurrent.interpreters.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,17 +20,17 @@ msgid "" ":mod:`!concurrent.interpreters` --- Multiple interpreters in the same process" msgstr "" -#: library/concurrent.interpreters.rst:12 +#: library/concurrent.interpreters.rst:9 msgid "**Source code:** :source:`Lib/concurrent/interpreters`" msgstr "" -#: library/concurrent.interpreters.rst:16 +#: 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:19 +#: 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 " @@ -39,7 +38,7 @@ msgid "" "calling a function in that execution context." msgstr "" -#: library/concurrent.interpreters.rst:24 +#: 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 " @@ -47,31 +46,31 @@ msgid "" "`_" msgstr "" -#: library/concurrent.interpreters.rst:31 +#: library/concurrent.interpreters.rst:28 msgid ":class:`~concurrent.futures.InterpreterPoolExecutor`" msgstr "" -#: library/concurrent.interpreters.rst:32 -msgid "combines threads with interpreters in a familiar interface." +#: library/concurrent.interpreters.rst:29 +msgid "Combines threads with interpreters in a familiar interface." msgstr "" -#: library/concurrent.interpreters.rst:36 +#: library/concurrent.interpreters.rst:33 msgid ":ref:`isolating-extensions-howto`" msgstr "" -#: library/concurrent.interpreters.rst:37 -msgid "how to update an extension module to support multiple interpreters" +#: library/concurrent.interpreters.rst:34 +msgid "How to update an extension module to support multiple interpreters." msgstr "" -#: library/concurrent.interpreters.rst:39 +#: library/concurrent.interpreters.rst:36 msgid ":pep:`554`" msgstr "" -#: library/concurrent.interpreters.rst:41 +#: library/concurrent.interpreters.rst:38 msgid ":pep:`734`" msgstr "" -#: library/concurrent.interpreters.rst:43 +#: library/concurrent.interpreters.rst:40 msgid ":pep:`684`" msgstr "" @@ -85,33 +84,33 @@ msgid "" "availability` for more information." msgstr "" -#: library/concurrent.interpreters.rst:51 +#: library/concurrent.interpreters.rst:48 msgid "Key details" msgstr "" -#: library/concurrent.interpreters.rst:53 +#: 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:56 +#: library/concurrent.interpreters.rst:53 msgid "`isolated `_, by default" msgstr "" -#: library/concurrent.interpreters.rst:57 +#: library/concurrent.interpreters.rst:54 msgid "no implicit threads" msgstr "" -#: library/concurrent.interpreters.rst:58 +#: library/concurrent.interpreters.rst:55 msgid "not all PyPI packages support use in multiple interpreters yet" msgstr "" -#: library/concurrent.interpreters.rst:66 +#: library/concurrent.interpreters.rst:63 msgid "Introduction" msgstr "Introduction" -#: library/concurrent.interpreters.rst:68 +#: 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 " @@ -121,7 +120,7 @@ msgid "" "the bytecode eval loop.)" msgstr "" -#: library/concurrent.interpreters.rst:75 +#: 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 " @@ -129,11 +128,11 @@ msgid "" "incomplete until version 3.12." msgstr "" -#: library/concurrent.interpreters.rst:83 +#: library/concurrent.interpreters.rst:80 msgid "Multiple Interpreters and Isolation" msgstr "" -#: library/concurrent.interpreters.rst:85 +#: 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 " @@ -141,14 +140,14 @@ msgid "" "global exceptions to the rule)." msgstr "" -#: library/concurrent.interpreters.rst:90 +#: 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:96 +#: 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 " @@ -158,11 +157,11 @@ msgid "" "access to each other's data." msgstr "" -#: library/concurrent.interpreters.rst:104 +#: library/concurrent.interpreters.rst:101 msgid "Running in an Interpreter" msgstr "" -#: library/concurrent.interpreters.rst:106 +#: 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 " @@ -171,14 +170,14 @@ msgid "" "managing interpreters, as well as the switch-and-call operation." msgstr "" -#: library/concurrent.interpreters.rst:113 +#: 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:118 +#: 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\" " @@ -187,11 +186,11 @@ msgid "" "in the :mod:`!__main__` module." msgstr "" -#: library/concurrent.interpreters.rst:128 +#: library/concurrent.interpreters.rst:125 msgid "Concurrency and Parallelism" msgstr "" -#: library/concurrent.interpreters.rst:130 +#: 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 " @@ -199,7 +198,7 @@ msgid "" "but they still enjoy in-process efficiency, like threads." msgstr "" -#: library/concurrent.interpreters.rst:136 +#: 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 " @@ -208,7 +207,7 @@ msgid "" "relatively easy to reason about." msgstr "" -#: library/concurrent.interpreters.rst:143 +#: 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, " @@ -217,20 +216,20 @@ msgid "" "another interpreter and run what you want there." msgstr "" -#: library/concurrent.interpreters.rst:149 +#: 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:153 +#: 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:156 +#: 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 " @@ -238,29 +237,29 @@ msgid "" "since Python 3.12.)" msgstr "" -#: library/concurrent.interpreters.rst:162 +#: library/concurrent.interpreters.rst:159 msgid "Communication Between Interpreters" msgstr "" -#: library/concurrent.interpreters.rst:164 +#: 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:169 +#: 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:176 +#: library/concurrent.interpreters.rst:173 msgid "\"Sharing\" Objects" msgstr "" -#: library/concurrent.interpreters.rst:178 +#: 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 " @@ -270,219 +269,219 @@ msgid "" "sync." msgstr "" -#: library/concurrent.interpreters.rst:185 +#: 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:189 +#: library/concurrent.interpreters.rst:186 msgid ":const:`None`" msgstr ":const:`None`" -#: library/concurrent.interpreters.rst:190 +#: library/concurrent.interpreters.rst:187 msgid ":class:`bool` (:const:`True` and :const:`False`)" msgstr "" -#: library/concurrent.interpreters.rst:191 +#: library/concurrent.interpreters.rst:188 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: library/concurrent.interpreters.rst:192 +#: library/concurrent.interpreters.rst:189 msgid ":class:`str`" msgstr ":class:`str`" -#: library/concurrent.interpreters.rst:193 +#: library/concurrent.interpreters.rst:190 msgid ":class:`int`" msgstr ":class:`int`" -#: library/concurrent.interpreters.rst:194 +#: library/concurrent.interpreters.rst:191 msgid ":class:`float`" msgstr ":class:`float`" -#: library/concurrent.interpreters.rst:195 +#: library/concurrent.interpreters.rst:192 msgid ":class:`tuple` (of similarly supported objects)" msgstr "" -#: library/concurrent.interpreters.rst:197 +#: 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:200 +#: library/concurrent.interpreters.rst:197 msgid ":class:`memoryview`" msgstr ":class:`memoryview`" -#: library/concurrent.interpreters.rst:201 +#: library/concurrent.interpreters.rst:198 msgid ":class:`Queue`" msgstr ":class:`Queue`" -#: library/concurrent.interpreters.rst:205 +#: library/concurrent.interpreters.rst:202 msgid "Reference" msgstr "Référence" -#: library/concurrent.interpreters.rst:207 +#: library/concurrent.interpreters.rst:204 msgid "This module defines the following functions:" msgstr "Ce module définit les fonctions suivantes :" -#: library/concurrent.interpreters.rst:211 +#: library/concurrent.interpreters.rst:208 msgid "" "Return a :class:`list` of :class:`Interpreter` objects, one for each " "existing interpreter." msgstr "" -#: library/concurrent.interpreters.rst:216 +#: library/concurrent.interpreters.rst:213 msgid "" "Return an :class:`Interpreter` object for the currently running interpreter." msgstr "" -#: library/concurrent.interpreters.rst:221 +#: 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:227 +#: 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:232 +#: 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:237 +#: library/concurrent.interpreters.rst:234 msgid "Interpreter objects" msgstr "" -#: library/concurrent.interpreters.rst:241 +#: library/concurrent.interpreters.rst:238 msgid "A single interpreter in the current process." msgstr "" -#: library/concurrent.interpreters.rst:243 +#: 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:248 -#: library/concurrent.interpreters.rst:254 -#: library/concurrent.interpreters.rst:333 +#: library/concurrent.interpreters.rst:245 +#: library/concurrent.interpreters.rst:251 +#: library/concurrent.interpreters.rst:330 msgid "(read-only)" msgstr "" -#: library/concurrent.interpreters.rst:250 +#: library/concurrent.interpreters.rst:247 msgid "The underlying interpreter's ID." msgstr "" -#: library/concurrent.interpreters.rst:256 +#: library/concurrent.interpreters.rst:253 msgid "A string describing where the interpreter came from." msgstr "" -#: library/concurrent.interpreters.rst:260 +#: 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:265 +#: library/concurrent.interpreters.rst:262 msgid "Finalize and destroy the interpreter." msgstr "" -#: library/concurrent.interpreters.rst:269 +#: library/concurrent.interpreters.rst:266 msgid "Bind objects in the interpreter's :mod:`!__main__` module." msgstr "" -#: library/concurrent.interpreters.rst:271 -#: library/concurrent.interpreters.rst:328 +#: 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:276 +#: library/concurrent.interpreters.rst:273 msgid "Run the given source code in the interpreter (in the current thread)." msgstr "" -#: library/concurrent.interpreters.rst:280 +#: 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:287 +#: library/concurrent.interpreters.rst:284 msgid "Run the given function in the interpreter (in a new thread)." msgstr "" -#: library/concurrent.interpreters.rst:290 +#: library/concurrent.interpreters.rst:287 msgid "Exceptions" msgstr "Exceptions" -#: library/concurrent.interpreters.rst:294 +#: 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:299 +#: 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:304 +#: 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:309 +#: library/concurrent.interpreters.rst:306 msgid "A basic snapshot of the exception raised in the other interpreter." msgstr "" -#: library/concurrent.interpreters.rst:315 +#: 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:320 +#: library/concurrent.interpreters.rst:317 msgid "Communicating Between Interpreters" msgstr "" -#: library/concurrent.interpreters.rst:324 +#: 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:335 +#: library/concurrent.interpreters.rst:332 msgid "The queue's ID." msgstr "" -#: library/concurrent.interpreters.rst:340 +#: 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:346 +#: 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:352 +#: library/concurrent.interpreters.rst:349 msgid "Basic usage" msgstr "Utilisation de base" -#: library/concurrent.interpreters.rst:354 +#: library/concurrent.interpreters.rst:351 msgid "Creating an interpreter and running code in it::" msgstr "" diff --git a/library/configparser.po b/library/configparser.po index 362d2c0cf2..d82d49cff4 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: 2025-10-17 09:58+0200\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,7 +152,7 @@ msgstr "" "l’intérieur des sections ne sont pas sensibles à la casse et qu'elles sont " "stockées en minuscules. [1]_." -#: library/configparser.rst:1003 +#: library/configparser.rst:1001 msgid "" "It is possible to read several configurations into a " "single :class:`ConfigParser`, where the most recently added configuration " @@ -161,7 +169,7 @@ msgstr "" "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." @@ -169,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 " @@ -184,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 " @@ -205,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` " @@ -218,11 +226,11 @@ msgstr "" "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` " @@ -231,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 " @@ -246,7 +254,7 @@ 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-" @@ -259,7 +267,7 @@ msgstr "" "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` " @@ -269,11 +277,11 @@ msgstr "" "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]`` " @@ -298,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`." @@ -307,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 " @@ -315,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 " @@ -326,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 " @@ -354,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, " @@ -367,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 " @@ -384,7 +392,7 @@ 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/" @@ -394,7 +402,7 @@ msgstr "" "(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 " @@ -411,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:" @@ -419,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 " @@ -441,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 " @@ -456,9 +465,10 @@ 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 " +":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:" @@ -469,7 +479,7 @@ msgstr "" "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 " @@ -483,7 +493,7 @@ 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 " @@ -501,25 +511,25 @@ msgstr "" "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 " @@ -530,7 +540,7 @@ 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). " @@ -547,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 " @@ -557,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." @@ -576,7 +587,7 @@ 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 " @@ -586,11 +597,11 @@ msgstr "" "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 " @@ -603,7 +614,7 @@ 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, " @@ -613,11 +624,11 @@ msgstr "" "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, " @@ -630,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." @@ -638,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 " @@ -648,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 " @@ -665,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 " @@ -680,7 +692,7 @@ 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`." @@ -688,19 +700,19 @@ msgstr "" "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 " @@ -718,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 " @@ -744,11 +757,11 @@ 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 " @@ -763,19 +776,20 @@ msgstr "" "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 " @@ -792,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 " @@ -807,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\"``)" @@ -815,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, " @@ -842,12 +856,12 @@ 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 " @@ -864,11 +878,11 @@ 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`, " @@ -894,7 +908,7 @@ msgstr "" "``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 " @@ -907,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 " @@ -918,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'``, " @@ -933,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 " @@ -947,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 " @@ -963,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:953 +#: 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 " @@ -1013,7 +1027,7 @@ msgid "" "the options within a section, and for the default values." msgstr "" -#: library/configparser.rst:958 +#: 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 " @@ -1022,7 +1036,7 @@ msgid "" "as the set of substrings that prefix comments in non-empty lines." msgstr "" -#: library/configparser.rst:964 +#: 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, " @@ -1035,7 +1049,7 @@ msgid "" "serialized without the trailing delimiter." msgstr "" -#: library/configparser.rst:974 +#: 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 " @@ -1045,7 +1059,7 @@ msgid "" "settings to a new config file." msgstr "" -#: library/configparser.rst:981 +#: 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 " @@ -1054,7 +1068,7 @@ msgid "" "`dedicated documentation section <#interpolation-of-values>`_." msgstr "" -#: library/configparser.rst:987 +#: 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. " @@ -1063,7 +1077,7 @@ msgid "" "(BAR)s`` are equivalent." msgstr "" -#: library/configparser.rst:993 +#: 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 " @@ -1072,61 +1086,61 @@ msgid "" "object and section proxies." msgstr "" -#: library/configparser.rst:999 +#: 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:1028 +#: library/configparser.rst:1026 msgid "The default *dict_type* is :class:`collections.OrderedDict`." msgstr "" -#: library/configparser.rst:1324 +#: 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:1329 +#: library/configparser.rst:1327 msgid "The *converters* argument was added." msgstr "" -#: library/configparser.rst:1039 +#: 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:1332 +#: library/configparser.rst:1330 msgid "" "The default *dict_type* is :class:`dict`, since it now preserves insertion " "order." msgstr "" -#: library/configparser.rst:1048 +#: 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:1336 +#: library/configparser.rst:1334 msgid "The *allow_unnamed_section* argument was added." msgstr "" -#: library/configparser.rst:1057 +#: library/configparser.rst:1055 msgid "Return a dictionary containing the instance-wide defaults." msgstr "" -#: library/configparser.rst:1062 +#: 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:1068 +#: 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 " @@ -1134,34 +1148,34 @@ msgid "" "the section must be a string; if not, :exc:`TypeError` is raised." msgstr "" -#: library/configparser.rst:1073 +#: library/configparser.rst:1071 msgid "Non-string section names raise :exc:`TypeError`." msgstr "" -#: library/configparser.rst:1079 +#: 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:1085 +#: library/configparser.rst:1083 msgid "Return a list of options available in the specified *section*." msgstr "" -#: library/configparser.rst:1090 +#: 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." msgstr "" -#: library/configparser.rst:1097 +#: 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:1100 +#: 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* " @@ -1172,7 +1186,7 @@ msgid "" "be read." msgstr "" -#: library/configparser.rst:1109 +#: 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 " @@ -1180,52 +1194,52 @@ msgid "" "using :meth:`read_file` before calling :meth:`read` for any optional files::" msgstr "" -#: library/configparser.rst:1122 +#: 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:1126 +#: 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:1129 +#: library/configparser.rst:1127 msgid "The *filenames* parameter accepts a :class:`bytes` object." msgstr "" -#: library/configparser.rst:1135 +#: 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:1138 +#: 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:1142 +#: library/configparser.rst:1140 msgid "Replaces :meth:`!readfp`." msgstr "" -#: library/configparser.rst:1147 +#: library/configparser.rst:1145 msgid "Parse configuration data from a string." msgstr "" -#: library/configparser.rst:1149 +#: 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:1158 +#: 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 " @@ -1234,17 +1248,17 @@ msgid "" "automatically converted to strings." msgstr "" -#: library/configparser.rst:1164 +#: 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:1167 +#: library/configparser.rst:1165 msgid "This method can be used to copy state between parsers." msgstr "" -#: library/configparser.rst:1174 +#: 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), " @@ -1253,35 +1267,35 @@ msgid "" "provided as a *fallback* value." msgstr "" -#: library/configparser.rst:1180 +#: 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:1184 +#: 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:1192 +#: 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:1199 +#: 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:1206 +#: 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 " @@ -1293,34 +1307,34 @@ msgid "" "and *fallback*." msgstr "" -#: library/configparser.rst:1219 +#: 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:1222 +#: 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." msgstr "" -#: library/configparser.rst:1226 +#: 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:1234 +#: 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:1241 +#: 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 " @@ -1329,33 +1343,33 @@ msgid "" "surrounded by spaces." msgstr "" -#: library/configparser.rst:1247 +#: 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:1253 +#: 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:1261 +#: 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:1269 +#: 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:1275 +#: 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 " @@ -1364,7 +1378,7 @@ msgid "" "of this name on instances to affect this behavior." msgstr "" -#: library/configparser.rst:1281 +#: 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 " @@ -1372,30 +1386,30 @@ msgid "" "sensitive::" msgstr "" -#: library/configparser.rst:1289 +#: 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:1295 +#: 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:1300 +#: 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." msgstr "" -#: library/configparser.rst:1308 +#: library/configparser.rst:1306 msgid "RawConfigParser Objects" msgstr "" -#: library/configparser.rst:1319 +#: 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 " @@ -1403,19 +1417,19 @@ msgid "" "``defaults=`` keyword argument handling." msgstr "" -#: library/configparser.rst:1340 +#: 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:1347 +#: library/configparser.rst:1345 msgid "" "Add a section named *section* or :const:`UNNAMED_SECTION` to the instance." msgstr "" -#: library/configparser.rst:1349 +#: 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. " @@ -1423,17 +1437,17 @@ msgid "" "disabled, :exc:`UnnamedSectionDisabledError` is raised." msgstr "" -#: library/configparser.rst:1354 +#: 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:1357 +#: library/configparser.rst:1355 msgid "Added support for :const:`UNNAMED_SECTION`." msgstr "" -#: library/configparser.rst:1363 +#: 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 " @@ -1443,7 +1457,7 @@ msgid "" "string values." msgstr "" -#: library/configparser.rst:1370 +#: 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 " @@ -1451,32 +1465,32 @@ msgid "" "not allow such assignments to take place." msgstr "" -#: library/configparser.rst:1377 +#: library/configparser.rst:1375 msgid "Exceptions" msgstr "Exceptions" -#: library/configparser.rst:1381 -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:1386 +#: library/configparser.rst:1384 msgid "Exception raised when a specified section is not found." msgstr "" -#: library/configparser.rst:1391 +#: 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:1395 +#: library/configparser.rst:1393 msgid "" "Added the optional *source* and *lineno* attributes and parameters " "to :meth:`!__init__`." msgstr "" -#: library/configparser.rst:1402 +#: 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 " @@ -1484,83 +1498,83 @@ msgid "" "representing the same case-insensitive configuration key." msgstr "" -#: library/configparser.rst:1410 +#: library/configparser.rst:1408 msgid "" "Exception raised when a specified option is not found in the specified " "section." msgstr "" -#: library/configparser.rst:1416 +#: library/configparser.rst:1414 msgid "" "Base class for exceptions raised when problems occur performing string " "interpolation." msgstr "" -#: library/configparser.rst:1422 +#: 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`." msgstr "" -#: library/configparser.rst:1429 +#: 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:1435 +#: 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:1441 +#: library/configparser.rst:1439 msgid "" "Exception raised when attempting to parse a file which has no section " "headers." msgstr "" -#: library/configparser.rst:1446 +#: library/configparser.rst:1444 msgid "Exception raised when errors occur attempting to parse a file." msgstr "" -#: library/configparser.rst:1448 +#: 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:1454 +#: library/configparser.rst:1452 msgid "" "Exception raised when a key without a corresponding value is continued with " "an indented line." msgstr "" -#: library/configparser.rst:1461 +#: library/configparser.rst:1459 msgid "" "Exception raised when attempting to use the :const:`UNNAMED_SECTION` without " "enabling it." msgstr "" -#: library/configparser.rst:1468 +#: 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:1471 +#: 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:1478 +#: library/configparser.rst:1476 msgid "Footnotes" msgstr "Notes" -#: library/configparser.rst:1479 +#: 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 4405b5b288..7fe9af20ab 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: 2025-10-17 09:58+0200\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,7 +47,7 @@ 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 " @@ -64,8 +64,8 @@ msgid "" "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." +"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 " @@ -131,7 +131,7 @@ msgid "" "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 :data:`types.EllipsisType` type." +"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 " diff --git a/library/contextlib.po b/library/contextlib.po index 3e99555bd7..6367e78db0 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: 2025-10-17 09:58+0200\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" @@ -45,11 +45,12 @@ 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 " +"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 "" @@ -61,12 +62,13 @@ msgstr "" "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-" +"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 " @@ -286,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 " @@ -364,18 +367,20 @@ msgid "" 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." #: 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." @@ -385,8 +390,8 @@ msgstr "" 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 " +"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 " @@ -420,9 +425,10 @@ 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-" @@ -452,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." @@ -470,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)." @@ -498,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::" @@ -506,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` " @@ -519,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 "" -"Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " -"asynchrone." -#: library/contextlib.rst:476 +#: 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 "" + +#: 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 " @@ -543,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::" @@ -551,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 " @@ -570,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 " @@ -580,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 " @@ -596,7 +646,7 @@ msgstr "" "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 " @@ -608,7 +658,7 @@ 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 " @@ -619,7 +669,7 @@ msgstr "" "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." @@ -628,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 " @@ -643,7 +699,7 @@ 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 " @@ -654,7 +710,7 @@ msgstr "" "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 " @@ -667,7 +723,7 @@ msgstr "" "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 " @@ -677,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." @@ -685,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." @@ -693,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)." @@ -702,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." @@ -710,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 " @@ -722,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::" @@ -730,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 " @@ -741,7 +801,7 @@ 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 " @@ -753,7 +813,7 @@ msgstr "" "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 " @@ -762,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:635 +#: library/contextlib.rst:678 #, fuzzy msgid "" "Similar to :meth:`ExitStack.enter_context` but expects an asynchronous " @@ -771,13 +831,19 @@ msgstr "" "Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " "asynchrone." -#: library/contextlib.rst:638 +#: library/contextlib.rst:681 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not an " "asynchronous context manager." msgstr "" -#: library/contextlib.rst:644 +#: 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 " @@ -786,38 +852,43 @@ msgstr "" "Similaire à :meth:`push` mais attend soit un gestionnaire de contexte " "asynchrone soit une fonction coroutine." -#: library/contextlib.rst:649 +#: 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:654 +#: 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:656 +#: library/contextlib.rst:705 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "En continuité de l'exemple de :func:`asynccontextmanager` ::" -#: library/contextlib.rst:668 +#: library/contextlib.rst:717 msgid "Examples and Recipes" msgstr "Exemples et Recettes" -#: library/contextlib.rst:670 +#: 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:675 +#: 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:677 +#: 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 " @@ -834,7 +905,7 @@ msgstr "" "(comme ouvrir une collection spécifique de fichiers de l'utilisateur), ou de " "certains gestionnaires de contexte qui peuvent être optionnels ::" -#: library/contextlib.rst:692 +#: 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 " @@ -844,17 +915,19 @@ 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:698 +#: library/contextlib.rst:747 msgid "Catching exceptions from ``__enter__`` methods" msgstr "Attraper des exceptions depuis les méthodes ``__enter__``" -#: library/contextlib.rst:700 +#: 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 " @@ -863,7 +936,7 @@ msgstr "" "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:715 +#: 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 " @@ -883,11 +956,11 @@ msgstr "" "plusieurs situations qui ne peuvent pas être traitées directement dans une " "instruction :keyword:`with`." -#: library/contextlib.rst:725 +#: library/contextlib.rst:774 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "Nettoyer dans une méthode ``__enter__``" -#: library/contextlib.rst:727 +#: library/contextlib.rst:776 #, fuzzy msgid "" "As noted in the documentation of :meth:`ExitStack.push`, this method can be " @@ -898,7 +971,7 @@ msgstr "" "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:731 +#: 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 " @@ -908,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:771 +#: 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:773 +#: 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 " @@ -924,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:787 +#: 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 " @@ -935,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:791 +#: 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 " @@ -945,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:803 +#: library/contextlib.rst:852 #, fuzzy msgid "" "This allows the intended cleanup behaviour to be made explicit up front, " @@ -954,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:806 +#: 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::" @@ -962,7 +1035,7 @@ 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:824 +#: 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 " @@ -973,7 +1046,7 @@ msgstr "" "décorateur :meth:`ExitStack.callback` pour déclarer la fonction de nettoyage " "de ressource en avance ::" -#: library/contextlib.rst:839 +#: 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 " @@ -984,12 +1057,12 @@ msgstr "" "doivent être récupérées depuis l'extérieur comme des variables de fermeture " "(*closure*)." -#: library/contextlib.rst:845 +#: 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:847 +#: 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." @@ -998,7 +1071,7 @@ msgstr "" "contexte à la fois ordinairement avec une instruction ``with`` ou comme un " "décorateur de fonction." -#: library/contextlib.rst:850 +#: 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. " @@ -1013,17 +1086,17 @@ msgstr "" "de :class:`ContextDecorator` fournit les deux fonctionnalités en une seule " "définition ::" -#: library/contextlib.rst:871 +#: 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:877 +#: library/contextlib.rst:926 msgid "And also as a function decorator::" msgstr "Et comme décorateurs de fonctions ::" -#: library/contextlib.rst:884 +#: library/contextlib.rst:933 #, fuzzy msgid "" "Note that there is one additional limitation when using context managers as " @@ -1036,11 +1109,11 @@ msgstr "" "de retour de :meth:`__enter__`. Si cette valeur est nécessaire, il faut " "utiliser explicitement une instruction ``with``." -#: library/contextlib.rst:891 +#: library/contextlib.rst:940 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - The \"with\" statement" -#: library/contextlib.rst:892 +#: library/contextlib.rst:941 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." @@ -1048,11 +1121,11 @@ msgstr "" "La spécification, les motivations et des exemples de " "l'instruction :keyword:`with` en Python." -#: library/contextlib.rst:898 +#: 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:900 +#: 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 " @@ -1066,7 +1139,7 @@ msgstr "" "utiliser une seconde fois lève une exception ou ne fonctionne pas " "correctement." -#: library/contextlib.rst:906 +#: 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 " @@ -1077,7 +1150,7 @@ msgstr "" "bloc :keyword:`with` où ils sont utilisés (comme montré dans tous les " "exemples d'utilisation au-dessus)." -#: library/contextlib.rst:910 +#: 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 " @@ -1088,7 +1161,7 @@ msgstr "" "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:914 +#: 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 " @@ -1098,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:942 +#: library/contextlib.rst:991 msgid "Reentrant context managers" msgstr "Gestionnaires de contexte réentrants" -#: library/contextlib.rst:944 +#: 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 " @@ -1115,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:949 +#: library/contextlib.rst:998 #, fuzzy msgid "" ":class:`threading.RLock` is an example of a reentrant context manager, as " @@ -1126,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:968 +#: 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 " @@ -1136,7 +1209,7 @@ msgstr "" "fonctions s'entre-appelant, et donc être bien plus compliqués que cet " "exemple." -#: library/contextlib.rst:972 +#: 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, " @@ -1148,11 +1221,11 @@ msgstr "" "*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:981 +#: library/contextlib.rst:1030 msgid "Reusable context managers" msgstr "Gestionnaires de contexte réutilisables" -#: library/contextlib.rst:983 +#: library/contextlib.rst:1032 msgid "" "Distinct from both single use and reentrant context managers are " "\"reusable\" context managers (or, to be completely explicit, \"reusable, " @@ -1170,7 +1243,7 @@ msgstr "" "contexte référencée a déjà été utilisée dans une instruction *with* " "englobante." -#: library/contextlib.rst:990 +#: 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 " @@ -1180,7 +1253,7 @@ msgstr "" "réutilisable mais pas réentrant (pour un verrou réentrant, il faut à la " "place utiliser :class:`threading.RLock`)." -#: library/contextlib.rst:994 +#: 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 " @@ -1192,7 +1265,7 @@ msgstr "" "actuellement enregistrées en quittant l'instruction *with*, sans regarder où " "ces fonctions ont été ajoutées ::" -#: library/contextlib.rst:1025 +#: 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 " @@ -1204,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:1030 +#: 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 ::" + +#, 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 c5393902bc..7616ba153f 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: 2025-10-17 09:58+0200\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 " @@ -35,7 +35,7 @@ msgstr "" "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 " @@ -47,28 +47,28 @@ msgstr "" "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 " @@ -77,7 +77,7 @@ 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 " @@ -90,15 +90,21 @@ msgstr "" "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,25 +130,25 @@ 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." @@ -151,7 +157,21 @@ msgstr "" "rétablir la variable à sa valeur précédente par la " "méthode :meth:`ContextVar.reset`." -#: library/contextvars.rst:82 +#: 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: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." @@ -159,32 +179,43 @@ 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:104 +#: 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 "" -"The token supports :ref:`context manager protocol ` to " -"restore the corresponding context variable value at the exit " -"from :keyword:`with` block::" +"Tokens are :ref:`generic ` over the same type as " +"the :class:`ContextVar` which created them." msgstr "" -#: library/contextvars.rst:117 +#: library/contextvars.rst:141 msgid "Added support for usage as a context manager." msgstr "" -#: library/contextvars.rst:121 +#: library/contextvars.rst:145 msgid "" "A read-only property. Points to the :class:`ContextVar` object that created " "the token." @@ -192,7 +223,7 @@ msgstr "" "Propriété en lecture seule. Pointe vers l'objet :class:`ContextVar` qui a " "créé le token." -#: library/contextvars.rst:126 +#: library/contextvars.rst:150 #, fuzzy msgid "" "A read-only property. Set to the value the variable had before " @@ -203,19 +234,19 @@ msgstr "" "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:133 +#: 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:137 +#: library/contextvars.rst:161 msgid "Manual Context Management" msgstr "Gestion de contexte manuelle" -#: library/contextvars.rst:141 +#: 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:143 +#: 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::" @@ -223,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:149 +#: library/contextvars.rst:173 #, fuzzy msgid "" "The function has an *O*\\ (1) complexity, i.e. works equally fast for " @@ -234,12 +265,12 @@ msgstr "" "rapidement pour des contextes avec peu de variables de contexte que pour des " "contextes qui en ont beaucoup." -#: library/contextvars.rst:156 +#: 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:158 +#: 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." @@ -248,7 +279,7 @@ msgstr "" "une copie du contexte actuel, utilisez la " "fonction :func:`~contextvars.copy_context`." -#: library/contextvars.rst:162 +#: 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 " @@ -256,14 +287,14 @@ msgid "" "considered to be *entered*." msgstr "" -#: library/contextvars.rst:167 +#: 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:171 +#: 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 " @@ -271,24 +302,24 @@ msgid "" "off the top of the context stack." msgstr "" -#: library/contextvars.rst:176 +#: 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:180 +#: 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:183 +#: library/contextvars.rst:207 msgid "After exiting a context, it can later be re-entered (from any thread)." msgstr "" -#: library/contextvars.rst:185 +#: 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` " @@ -298,7 +329,7 @@ msgid "" "the context)." msgstr "" -#: library/contextvars.rst:192 +#: library/contextvars.rst:216 msgid "Context implements the :class:`collections.abc.Mapping` interface." msgstr "*Context* implémente l'interface :class:`collections.abc.Mapping`." @@ -312,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:196 +#: library/contextvars.rst:220 #, fuzzy msgid "" "Enters the Context, executes ``callable(*args, **kwargs)``, then exits the " @@ -323,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:200 +#: library/contextvars.rst:224 #, fuzzy msgid "Example:" msgstr "Par exemple ::" -#: library/contextvars.rst:248 +#: 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:252 +#: library/contextvars.rst:276 msgid "" "Return ``True`` if the *context* has a value for *var* set; return ``False`` " "otherwise." @@ -340,7 +371,7 @@ msgstr "" "Renvoie ``True`` si le *context* a une valeur pour *var* ; sinon renvoie " "``False``." -#: library/contextvars.rst:257 +#: 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." @@ -348,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:263 +#: 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``." @@ -356,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:269 +#: 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:274 +#: 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:278 +#: 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:282 +#: 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:287 +#: library/contextvars.rst:311 msgid "" "Return a list of 2-tuples containing all variables and their values in the " "context object." @@ -383,11 +414,11 @@ msgstr "" "Renvoie une liste de paires contenant toutes les variables et leurs valeurs " "dans l'objet de contexte." -#: library/contextvars.rst:292 +#: library/contextvars.rst:316 msgid "asyncio support" msgstr "Gestion avec *asyncio*" -#: library/contextvars.rst:294 +#: 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 10818a4d44..ce270b422d 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: 2025-10-17 09:58+0200\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" @@ -152,19 +152,21 @@ 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 " @@ -173,19 +175,19 @@ msgstr "" "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 " @@ -204,7 +206,7 @@ msgstr "" "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 " @@ -212,17 +214,17 @@ msgid "" "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:130 +#: library/copy.rst:134 msgid "Module :mod:`pickle`" msgstr "Module :mod:`pickle`" -#: library/copy.rst:131 +#: 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 cc2b7dd8ff..d897ad2eda 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: 2025-10-17 09:58+0200\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. " diff --git a/library/crypt.po b/library/crypt.po index 4fc5464364..203ba1ca1a 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/csv.po b/library/csv.po index 79a7b46e61..b8495986b1 100644 --- a/library/csv.po +++ b/library/csv.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -20,11 +20,11 @@ msgstr "" 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,10 +66,11 @@ 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 " @@ -76,25 +78,26 @@ msgstr "" "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 " @@ -125,7 +128,7 @@ msgstr "" "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 " @@ -139,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:220 +#: 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 " @@ -183,7 +186,7 @@ msgstr "" "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 +#: 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 " @@ -198,7 +201,7 @@ msgstr "" "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." @@ -206,7 +209,7 @@ 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 " @@ -216,11 +219,11 @@ msgstr "" "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:145 +#: 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." @@ -228,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:149 -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:154 +#: 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 " @@ -242,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:158 +#: library/csv.rst:156 #, fuzzy msgid "" "The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is " @@ -257,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:165 +#: 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 " @@ -271,7 +275,7 @@ msgstr "" "*fieldnames*, les valeurs manquantes sont remplacées par la valeur de " "*restval* (``None`` par défaut)." -#: library/csv.rst:171 +#: library/csv.rst:169 msgid "" "All other optional or keyword arguments are passed to the " "underlying :class:`reader` instance." @@ -279,21 +283,21 @@ msgstr "" "Tous les autres arguments optionnels ou nommés sont passés à " "l'instance :class:`reader` sous-jacente." -#: library/csv.rst:218 +#: 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:176 +#: 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:179 +#: 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:200 +#: library/csv.rst:198 #, fuzzy msgid "" "Create an object which operates like a regular writer but maps dictionaries " @@ -322,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:215 +#: library/csv.rst:213 msgid "" "Note that unlike the :class:`DictReader` class, the *fieldnames* parameter " "of the :class:`DictWriter` class is not optional." @@ -330,7 +334,7 @@ msgstr "" "Notez que contrairement à la classe :class:`DictReader`, le paramètre " "*fieldnames* de :class:`DictWriter` n'est pas optionnel." -#: library/csv.rst:236 +#: 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 " @@ -345,7 +349,7 @@ msgstr "" "Les instances :class:`Dialect` définissent le comportement des " "instances :class:`reader` et :class:`writer`." -#: library/csv.rst:242 +#: 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` " @@ -356,7 +360,7 @@ msgstr "" "classes :class:`reader` et :class:`writer` spécifiques en passant par leur " "fonction d’initialisation (``__init__``) comme ici ::" -#: library/csv.rst:254 +#: 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'``." @@ -364,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:260 +#: 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 " @@ -374,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:266 +#: 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 " @@ -385,17 +389,17 @@ 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:275 +#: 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:277 +#: library/csv.rst:275 msgid "The :class:`Sniffer` class provides two methods:" msgstr "La classe :class:`Sniffer` fournit deux méthodes :" -#: library/csv.rst:281 +#: 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 " @@ -406,7 +410,7 @@ msgstr "" "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:289 +#: 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 " @@ -418,11 +422,11 @@ msgstr "" "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:294 +#: 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:295 +#: 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." @@ -430,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:298 +#: 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:303 +#: library/csv.rst:301 msgid "" "This method is a rough heuristic and may produce both false positives and " "negatives." @@ -447,21 +452,22 @@ msgstr "" "Cette méthode est une heuristique discutable et peut produire tant des faux-" "positifs que des faux-négatifs." -#: library/csv.rst:306 +#: library/csv.rst:304 msgid "An example for :class:`Sniffer` use::" msgstr "Un exemple d'utilisation de :class:`Sniffer` ::" -#: library/csv.rst:317 -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:321 +#: 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:326 +#: library/csv.rst:324 #, fuzzy msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " @@ -472,13 +478,13 @@ msgstr "" "contenant un caractère spécial comme *delimiter*, *quotechar* ou n'importe " "quel caractère de *lineterminator*." -#: library/csv.rst:333 +#: 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:335 +#: library/csv.rst:333 #, fuzzy msgid "" "Instructs :class:`reader` objects to convert all non-quoted fields to " @@ -487,7 +493,7 @@ msgstr "" "Indique au lecteur de convertir tous les champs non délimités par des " "guillemets vers des *float*." -#: library/csv.rst:338 +#: library/csv.rst:336 msgid "" "Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, " "or :class:`~enum.IntEnum`, have a string representation that cannot be " @@ -495,7 +501,7 @@ msgid "" "the :data:`QUOTE_NONNUMERIC` and :data:`QUOTE_STRINGS` modes." msgstr "" -#: library/csv.rst:346 +#: library/csv.rst:344 #, fuzzy msgid "" "Instructs :class:`writer` objects to never quote fields. When the current " @@ -511,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:354 +#: library/csv.rst:352 #, fuzzy msgid "" "Instructs :class:`reader` objects to perform no special processing of quote " @@ -520,45 +526,46 @@ msgstr "" "Indique au :class:`reader` de ne pas opérer de traitement spécial sur les " "guillemets." -#: library/csv.rst:358 +#: 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:362 +#: 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:369 +#: 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:373 +#: 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:378 -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:383 +#: 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:388 +#: library/csv.rst:386 msgid "Dialects and Formatting Parameters" msgstr "Dialectes et paramètres de formatage" -#: library/csv.rst:390 +#: library/csv.rst:388 #, fuzzy msgid "" "To make it easier to specify the format of input and output records, " @@ -581,18 +588,18 @@ msgstr "" "paramètres de formatage individuels, qui ont les mêmes noms que les " "attributs de :class:`Dialect` définis ci-dessous." -#: library/csv.rst:400 +#: library/csv.rst:398 msgid "Dialects support the following attributes:" msgstr "Les dialectes supportent les attributs suivants :" -#: library/csv.rst:405 +#: 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:410 +#: 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. " @@ -604,7 +611,7 @@ msgstr "" "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:415 +#: 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." @@ -613,29 +620,29 @@ msgstr "" "n'est précisé, une :exc:`Error` est levée si un *quotechar* est trouvé dans " "le champ." -#: library/csv.rst:421 +#: library/csv.rst:419 msgid "" "A one-character string used by the writer to escape characters that require " "escaping:" msgstr "" -#: library/csv.rst:424 +#: 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:427 +#: library/csv.rst:425 msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" msgstr "" -#: library/csv.rst:428 +#: library/csv.rst:426 #, fuzzy msgid "the *escapechar* itself." msgstr "Un ``escapechar`` vide n'est pas autorisé." -#: library/csv.rst:430 +#: library/csv.rst:428 #, fuzzy msgid "" "On reading, the *escapechar* removes any special meaning from the following " @@ -647,11 +654,11 @@ 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:433 +#: library/csv.rst:431 msgid "An empty *escapechar* is not allowed." msgstr "Un ``escapechar`` vide n'est pas autorisé." -#: library/csv.rst:438 +#: library/csv.rst:436 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." @@ -659,7 +666,7 @@ msgstr "" "La chaîne utilisée pour terminer les lignes produites par " "un :class:`writer`. Elle vaut par défaut ``'\\r\\n'``." -#: library/csv.rst:443 +#: 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 " @@ -669,7 +676,7 @@ msgstr "" "``'\\n'`` comme marqueurs de fin de ligne, et ignorer *lineterminator*. Ce " "comportement pourrait changer dans le futur." -#: library/csv.rst:450 +#: library/csv.rst:448 #, fuzzy msgid "" "A one-character string used to quote fields containing special characters, " @@ -682,11 +689,11 @@ msgstr "" "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:457 +#: library/csv.rst:455 msgid "An empty *quotechar* is not allowed." msgstr "Un ``quotechar`` vide n'est pas autorisé." -#: library/csv.rst:462 +#: library/csv.rst:460 #, fuzzy msgid "" "Controls when quotes should be generated by the writer and recognised by the " @@ -699,7 +706,7 @@ msgstr "" "constantes :const:`QUOTE_\\*` (voir la section :ref:`csv-contents`) et vaut " "par défaut :const:`QUOTE_MINIMAL`." -#: library/csv.rst:470 +#: library/csv.rst:468 #, fuzzy msgid "" "When :const:`True`, spaces immediately following the *delimiter* are " @@ -709,7 +716,7 @@ msgstr "" "Quand il vaut :const:`True`, les espaces suivant directement *delimiter* " "sont ignorés. Il vaut :const:`False` par défaut." -#: library/csv.rst:477 +#: library/csv.rst:475 msgid "" "When ``True``, raise exception :exc:`Error` on bad CSV input. The default is " "``False``." @@ -717,11 +724,11 @@ 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:483 +#: library/csv.rst:481 msgid "Reader Objects" msgstr "Objets lecteurs" -#: library/csv.rst:485 +#: library/csv.rst:483 msgid "" "Reader objects (:class:`DictReader` instances and objects returned by " "the :func:`reader` function) have the following public methods:" @@ -729,7 +736,7 @@ 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:490 +#: 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` " @@ -742,15 +749,15 @@ msgstr "" "utilisée. Généralement, vous devez appeler la méthode à l'aide de " "``next(reader)``." -#: library/csv.rst:496 +#: library/csv.rst:494 msgid "Reader objects have the following public attributes:" msgstr "Les objets lecteurs ont les attributs publics suivants :" -#: library/csv.rst:500 +#: 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:505 +#: 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." @@ -759,11 +766,11 @@ msgstr "" "au nombre d'enregistrements renvoyés, puisque certains enregistrements " "peuvent s'étendre sur plusieurs lignes." -#: library/csv.rst:509 +#: library/csv.rst:507 msgid "DictReader objects have the following public attribute:" msgstr "Les objets *DictReader* ont les attributs publics suivants :" -#: library/csv.rst:513 +#: 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." @@ -772,11 +779,11 @@ msgstr "" "est initialisé lors du premier accès ou quand le premier enregistrement est " "lu depuis le fichier." -#: library/csv.rst:520 +#: library/csv.rst:518 msgid "Writer Objects" msgstr "Objets transcripteurs" -#: library/csv.rst:522 +#: library/csv.rst:520 #, fuzzy msgid "" ":class:`writer` objects (:class:`DictWriter` instances and objects returned " @@ -798,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:533 +#: 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 " @@ -808,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:537 +#: library/csv.rst:535 msgid "Added support of arbitrary iterables." msgstr "Ajout du support d'itérables arbitraires." -#: library/csv.rst:542 +#: 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 " @@ -822,20 +829,20 @@ msgstr "" "précédemment) vers le fichier associé au transcripteur, formatés selon le " "dialecte utilisé." -#: library/csv.rst:546 +#: library/csv.rst:544 msgid "Writer objects have the following public attribute:" msgstr "Les objets transcripteurs ont l’attribut public suivant :" -#: library/csv.rst:551 +#: 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:554 +#: 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:559 +#: 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 " @@ -846,7 +853,7 @@ msgstr "" "le dialecte utilisé. Renvoie la valeur de retour de " "l'appel :meth:`csvwriter.writerow` utilisé en interne." -#: library/csv.rst:564 +#: library/csv.rst:562 msgid "" ":meth:`writeheader` now also returns the value returned by " "the :meth:`csvwriter.writerow` method it uses internally." @@ -854,23 +861,23 @@ 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:572 +#: library/csv.rst:570 msgid "Examples" msgstr "Exemples" -#: library/csv.rst:574 +#: 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:582 +#: library/csv.rst:580 msgid "Reading a file with an alternate format::" msgstr "Lire un fichier avec un format alternatif ::" -#: library/csv.rst:590 +#: library/csv.rst:588 msgid "The corresponding simplest possible writing example is::" msgstr "Le plus simple exemple d'écriture correspondant est ::" -#: library/csv.rst:597 +#: 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 " @@ -882,7 +889,7 @@ msgstr "" "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:608 +#: 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." @@ -891,11 +898,11 @@ 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:611 +#: library/csv.rst:609 msgid "Registering a new dialect::" msgstr "Enregistrer un nouveau dialecte ::" -#: library/csv.rst:618 +#: library/csv.rst:616 msgid "" "A slightly more advanced use of the reader --- catching and reporting " "errors::" @@ -903,7 +910,7 @@ msgstr "" "Un exemple d'utilisation un peu plus avancé du lecteur, attrapant et " "notifiant les erreurs ::" -#: library/csv.rst:630 +#: library/csv.rst:628 msgid "" "And while the module doesn't directly support parsing strings, it can easily " "be done::" @@ -911,11 +918,11 @@ msgstr "" "Et bien que le module ne permette pas d'analyser directement des chaînes, " "cela peut être fait facilement ::" -#: library/csv.rst:639 +#: library/csv.rst:637 msgid "Footnotes" msgstr "Notes" -#: library/csv.rst:640 +#: library/csv.rst:638 #, fuzzy msgid "" "If ``newline=''`` is not specified, newlines embedded inside quoted fields " diff --git a/library/ctypes.po b/library/ctypes.po index ea5bfefbe9..a3a732bf5e 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: 2025-10-17 09:58+0200\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,22 +37,28 @@ 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 " @@ -65,28 +72,31 @@ msgstr "" "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 " @@ -97,7 +107,7 @@ 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`." @@ -105,7 +115,7 @@ 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 " @@ -116,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 " @@ -133,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 " @@ -148,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 " @@ -175,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`` " @@ -186,7 +205,7 @@ 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 " @@ -196,7 +215,7 @@ msgstr "" "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 " @@ -206,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 " @@ -222,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::" @@ -237,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." @@ -245,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 "" @@ -257,12 +277,11 @@ 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 " @@ -270,7 +289,7 @@ msgstr "" "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 " @@ -290,392 +309,534 @@ msgstr "" "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`." -#: library/ctypes.rst:2426 +#: 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:289 +#: library/ctypes.rst:372 msgid "ctypes type" msgstr "Types de *ctypes*" -#: library/ctypes.rst:289 +#: library/ctypes.rst:373 msgid "C type" msgstr "Type C" -#: library/ctypes.rst:289 +#: 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:221 +#: library/ctypes.rst:240 +msgid "``'?'``" +msgstr "" + +#: 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:247 -#: library/ctypes.rst:251 library/ctypes.rst:255 library/ctypes.rst:259 -#: library/ctypes.rst:264 library/ctypes.rst:267 -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:227 +#: library/ctypes.rst:252 +msgid "``'b'``" +msgstr "" + +#: 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:235 +#: library/ctypes.rst:270 #, fuzzy msgid ":c:type:`int8_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:237 +#: 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:237 +#: library/ctypes.rst:274 #, fuzzy msgid ":c:type:`int16_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:239 +#: library/ctypes.rst:277 #, fuzzy msgid ":class:`c_int32`" msgstr ":class:`c_int`" -#: library/ctypes.rst:239 +#: library/ctypes.rst:278 #, fuzzy msgid ":c:type:`int32_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:241 +#: library/ctypes.rst:281 #, fuzzy msgid ":class:`c_int64`" msgstr ":class:`c_int`" -#: library/ctypes.rst:241 +#: library/ctypes.rst:282 #, fuzzy msgid ":c:type:`int64_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:243 +#: library/ctypes.rst:285 msgid ":class:`c_uint`" msgstr ":class:`c_uint`" -#: library/ctypes.rst:243 +#: library/ctypes.rst:286 #, fuzzy msgid ":c:expr:`unsigned int`" msgstr ":c:type:`unsigned int`" -#: library/ctypes.rst:245 +#: library/ctypes.rst:288 +msgid "``'I'`` \\*" +msgstr "" + +#: library/ctypes.rst:289 #, fuzzy msgid ":class:`c_uint8`" msgstr ":class:`c_uint`" -#: library/ctypes.rst:245 +#: library/ctypes.rst:290 #, fuzzy msgid ":c:type:`uint8_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:247 +#: library/ctypes.rst:293 #, fuzzy msgid ":class:`c_uint16`" msgstr ":class:`c_uint`" -#: library/ctypes.rst:247 +#: library/ctypes.rst:294 #, fuzzy msgid ":c:type:`uint16_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:249 +#: library/ctypes.rst:297 #, fuzzy msgid ":class:`c_uint32`" msgstr ":class:`c_uint`" -#: library/ctypes.rst:249 +#: library/ctypes.rst:298 #, fuzzy msgid ":c:type:`uint32_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:251 +#: library/ctypes.rst:301 #, fuzzy msgid ":class:`c_uint64`" msgstr ":class:`c_uint`" -#: library/ctypes.rst:251 +#: library/ctypes.rst:302 #, fuzzy msgid ":c:type:`uint64_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:253 +#: library/ctypes.rst:305 msgid ":class:`c_long`" msgstr ":class:`c_long`" -#: library/ctypes.rst:253 +#: library/ctypes.rst:306 #, fuzzy msgid ":c:expr:`long`" msgstr ":c:type:`long`" -#: library/ctypes.rst:255 +#: library/ctypes.rst:308 +msgid "``'l'``" +msgstr "" + +#: library/ctypes.rst:309 msgid ":class:`c_ulong`" msgstr ":class:`c_ulong`" -#: library/ctypes.rst:255 +#: library/ctypes.rst:310 #, fuzzy msgid ":c:expr:`unsigned long`" msgstr ":c:type:`unsigned long`" -#: library/ctypes.rst:257 +#: library/ctypes.rst:312 +msgid "``'L'``" +msgstr "" + +#: library/ctypes.rst:313 msgid ":class:`c_longlong`" msgstr ":class:`c_longlong`" -#: library/ctypes.rst:257 +#: 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:259 +#: library/ctypes.rst:316 +msgid "``'q'`` \\*" +msgstr "" + +#: library/ctypes.rst:317 msgid ":class:`c_ulonglong`" msgstr ":class:`c_ulonglong`" -#: library/ctypes.rst:259 +#: 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:262 +#: library/ctypes.rst:320 +msgid "``'Q'`` \\*" +msgstr "" + +#: library/ctypes.rst:321 msgid ":class:`c_size_t`" msgstr ":class:`c_size_t`" -#: library/ctypes.rst:262 +#: library/ctypes.rst:322 #, fuzzy msgid ":c:type:`size_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:264 +#: library/ctypes.rst:325 msgid ":class:`c_ssize_t`" msgstr ":class:`c_ssize_t`" -#: library/ctypes.rst:264 +#: 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:267 +#: library/ctypes.rst:329 #, fuzzy msgid ":class:`c_time_t`" msgstr ":class:`c_size_t`" -#: library/ctypes.rst:267 +#: library/ctypes.rst:330 #, fuzzy msgid ":c:type:`time_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:269 +#: library/ctypes.rst:333 msgid ":class:`c_float`" msgstr ":class:`c_float`" -#: library/ctypes.rst:269 +#: library/ctypes.rst:334 #, fuzzy msgid ":c:expr:`float`" msgstr ":c:type:`float`" -#: library/ctypes.rst:271 library/ctypes.rst:273 -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:271 +#: library/ctypes.rst:337 msgid ":class:`c_double`" msgstr ":class:`c_double`" -#: library/ctypes.rst:271 +#: library/ctypes.rst:338 #, fuzzy msgid ":c:expr:`double`" msgstr ":c:type:`double`" -#: library/ctypes.rst:273 +#: library/ctypes.rst:340 +msgid "``'d'``" +msgstr "" + +#: library/ctypes.rst:341 msgid ":class:`c_longdouble`" msgstr ":class:`c_longdouble`" -#: library/ctypes.rst:273 +#: library/ctypes.rst:342 #, fuzzy msgid ":c:expr:`long double`" msgstr ":c:type:`long double`" -#: library/ctypes.rst:275 +#: library/ctypes.rst:344 +msgid "``'g'`` \\*" +msgstr "" + +#: library/ctypes.rst:345 msgid ":class:`c_char_p`" msgstr ":class:`c_char_p`" -#: library/ctypes.rst:275 +#: library/ctypes.rst:346 #, fuzzy msgid ":c:expr:`char *` (NUL terminated)" msgstr ":c:type:`char *` (terminé par NUL)" -#: library/ctypes.rst:275 -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:277 +#: library/ctypes.rst:348 +msgid "``'z'``" +msgstr "" + +#: library/ctypes.rst:349 msgid ":class:`c_wchar_p`" msgstr ":class:`c_wchar_p`" -#: library/ctypes.rst:277 +#: library/ctypes.rst:350 #, fuzzy msgid ":c:expr:`wchar_t *` (NUL terminated)" msgstr ":c:type:`wchar_t *` (terminé par NUL)" -#: library/ctypes.rst:277 -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:279 +#: library/ctypes.rst:352 +msgid "``'Z'``" +msgstr "" + +#: library/ctypes.rst:353 msgid ":class:`c_void_p`" msgstr ":class:`c_void_p`" -#: library/ctypes.rst:279 +#: library/ctypes.rst:354 #, fuzzy msgid ":c:expr:`void *`" msgstr ":c:type:`void *`" -#: library/ctypes.rst:279 -msgid "int or ``None``" +#: library/ctypes.rst:355 +#, fuzzy +msgid ":py:class:`int` or ``None``" msgstr "*int* ou ``None``" -#: library/ctypes.rst:283 -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:285 +#: 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:291 +#: library/ctypes.rst:376 #, fuzzy msgid ":class:`c_float_complex`" msgstr ":class:`c_float`" -#: library/ctypes.rst:291 +#: library/ctypes.rst:377 #, fuzzy msgid ":c:expr:`float complex`" msgstr ":c:type:`float`" -#: library/ctypes.rst:293 library/ctypes.rst:295 -msgid "complex" +#: 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:293 +#: library/ctypes.rst:380 #, fuzzy msgid ":class:`c_double_complex`" msgstr ":class:`c_double`" -#: library/ctypes.rst:293 +#: library/ctypes.rst:381 #, fuzzy msgid ":c:expr:`double complex`" msgstr ":c:type:`double`" -#: library/ctypes.rst:295 +#: library/ctypes.rst:383 +msgid "``'Zd'``" +msgstr "" + +#: library/ctypes.rst:384 #, fuzzy msgid ":class:`c_longdouble_complex`" msgstr ":class:`c_longdouble`" -#: library/ctypes.rst:295 +#: library/ctypes.rst:385 #, fuzzy msgid ":c:expr:`long double complex`" msgstr ":c:type:`long double`" -#: library/ctypes.rst:299 +#: 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::" @@ -683,14 +844,22 @@ 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:310 +#: 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:322 +#: library/ctypes.rst:427 #, fuzzy msgid "" "Assigning a new value to instances of the pointer " @@ -704,7 +873,7 @@ msgstr "" "mémoire (c'est logique parce que les objets octets sont immuables en " "Python) ::" -#: library/ctypes.rst:342 +#: 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 " @@ -721,7 +890,7 @@ msgstr "" "l'attribut ``value`` permet d'y accéder comme à une chaîne de caractères " "terminée par NUL ::" -#: library/ctypes.rst:366 +#: library/ctypes.rst:471 #, fuzzy msgid "" "The :func:`create_string_buffer` function replaces the old :func:`!c_buffer` " @@ -735,11 +904,11 @@ msgstr "" "crée un bloc mémoire modifiable contenant des caractères Unicode du type " "C :c:type:`wchar_t`." -#: library/ctypes.rst:375 +#: library/ctypes.rst:480 msgid "Calling functions, continued" msgstr "Appel de fonctions, suite" -#: library/ctypes.rst:377 +#: 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 " @@ -749,10 +918,11 @@ msgstr "" "exemples suivants ne fonctionnent donc que dans une invite de commande et " "non depuis *IDLE* or *PythonWin* ::" -#: library/ctypes.rst:397 +#: 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 " @@ -760,12 +930,12 @@ msgstr "" "leur type :mod:`ctypes` correspondant pour pouvoir être convertis dans le " "type C requis ::" -#: library/ctypes.rst:409 +#: library/ctypes.rst:514 #, fuzzy msgid "Calling variadic functions" msgstr "Appel de fonctions" -#: library/ctypes.rst:411 +#: 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 " @@ -774,29 +944,29 @@ msgid "" "functions." msgstr "" -#: library/ctypes.rst:416 +#: 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:423 +#: 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:430 +#: 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:432 +#: 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 " @@ -805,7 +975,7 @@ msgstr "" "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:448 +#: library/ctypes.rst:553 #, fuzzy msgid "" "If you don't want to store the instance's data in the :attr:`!" @@ -817,11 +987,11 @@ msgstr "" "une :class:`propriété ` qui rend cet attribut disponible sur " "demande." -#: library/ctypes.rst:456 +#: 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:458 +#: library/ctypes.rst:563 #, fuzzy msgid "" "It is possible to specify the required argument types of functions exported " @@ -830,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:461 +#: library/ctypes.rst:566 #, fuzzy msgid "" ":attr:`~_CFuncPtr.argtypes` must be a sequence of C data types (the :func:`!" @@ -845,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:472 +#: 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 " @@ -855,7 +1025,7 @@ msgstr "" "(comme le fait le prototype d'une fonction C) et tente de convertir les " "arguments en des types valides ::" -#: library/ctypes.rst:484 +#: library/ctypes.rst:589 #, fuzzy msgid "" "If you have defined your own classes which you pass to function calls, you " @@ -866,7 +1036,7 @@ msgid "" "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:`!" +"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 " @@ -880,11 +1050,11 @@ msgstr "" "une instance :mod:`ctypes` ou un objet avec un " "attribut :attr:`_as_parameter_`." -#: library/ctypes.rst:498 +#: library/ctypes.rst:603 msgid "Return types" msgstr "Types de sortie" -#: library/ctypes.rst:508 +#: library/ctypes.rst:613 #, fuzzy msgid "" "By default functions are assumed to return the C :c:expr:`int` type. Other " @@ -895,7 +1065,7 @@ msgstr "" "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:512 +#: 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 " @@ -903,11 +1073,11 @@ msgid "" "attribute::" msgstr "" -#: library/ctypes.rst:518 +#: library/ctypes.rst:623 msgid "The argument types can be specified using :attr:`~_CFuncPtr.argtypes`::" msgstr "" -#: library/ctypes.rst:522 +#: library/ctypes.rst:627 #, fuzzy msgid "" "To call the function with a ``NULL`` pointer as first argument, use " @@ -916,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:527 +#: library/ctypes.rst:632 #, fuzzy msgid "" "Here is a more advanced example, it uses the :func:`!strchr` function, which " @@ -926,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:540 +#: library/ctypes.rst:645 #, fuzzy msgid "" "If you want to avoid the :func:`ord(\"x\") ` calls above, you can set " @@ -937,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:559 +#: library/ctypes.rst:664 #, fuzzy msgid "" "You can also use a callable Python object (a function or a class for " @@ -954,7 +1124,7 @@ msgstr "" "pratique pour vérifier les codes d'erreurs des valeurs de retour et lever " "automatiquement des exceptions ::" -#: library/ctypes.rst:582 +#: 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 " @@ -967,7 +1137,7 @@ msgstr "" "code d'erreur. Si celui-ci n'est pas passé, elle " "appelle :func:`GetLastError` pour le récupérer." -#: library/ctypes.rst:587 +#: library/ctypes.rst:692 #, fuzzy msgid "" "Please note that a much more powerful error checking mechanism is available " @@ -978,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:595 +#: 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:597 +#: 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 " @@ -994,9 +1164,10 @@ 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:601 +#: library/ctypes.rst:706 +#, fuzzy msgid "" -":mod:`ctypes` exports the :func:`byref` function which is used to pass " +":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 " @@ -1008,15 +1179,15 @@ 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:623 +#: library/ctypes.rst:728 msgid "Structures and unions" msgstr "Structures et unions" -#: library/ctypes.rst:625 +#: 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` " +"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*." @@ -1027,15 +1198,16 @@ msgstr "" "attribut :attr:`_fields_`. :attr:`_fields_` doit être une liste de *paires*, " "contenant un *nom de champ* et un *type de champ*." -#: library/ctypes.rst:630 +#: 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:633 +#: 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 " @@ -1045,7 +1217,7 @@ msgstr "" "et *y* et qui montre également comment instancier une structure avec le " "constructeur ::" -#: library/ctypes.rst:653 +#: 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." @@ -1054,7 +1226,7 @@ msgstr "" "structure peut elle-même contenir d'autres structures en prenant une " "structure comme type de champ." -#: library/ctypes.rst:656 +#: library/ctypes.rst:761 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" @@ -1062,7 +1234,7 @@ msgstr "" "Voici une structure RECT qui contient deux POINTs *upperleft* et " "*lowerright* ::" -#: library/ctypes.rst:670 +#: library/ctypes.rst:775 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" @@ -1070,7 +1242,7 @@ msgstr "" "Une structure encapsulée peut être instanciée par un constructeur de " "plusieurs façons ::" -#: library/ctypes.rst:675 +#: library/ctypes.rst:780 #, fuzzy msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " @@ -1081,9 +1253,10 @@ msgstr "" "champs depuis la *classe*. Ils sont importants pour déboguer car ils " "contiennent des informations utiles ::" -#: library/ctypes.rst:690 +#: 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." @@ -1094,12 +1267,12 @@ 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:696 +#: 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:698 +#: 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 " @@ -1107,7 +1280,7 @@ msgid "" "definition; see the attribute documentation for details." msgstr "" -#: library/ctypes.rst:703 +#: library/ctypes.rst:808 msgid "" "It is possible to specify the maximum alignment for the fields and/or for " "the structure itself by setting the class " @@ -1115,9 +1288,10 @@ msgid "" "respectively. See the attribute documentation for details." msgstr "" -#: library/ctypes.rst:708 +#: library/ctypes.rst:813 +#, fuzzy msgid "" -":mod:`ctypes` uses the native byte order for Structures and Unions. To " +":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 " @@ -1130,11 +1304,11 @@ msgstr "" "ou :class:`LittleEndianUnion`. Ces classes ne peuvent pas avoir de champ " "pointeur." -#: library/ctypes.rst:718 +#: library/ctypes.rst:823 msgid "Bit fields in structures and unions" msgstr "Champs de bits dans les structures et les unions" -#: library/ctypes.rst:720 +#: library/ctypes.rst:825 #, fuzzy msgid "" "It is possible to create structures and unions containing bit fields. Bit " @@ -1145,7 +1319,7 @@ 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:733 +#: 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 " @@ -1154,11 +1328,11 @@ msgid "" "details on the default behavior and how to change it." msgstr "" -#: library/ctypes.rst:744 +#: library/ctypes.rst:849 msgid "Arrays" msgstr "Tableaux" -#: library/ctypes.rst:746 +#: library/ctypes.rst:851 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." @@ -1166,7 +1340,7 @@ msgstr "" "Les tableaux sont des séquences qui contiennent un nombre fixe d'instances " "du même type." -#: library/ctypes.rst:748 +#: library/ctypes.rst:853 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" @@ -1174,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:753 +#: library/ctypes.rst:858 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" @@ -1182,11 +1356,11 @@ msgstr "" "Voici un exemple — un peu artificiel — d'une structure contenant, entre " "autres, 4 POINTs ::" -#: library/ctypes.rst:769 +#: 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:775 +#: library/ctypes.rst:880 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." @@ -1194,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:778 +#: 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:794 +#: library/ctypes.rst:899 msgid "Pointers" msgstr "Pointeurs" -#: library/ctypes.rst:796 +#: library/ctypes.rst:901 +#, fuzzy msgid "" "Pointer instances are created by calling the :func:`pointer` function on " -"a :mod:`ctypes` type::" +"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:804 +#: 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::" @@ -1218,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:811 +#: 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:820 +#: 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 " @@ -1236,15 +1412,15 @@ msgstr "" "pointeur fait pointer le pointeur vers l'adresse mémoire de cette nouvelle " "instance ::" -#: library/ctypes.rst:832 +#: 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:838 +#: 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:847 +#: 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 " @@ -1258,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:853 +#: 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 " @@ -1270,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:869 +#: library/ctypes.rst:974 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" @@ -1278,27 +1455,28 @@ msgstr "" "Appeler le pointeur sur type sans arguments crée un pointeur ``NULL``. Les " "pointeurs ``NULL`` s'évaluent à ``False`` ::" -#: library/ctypes.rst:877 +#: 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:895 +#: library/ctypes.rst:1000 msgid "Thread safety without the GIL" msgstr "" -#: library/ctypes.rst:897 +#: library/ctypes.rst:1002 msgid "" -"From Python 3.13 onward, the :term:`GIL` can be disabled on :term:`free " -"threaded ` builds. In ctypes, reads and writes to a single " -"object concurrently is safe, but not across multiple objects:" +"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:906 +#: 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 " @@ -1307,11 +1485,11 @@ msgid "" "a :class:`threading.Lock` to synchronize access to memory:" msgstr "" -#: library/ctypes.rst:926 +#: library/ctypes.rst:1031 msgid "Type conversions" msgstr "Conversions de type" -#: library/ctypes.rst:928 +#: library/ctypes.rst:1033 #, fuzzy msgid "" "Usually, ctypes does strict type checking. This means, if you have " @@ -1331,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:949 +#: library/ctypes.rst:1054 #, fuzzy msgid "" "In addition, if a function argument is explicitly declared to be a pointer " @@ -1346,16 +1524,17 @@ msgstr "" "*ctypes* appelle alors automatiquement la fonction de " "conversion :func:`byref`." -#: library/ctypes.rst:954 +#: 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:961 +#: 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::" @@ -1367,11 +1546,11 @@ msgstr "" "de :class:`c_int` comme valeur pour le champ ``values``, mais pas des " "instances d'autres types ::" -#: library/ctypes.rst:973 +#: 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:975 +#: 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, " @@ -1386,7 +1565,7 @@ msgstr "" "du second argument, qui pointe sur le même bloc mémoire que le premier " "argument ::" -#: library/ctypes.rst:986 +#: library/ctypes.rst:1091 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" @@ -1394,11 +1573,11 @@ msgstr "" "Ainsi, la fonction :func:`cast` permet de remplir le champ ``values`` de la " "structure ``Bar`` ::" -#: library/ctypes.rst:999 +#: library/ctypes.rst:1104 msgid "Incomplete Types" msgstr "Types incomplets" -#: library/ctypes.rst:1001 +#: 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 " @@ -1408,18 +1587,18 @@ 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:1012 +#: 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:1025 +#: 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 " +"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 " @@ -1427,7 +1606,7 @@ msgstr "" "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:1037 +#: 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::" @@ -1436,19 +1615,20 @@ msgstr "" "sur l'autre et enfin nous suivons quelques maillons de la chaîne de " "pointeurs ::" -#: library/ctypes.rst:1058 +#: library/ctypes.rst:1163 msgid "Callback functions" msgstr "Fonctions de rappel" -#: library/ctypes.rst:1060 +#: 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:1063 +#: 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 " @@ -1458,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:1067 +#: 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` " @@ -1470,7 +1650,7 @@ msgstr "" "fabrique :func:`WINFUNCTYPE` qui crée un type pour les fonctions de rappel " "qui suivent la convention d'appel ``stdcall``." -#: library/ctypes.rst:1072 +#: 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 " @@ -1479,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:1076 +#: library/ctypes.rst:1181 #, fuzzy msgid "" "I will present an example here which uses the standard C library's :c:func:`!" @@ -1491,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:1086 +#: library/ctypes.rst:1191 #, fuzzy msgid "" ":func:`!qsort` must be called with a pointer to the data to sort, the number " @@ -1508,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:1092 +#: 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::" @@ -1516,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:1098 +#: library/ctypes.rst:1203 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" @@ -1524,22 +1704,22 @@ msgstr "" "Pour commencer, voici une fonction de rappel simple qui affiche les valeurs " "qu'on lui passe ::" -#: library/ctypes.rst:1108 +#: library/ctypes.rst:1213 msgid "The result::" msgstr "Résultat ::" -#: library/ctypes.rst:1118 +#: 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:1133 +#: 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:1140 +#: library/ctypes.rst:1245 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" @@ -1547,10 +1727,11 @@ msgstr "" "Ces fonctions peuvent aussi être utilisées comme des décorateurs ; il est " "donc possible d'écrire ::" -#: library/ctypes.rst:1158 +#: 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` " @@ -1558,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:1162 +#: 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 " @@ -1575,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:1172 +#: library/ctypes.rst:1277 msgid "Accessing values exported from dlls" msgstr "Accès aux variables exportées depuis une DLL" -#: library/ctypes.rst:1174 +#: library/ctypes.rst:1279 #, fuzzy msgid "" "Some shared libraries not only export functions, they also export variables. " @@ -1591,10 +1772,10 @@ msgstr "" "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:1178 +#: 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 "" @@ -1602,7 +1783,7 @@ msgstr "" "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:1186 +#: 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." @@ -1610,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:1189 +#: library/ctypes.rst:1294 msgid "Quoting the docs for that value:" msgstr "Citons la documentation :" -#: library/ctypes.rst:1191 +#: library/ctypes.rst:1296 #, fuzzy msgid "" "This pointer is initialized to point to an array of :c:struct:`_frozen` " @@ -1629,16 +1810,17 @@ msgstr "" "tableau. Du code tiers peut jouer avec pour construire dynamiquement une " "collection de module figés." -#: library/ctypes.rst:1196 +#: 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:1210 +#: library/ctypes.rst:1315 #, fuzzy msgid "" "We have defined the :c:struct:`_frozen` data type, so we can get the pointer " @@ -1647,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:1217 +#: 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 " @@ -1661,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:1233 +#: 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 " @@ -1671,23 +1853,24 @@ 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:1241 +#: library/ctypes.rst:1346 msgid "Surprises" msgstr "Pièges" -#: library/ctypes.rst:1243 +#: 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:1246 +#: library/ctypes.rst:1351 msgid "Consider the following example::" msgstr "Examinons l'exemple suivant ::" -#: library/ctypes.rst:1266 +#: 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::" @@ -1696,7 +1879,7 @@ msgstr "" "``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:1274 +#: 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 " @@ -1710,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:1280 +#: 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 " @@ -1720,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:1284 +#: 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:1296 +#: library/ctypes.rst:1401 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." @@ -1735,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:1299 +#: 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 " @@ -1749,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:1309 +#: library/ctypes.rst:1414 msgid "Variable-sized data types" msgstr "Types de données à taille flottante" -#: library/ctypes.rst:1311 +#: 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:1313 +#: 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, " @@ -1775,7 +1960,7 @@ msgstr "" "unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le " "cas ::" -#: library/ctypes.rst:1333 +#: 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, " @@ -1785,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:1345 +#: 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 "" @@ -1796,180 +1982,169 @@ 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:1353 +#: library/ctypes.rst:1458 msgid "ctypes reference" msgstr "Référence du module" -#: library/ctypes.rst:1359 -msgid "Finding shared libraries" -msgstr "Recherche de bibliothèques partagées" +#: library/ctypes.rst:1463 +msgid "Loading shared libraries" +msgstr "Chargement des bibliothèques partagées" -#: library/ctypes.rst:1361 +#: library/ctypes.rst:1465 +#, fuzzy msgid "" -"When programming in a compiled language, shared libraries are accessed when " -"compiling/linking a program, and when the program is run." +"There are several ways to load shared libraries into the Python process. " +"One way is to instantiate :py:class:`CDLL` or one of its subclasses:" 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." +"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:1364 +#: library/ctypes.rst:1471 #, fuzzy +msgid "Represents a loaded shared library." +msgstr "Recherche de bibliothèques partagées" + +#: library/ctypes.rst:1473 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." +"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 "" -"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:1370 -#, fuzzy +#: library/ctypes.rst:1480 msgid "" -"The :mod:`!ctypes.util` module provides a function which can help to " -"determine the library to load." +"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 "" -"Le module :mod:`ctypes.util` fournit une fonction pour déterminer quelle " -"bibliothèque charger." -#: library/ctypes.rst:1378 +#: library/ctypes.rst:1486 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``." +"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 "" -"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:2131 -msgid "The exact functionality is system dependent." -msgstr "Le mode opératoire exact dépend du système." -#: library/ctypes.rst:1385 -#, fuzzy +#: library/ctypes.rst:1490 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." +"*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 "" -"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:1389 +#: library/ctypes.rst:1494 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." +"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 "" -"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:1393 -msgid "Here are some examples::" -msgstr "Voici quelques exemples ::" -#: library/ctypes.rst:1404 -#, fuzzy +#: library/ctypes.rst:1501 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::" +"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 "" -"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:1419 -#, 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``." +#: library/ctypes.rst:1507 +msgid "CPython implementation detail" 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:1423 -#, fuzzy +#: library/ctypes.rst:1509 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." +"Since CPython is linked to ``libc``, a ``None`` *name* is often used to " +"access the C standard library::" 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:1431 -#, fuzzy -msgid "Listing loaded shared libraries" -msgstr "Recherche de bibliothèques partagées" - -#: library/ctypes.rst:1433 +#: library/ctypes.rst:1518 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." +"To access the Python C API, prefer :py:data:`ctypes.pythonapi` which works " +"across platforms." msgstr "" -#: library/ctypes.rst:1437 +#: library/ctypes.rst:1521 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." +"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 " +"ignored. On posix systems, RTLD_NOW is always added, and is not " +"configurable." msgstr "" +"Le mode de chargement de la bibliothèque est défini par le paramètre *mode*. " +"Pour plus de détails, référez-vous à l'entrée :manpage:`dlopen(3)` du " +"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:1441 +#: library/ctypes.rst:1526 +#, fuzzy 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::" +"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` " +"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." msgstr "" +"Le paramètre *use_errno*, lorsque défini à vrai, active un mécanisme de " +"*ctypes* qui permet d'accéder au numéro d'erreur :data:`errno` du système de " +"manière sécurisée. :mod:`ctypes` maintient une copie de :data:`errno` du " +"système dans chaque fil d'exécution. Si vous appelez des fonctions externes " +"créées avec ``use_errno=True``, la valeur de :data:`errno` avant l'appel de " +"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:1453 -msgid "Loading shared libraries" -msgstr "Chargement des bibliothèques partagées" +#: 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 " +"private copy to a new value and returns the former value." +msgstr "" +"La fonction :func:`ctypes.get_errno` renvoie la valeur de la copie privée de " +"*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " +"la copie privée et renvoie l'ancienne valeur." -#: library/ctypes.rst:1455 +#: library/ctypes.rst:1537 +#, fuzzy msgid "" -"There are several ways to load shared libraries into the Python process. " -"One way is to instantiate one of the following classes:" +"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." 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 :" +"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." -#: library/ctypes.rst:1461 +#: library/ctypes.rst:1543 #, 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`." +"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 `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." 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`." +"Sous Windows, le paramètre *winmode* définit comment charger la bibliothèque " +"(puisque *mode* est ignoré). Il accepte toute valeur compatible avec le " +"drapeau ``LoadLibraryEx`` de l'API Win32. Lorsqu'il est omis, les drapeaux " +"par défaut sont ceux qui chargent la DLL de la manière la plus sécurisée " +"possible, afin d'éviter des problèmes comme le détournement de DLL. Passer " +"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:1465 +#: library/ctypes.rst:1550 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, " @@ -1990,27 +2165,69 @@ msgstr "" "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:1502 library/ctypes.rst:1533 +#: library/ctypes.rst:1562 +#, fuzzy +msgid "" +"`Microsoft DUMPBIN tool `_ -- A tool to find DLL " +"dependents." +msgstr "" +"`DUMPBIN `_ — un " +"utilitaire Microsoft pour lister les dépendances d'une DLL." + +#: 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 "" -#: library/ctypes.rst:1481 +#: library/ctypes.rst:1572 +#, fuzzy msgid "" -"`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." +"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 "" -"`DUMPBIN `_ — un " -"utilitaire Microsoft pour lister les dépendances d'une DLL." +"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 " +"que les résultats des accès par attribut sont mis en cache, et donc des " +"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:1487 +#: library/ctypes.rst:1585 #, fuzzy msgid "" -"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." +"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:1590 +msgid "The system handle used to access the library." +msgstr "Le lien système d'accès à la bibliothèque." + +#: 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: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 " @@ -2020,13 +2237,13 @@ msgstr "" "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:1511 library/ctypes.rst:1663 library/ctypes.rst:1887 -#: library/ctypes.rst:2111 library/ctypes.rst:2145 library/ctypes.rst:2168 -#: library/ctypes.rst:2192 library/ctypes.rst:2286 library/ctypes.rst:3104 +#: 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:1496 +#: library/ctypes.rst:1610 #, fuzzy msgid "" ":exc:`WindowsError` used to be raised, which is now an alias " @@ -2035,141 +2252,36 @@ msgstr "" "En Windows, les erreurs levaient auparavant une :exc:`WindowsError`, qui est " "maintenant un alias de :exc:`OSError`." -#: library/ctypes.rst:1507 +#: library/ctypes.rst:1619 #, fuzzy msgid "" -"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." +"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:1518 -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." - -#: library/ctypes.rst:1524 +#: library/ctypes.rst:1628 +#, fuzzy 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." +"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:1529 -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:1535 -#, 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." - -#: library/ctypes.rst:1542 -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 " -"ignored. On posix systems, RTLD_NOW is always added, and is not " -"configurable." -msgstr "" -"Le mode de chargement de la bibliothèque est défini par le paramètre *mode*. " -"Pour plus de détails, référez-vous à l'entrée :manpage:`dlopen(3)` du " -"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:1547 +#: library/ctypes.rst:1633 #, 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` 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." +msgid "Thus, this is only useful to call Python C API functions directly." msgstr "" -"Le paramètre *use_errno*, lorsque défini à vrai, active un mécanisme de " -"*ctypes* qui permet d'accéder au numéro d'erreur :data:`errno` du système de " -"manière sécurisée. :mod:`ctypes` maintient une copie de :data:`errno` du " -"système dans chaque fil d'exécution. Si vous appelez des fonctions externes " -"créées avec ``use_errno=True``, la valeur de :data:`errno` avant l'appel de " -"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:1554 -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 " -"private copy to a new value and returns the former value." -msgstr "" -"La fonction :func:`ctypes.get_errno` renvoie la valeur de la copie privée de " -"*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " -"la copie privée et renvoie l'ancienne valeur." - -#: library/ctypes.rst:1558 -#, 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." -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." - -#: library/ctypes.rst:1564 -#, 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 " -"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." -msgstr "" -"Sous Windows, le paramètre *winmode* définit comment charger la bibliothèque " -"(puisque *mode* est ignoré). Il accepte toute valeur compatible avec le " -"drapeau ``LoadLibraryEx`` de l'API Win32. Lorsqu'il est omis, les drapeaux " -"par défaut sont ceux qui chargent la DLL de la manière la plus sécurisée " -"possible, afin d'éviter des problèmes comme le détournement de DLL. Passer " -"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:1571 -msgid "Added *winmode* parameter." -msgstr "Ajout du paramètre *winmode*." +"Donc, cette classe ne sert qu'à appeler les fonctions de l'API C de Python." -#: library/ctypes.rst:1578 +#: 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." @@ -2177,7 +2289,7 @@ 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:1585 +#: 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*." @@ -2185,46 +2297,16 @@ 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:1592 +#: 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:1595 -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::" -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 " -"que les résultats des accès par attribut sont mis en cache, et donc des " -"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:1608 -msgid "" -"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:1614 -msgid "The system handle used to access the library." -msgstr "Le lien système d'accès à la bibliothèque." - -#: library/ctypes.rst:1619 -msgid "The name of the library passed in the constructor." -msgstr "Nom de la bibliothèque donné au constructeur." +"d'exploitation." -#: library/ctypes.rst:1621 +#: library/ctypes.rst:1654 #, fuzzy msgid "" "Shared libraries can also be loaded by using one of the prefabricated " @@ -2237,7 +2319,7 @@ msgstr "" "méthode :meth:`LoadLibrary`, soit en récupérant la bibliothèque comme " "attribut de l'instance du chargeur." -#: library/ctypes.rst:1629 +#: 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." @@ -2245,7 +2327,7 @@ msgstr "" "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:1632 +#: library/ctypes.rst:1664 #, fuzzy msgid "" ":meth:`!__getattr__` has special behavior: It allows loading a shared " @@ -2258,7 +2340,7 @@ msgstr "" "en cache, donc des accès consécutifs renvoient la même bibliothèque à chaque " "fois." -#: library/ctypes.rst:1638 +#: 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." @@ -2266,35 +2348,29 @@ 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:1642 +#: library/ctypes.rst:1674 msgid "These prefabricated library loaders are available:" msgstr "Plusieurs chargeurs sont fournis :" -#: library/ctypes.rst:1647 +#: library/ctypes.rst:1678 msgid "Creates :class:`CDLL` instances." msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1653 +#: library/ctypes.rst:1683 #, fuzzy msgid "Creates :class:`WinDLL` instances." msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1661 +#: library/ctypes.rst:1690 #, fuzzy msgid "Creates :class:`OleDLL` instances." msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1669 +#: library/ctypes.rst:1697 msgid "Creates :class:`PyDLL` instances." msgstr "Pour créer des instances de :class:`PyDLL`." -#: library/ctypes.rst:1672 -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:1678 +#: library/ctypes.rst:1702 #, fuzzy msgid "" "An instance of :class:`PyDLL` that exposes Python C API functions as " @@ -2308,7 +2384,7 @@ msgstr "" "donc définir vous-même le bon attribut :attr:`restype` pour pouvoir les " "utiliser." -#: library/ctypes.rst:1685 +#: 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 " @@ -2318,7 +2394,7 @@ msgstr "" "``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:1691 +#: 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 " @@ -2328,7 +2404,7 @@ msgstr "" "``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:1697 +#: 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 " @@ -2338,11 +2414,180 @@ 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:1704 +#: library/ctypes.rst:1729 +msgid "Finding shared libraries" +msgstr "Recherche de bibliothèques partagées" + +#: library/ctypes.rst:1731 +msgid "" +"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:1706 +#: library/ctypes.rst:1858 #, fuzzy msgid "" "As explained in the previous section, foreign functions can be accessed as " @@ -2358,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:1711 +#: 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:1725 +#: library/ctypes.rst:1877 msgid "Base class for C callable foreign functions." msgstr "Classe de base pour les fonctions externes C." -#: library/ctypes.rst:1727 +#: library/ctypes.rst:1879 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." @@ -2376,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:1730 +#: library/ctypes.rst:1882 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." @@ -2384,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:1735 +#: library/ctypes.rst:1887 #, fuzzy msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " @@ -2394,7 +2639,7 @@ msgstr "" "*ctypes*. Dans le cas où la fonction ne renvoie rien (:c:type:`void`), " "utilisez ``None``." -#: library/ctypes.rst:1738 +#: library/ctypes.rst:1890 #, fuzzy msgid "" "It is possible to assign a callable Python object that is not a ctypes type, " @@ -2413,7 +2658,7 @@ msgstr "" "affecter un type *ctypes* à :attr:`restype` et à affecter un appelable à " "l'attribut :attr:`errcheck`." -#: library/ctypes.rst:1747 +#: 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 " @@ -2427,7 +2672,7 @@ 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:1753 +#: library/ctypes.rst:1905 #, fuzzy msgid "" "When a foreign function is called, each actual argument is passed to " @@ -2445,7 +2690,7 @@ msgstr "" "caractères passée en argument en un objet chaîne d'octets selon les règles " "de conversion *ctypes*." -#: library/ctypes.rst:1760 +#: library/ctypes.rst:1912 #, fuzzy msgid "" "New: It is now possible to put items in argtypes which are not ctypes types, " @@ -2460,7 +2705,7 @@ msgstr "" "de créer des adaptateurs qui convertissent des objets arbitraires en des " "paramètres de fonction." -#: library/ctypes.rst:1767 +#: 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:" @@ -2468,7 +2713,7 @@ msgstr "" "Définit une fonction Python ou tout autre appelable qui sera appelé avec " "trois arguments ou plus :" -#: library/ctypes.rst:1774 +#: library/ctypes.rst:1926 #, fuzzy msgid "" "*result* is what the foreign function returns, as specified by the :attr:`!" @@ -2477,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:1777 +#: 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." @@ -2487,7 +2732,7 @@ msgstr "" "plusieurs fonctions ou de faire des actions supplémentaires après leur " "exécution." -#: library/ctypes.rst:1781 +#: 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." @@ -2496,7 +2741,7 @@ msgstr "" "la fonction, ceci permet de spécialiser le comportement des arguments " "utilisés." -#: library/ctypes.rst:1785 +#: 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 " @@ -2506,7 +2751,7 @@ 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:1792 +#: library/ctypes.rst:1944 #, fuzzy msgid "" "On Windows, when a foreign function call raises a system exception (for " @@ -2522,7 +2767,7 @@ msgstr "" "permet à un point d'entrée (*hook* en anglais) d'audit de remplacer " "l'exception par une des siennes." -#: library/ctypes.rst:1800 +#: library/ctypes.rst:1952 #, fuzzy msgid "" "Some ways to invoke foreign function calls as well as some of the functions " @@ -2533,11 +2778,11 @@ msgstr "" "évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " "``arguments`` comme arguments." -#: library/ctypes.rst:1807 +#: library/ctypes.rst:1959 msgid "Function prototypes" msgstr "Prototypes de fonction" -#: library/ctypes.rst:1809 +#: 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 " @@ -2557,7 +2802,7 @@ msgstr "" "``@décorateur``. Ceci est illustré dans la section :ref:`ctypes-callback-" "functions`." -#: library/ctypes.rst:1820 +#: 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 " @@ -2572,7 +2817,7 @@ 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:1830 +#: library/ctypes.rst:1982 #, fuzzy msgid "" "The returned function prototype creates functions that use the ``stdcall`` " @@ -2585,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:1840 +#: 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." @@ -2594,7 +2839,7 @@ msgstr "" "convention d'appel Python. Les fonctions ne libèreront *pas* le GIL lors de " "leur exécution." -#: library/ctypes.rst:1843 +#: 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 " @@ -2603,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:1850 +#: 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:1857 +#: 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:1864 +#: 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 " @@ -2629,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:1874 +#: 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* " @@ -2642,14 +2887,14 @@ msgstr "" "l'identificateur de plateforme, qui est utilisé dans la remontée d'erreurs " "étendue." -#: library/ctypes.rst:1879 +#: 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:1883 +#: library/ctypes.rst:2035 #, fuzzy msgid "" "COM methods use a special calling convention: They require a pointer to the " @@ -2660,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:1890 +#: library/ctypes.rst:2042 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." @@ -2669,14 +2914,14 @@ msgstr "" "avec des fonctionnalités supplémentaires par rapport à celles décrites ci-" "dessus." -#: library/ctypes.rst:1893 +#: library/ctypes.rst:2045 #, fuzzy msgid "" "*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:1895 +#: 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." @@ -2685,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:1898 +#: library/ctypes.rst:2050 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" @@ -2693,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:1901 +#: library/ctypes.rst:2053 msgid "1" msgstr "1" -#: library/ctypes.rst:1902 +#: library/ctypes.rst:2054 msgid "Specifies an input parameter to the function." msgstr "Paramètre d'entrée." -#: library/ctypes.rst:1904 +#: library/ctypes.rst:2056 msgid "2" msgstr "2" -#: library/ctypes.rst:1905 +#: 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:1907 +#: library/ctypes.rst:2059 msgid "4" msgstr "4" -#: library/ctypes.rst:1908 +#: 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:1910 +#: 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." @@ -2726,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:1913 +#: 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:1916 +#: library/ctypes.rst:2068 #, fuzzy msgid "" "The following example demonstrates how to wrap the Windows ``MessageBoxW`` " @@ -2743,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:1950 -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:1935 +#: 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:1941 +#: library/ctypes.rst:2093 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -2764,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:1959 +#: 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 " @@ -2777,7 +3023,7 @@ msgstr "" "fonction *GetWindowRect* renvoie donc une instance de *RECT* quand elle est " "appelée." -#: library/ctypes.rst:1964 +#: library/ctypes.rst:2116 #, fuzzy msgid "" "Output parameters can be combined with the :attr:`~_CFuncPtr.errcheck` " @@ -2793,14 +3039,15 @@ msgstr "" "fonction peut vérifier le résultat et lever une exception quand l'appel à " "l'API a échoué ::" -#: library/ctypes.rst:1977 +#: 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 " @@ -2809,58 +3056,58 @@ msgstr "" "correspondants et les renvoyer en retour. Dans ce cas, l'exécution " "habituelle n'a plus lieu ::" -#: library/ctypes.rst:1996 +#: library/ctypes.rst:2148 msgid "Utility functions" msgstr "Fonctions utilitaires" -#: library/ctypes.rst:2000 +#: 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:2003 +#: library/ctypes.rst:2155 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: library/ctypes.rst:2008 +#: 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:2014 +#: 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:2018 +#: library/ctypes.rst:2170 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: library/ctypes.rst:2022 +#: 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:2028 +#: 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:2031 +#: library/ctypes.rst:2183 msgid "" "If *src* is not ``NULL``, its ``AddRef`` method is called, incrementing the " "reference count." msgstr "" -#: library/ctypes.rst:2034 +#: 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 " @@ -2868,7 +3115,7 @@ msgid "" "necessary." msgstr "" -#: library/ctypes.rst:2046 +#: 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* " @@ -2876,107 +3123,85 @@ msgid "" "as a pointer." msgstr "" -#: library/ctypes.rst:2055 +#: 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:2058 +#: library/ctypes.rst:2210 msgid "" "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:2061 +#: library/ctypes.rst:2213 msgid "" "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:2065 +#: library/ctypes.rst:2217 msgid "" "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:2068 +#: library/ctypes.rst:2220 msgid "" "If both arguments are given, *size* must not be less than ``len(init)``." msgstr "" -#: library/ctypes.rst:2072 +#: library/ctypes.rst:2224 msgid "" "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:2075 +#: library/ctypes.rst:2227 msgid "For example::" msgstr "Par exemple ::" -#: library/ctypes.rst:2090 +#: library/ctypes.rst:2242 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:2096 +#: library/ctypes.rst:2248 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: library/ctypes.rst:2099 +#: library/ctypes.rst:2251 msgid "" "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:2102 +#: library/ctypes.rst:2254 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:2107 +#: library/ctypes.rst:2259 msgid "" "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:2116 +#: library/ctypes.rst:2268 msgid "" "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:2126 -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 "" - -#: library/ctypes.rst:2137 -msgid "" -"Returns 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." -msgstr "" - -#: library/ctypes.rst:2141 -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:2151 +#: library/ctypes.rst:2278 msgid "" "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. " @@ -2984,72 +3209,72 @@ msgid "" "The exact functionality is system dependent." msgstr "" -#: library/ctypes.rst:2156 +#: 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:2164 +#: library/ctypes.rst:2291 msgid "" "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:2173 +#: library/ctypes.rst:2300 msgid "" "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:2182 +#: library/ctypes.rst:2309 msgid "" "Returns the current value of the ctypes-private copy of the " "system :data:`errno` variable in the calling thread." msgstr "" -#: library/ctypes.rst:2185 +#: library/ctypes.rst:2312 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: library/ctypes.rst:2189 +#: library/ctypes.rst:2316 msgid "" "Returns the current value of the ctypes-private copy of the system :data:`!" "LastError` variable in the calling thread." msgstr "" -#: library/ctypes.rst:2194 +#: library/ctypes.rst:2321 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: library/ctypes.rst:2199 +#: 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:2206 +#: 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:2213 +#: 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:2219 +#: library/ctypes.rst:2346 msgid "" "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 " @@ -3058,19 +3283,19 @@ msgid "" "relying on implementation details that may change in future Python versions." msgstr "" -#: library/ctypes.rst:2230 +#: 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:2233 +#: 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:2239 +#: 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 " @@ -3078,44 +3303,44 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: library/ctypes.rst:2247 +#: 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:2250 +#: library/ctypes.rst:2377 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: library/ctypes.rst:2255 +#: library/ctypes.rst:2382 msgid "" "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:2261 +#: library/ctypes.rst:2388 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: library/ctypes.rst:2266 +#: 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:2272 +#: 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:2276 +#: library/ctypes.rst:2403 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " @@ -3125,7 +3350,7 @@ msgstr "" "``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:2281 +#: library/ctypes.rst:2408 msgid "" "Creates an instance of :exc:`OSError`. If *code* is not " "specified, :func:`GetLastError` is called to determine the error code. If " @@ -3133,7 +3358,7 @@ msgid "" "description of the error." msgstr "" -#: library/ctypes.rst:2288 +#: library/ctypes.rst:2415 #, fuzzy msgid "" "An instance of :exc:`WindowsError` used to be created, which is now an alias " @@ -3142,14 +3367,14 @@ msgstr "" "En Windows, les erreurs levaient auparavant une :exc:`WindowsError`, qui est " "maintenant un alias de :exc:`OSError`." -#: library/ctypes.rst:2295 +#: 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:2300 +#: library/ctypes.rst:2427 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " @@ -3159,20 +3384,20 @@ msgstr "" "``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:2305 +#: library/ctypes.rst:2432 msgid "" "Return a :class:`memoryview` object of length *size* that references memory " "starting at *void \\*ptr*." msgstr "" -#: library/ctypes.rst:2308 +#: 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:2313 +#: 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 " @@ -3182,7 +3407,7 @@ msgid "" "a :func:`~ctypes.byref` object.)" msgstr "" -#: library/ctypes.rst:2320 +#: library/ctypes.rst:2447 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.memoryview_at`` with " @@ -3192,11 +3417,11 @@ msgstr "" "``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:2328 +#: library/ctypes.rst:2455 msgid "Data types" msgstr "Types de données" -#: library/ctypes.rst:2333 +#: 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 " @@ -3206,13 +3431,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: library/ctypes.rst:2340 +#: 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:2345 +#: 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. " @@ -3221,13 +3446,13 @@ msgid "" "a :exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2361 +#: library/ctypes.rst:2488 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: library/ctypes.rst:2355 +#: 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 " @@ -3235,20 +3460,20 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2365 +#: 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:2370 +#: library/ctypes.rst:2497 msgid "" "This method, and others that indirectly call this method, raises " "an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" -#: library/ctypes.rst:2376 +#: 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 " @@ -3256,36 +3481,36 @@ msgid "" "object that can be used as a function call parameter." msgstr "" -#: library/ctypes.rst:2381 +#: 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:2387 +#: 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:2391 +#: library/ctypes.rst:2518 msgid "Common class variables of ctypes data types:" msgstr "" -#: library/ctypes.rst:2395 +#: 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:2401 +#: library/ctypes.rst:2528 msgid "Common instance variables of ctypes data types:" msgstr "" -#: library/ctypes.rst:2405 +#: 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. " @@ -3293,13 +3518,13 @@ msgid "" "the memory block." msgstr "" -#: library/ctypes.rst:2412 +#: 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:2417 +#: 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. " @@ -3307,7 +3532,7 @@ msgid "" "dictionary." msgstr "" -#: library/ctypes.rst:2430 +#: 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 " @@ -3316,11 +3541,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: library/ctypes.rst:2436 +#: library/ctypes.rst:2563 msgid "Instances have a single attribute:" msgstr "" -#: library/ctypes.rst:2440 +#: 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 " @@ -3328,15 +3553,44 @@ msgid "" "bytes object or string." msgstr "" -#: library/ctypes.rst:2445 +#: 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:2451 +#: 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 " @@ -3346,7 +3600,7 @@ msgid "" "instance." msgstr "" -#: library/ctypes.rst:2459 +#: 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 " @@ -3354,25 +3608,25 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: library/ctypes.rst:2464 +#: library/ctypes.rst:2614 msgid "These are the fundamental ctypes data types:" msgstr "" -#: library/ctypes.rst:2468 +#: 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:2475 +#: 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:2482 +#: 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 " @@ -3380,295 +3634,306 @@ msgid "" "integer address, or a bytes object." msgstr "" -#: library/ctypes.rst:2490 +#: library/ctypes.rst:2640 msgid "" "Represents the C :c:expr:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2496 +#: 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:2502 +#: library/ctypes.rst:2652 msgid "" "Represents the C :c:expr:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2508 +#: 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:2516 +#: 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:2524 +#: 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:2532 +#: 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:2539 +#: library/ctypes.rst:2689 msgid "" "Represents the C 8-bit :c:expr:`signed int` datatype. It is an alias " "for :class:`c_byte`." msgstr "" -#: library/ctypes.rst:2545 +#: 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:2551 +#: 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:2557 +#: 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:2563 +#: 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:2569 +#: 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:2575 +#: 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:2581 -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:2586 -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:2593 -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:2600 +#: 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:2607 +#: 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:2614 +#: library/ctypes.rst:2771 msgid "" "Represents the C 8-bit :c:expr:`unsigned int` datatype. It is an alias " "for :class:`c_ubyte`." msgstr "" -#: library/ctypes.rst:2620 +#: 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:2626 +#: 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:2632 +#: 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:2638 +#: 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:2644 +#: 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:2650 +#: 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:2656 +#: 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:2662 +#: 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:2669 +#: 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:2676 +#: 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:2683 +#: library/ctypes.rst:2842 msgid "" "Represents a :c:type:`!HRESULT` value, which contains success or error " "information for a function or method call." msgstr "" -#: library/ctypes.rst:2691 +#: 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:2694 +#: library/ctypes.rst:2853 msgid ":class:`!py_object` is now a :term:`generic type`." msgstr "" -#: library/ctypes.rst:2697 +#: 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:2705 +#: library/ctypes.rst:2867 msgid "Structured data types" msgstr "Types de données dérivés de Structure" -#: library/ctypes.rst:2710 +#: library/ctypes.rst:2872 msgid "Abstract base class for unions in native byte order." msgstr "" -#: library/ctypes.rst:2712 +#: library/ctypes.rst:2874 msgid "" "Unions share common attributes and behavior with structures; " "see :class:`Structure` documentation for details." msgstr "" -#: library/ctypes.rst:2717 +#: 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:2723 +#: 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:2729 +#: library/ctypes.rst:2891 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: library/ctypes.rst:2734 +#: library/ctypes.rst:2896 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: library/ctypes.rst:2736 +#: 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:2742 +#: library/ctypes.rst:2904 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: library/ctypes.rst:2744 +#: 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 the fields by direct attribute accesses. These are the" +"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:2752 +#: 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:2756 +#: 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:2760 +#: 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:2763 +#: 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:2773 +#: 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:2776 +#: library/ctypes.rst:2938 msgid "" "Additionally, the :attr:`!_fields_` class variable must be defined before " "the structure or union type is first used: an instance or subclass is " @@ -3678,39 +3943,39 @@ msgid "" "no own fields, as if :attr:`!_fields_` was empty." msgstr "" -#: library/ctypes.rst:2784 +#: library/ctypes.rst:2946 msgid "" "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:2790 +#: library/ctypes.rst:2952 msgid "" "An optional small integer that allows overriding the alignment of structure " "fields in the instance." msgstr "" -#: library/ctypes.rst:2793 +#: library/ctypes.rst:2955 msgid "" "This is only implemented for the MSVC-compatible memory layout " "(see :attr:`_layout_`)." msgstr "" -#: library/ctypes.rst:2796 +#: library/ctypes.rst:2958 msgid "" "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 " +"equivalent to ``#pragma pack(N)`` in C, except :mod:`!ctypes` may allow " "larger *n* than what the compiler accepts." msgstr "" -#: library/ctypes.rst:2801 +#: 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:2806 +#: 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 " @@ -3718,57 +3983,57 @@ msgid "" "intended, set :attr:`~Structure._layout_` to ``'ms'`` explicitly." msgstr "" -#: library/ctypes.rst:2815 +#: 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:2818 +#: 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." +"except :mod:`!ctypes` may allow values that the compiler would reject." msgstr "" -#: library/ctypes.rst:2823 +#: 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:2826 +#: 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:2829 +#: 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:2836 +#: library/ctypes.rst:2998 msgid "" "An optional string naming the struct/union layout. It can currently be set " "to:" msgstr "" -#: library/ctypes.rst:2839 +#: 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:2842 +#: 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:2846 +#: 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 " @@ -3776,46 +4041,46 @@ msgid "" "between similar platforms is found). Currently the default will be:" msgstr "" -#: library/ctypes.rst:2852 +#: library/ctypes.rst:3014 msgid "On Windows: ``\"ms\"``" msgstr "" -#: library/ctypes.rst:2853 +#: library/ctypes.rst:3015 msgid "" "When :attr:`~Structure._pack_` is specified: ``\"ms\"``. (This is " "deprecated; see :attr:`~Structure._pack_` documentation.)" msgstr "" -#: library/ctypes.rst:2855 +#: library/ctypes.rst:3017 msgid "Otherwise: ``\"gcc-sysv\"``" msgstr "" -#: library/ctypes.rst:2857 +#: 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:2864 +#: 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:2868 +#: 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 " +"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:2873 +#: library/ctypes.rst:3035 msgid "Here is an example type (Windows)::" msgstr "" -#: library/ctypes.rst:2886 +#: 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 " @@ -3825,7 +4090,7 @@ msgid "" "temporary union instance::" msgstr "" -#: library/ctypes.rst:2898 +#: 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 " @@ -3833,7 +4098,7 @@ msgid "" "appended to the fields of the base class." msgstr "" -#: library/ctypes.rst:2903 +#: 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 " @@ -3843,156 +4108,158 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: library/ctypes.rst:2913 +#: library/ctypes.rst:3075 msgid "" "Descriptor for fields of a :class:`Structure` and :class:`Union`. For " "example::" msgstr "" -#: library/ctypes.rst:2936 +#: library/ctypes.rst:3098 msgid "All attributes are read-only." msgstr "" -#: library/ctypes.rst:2938 +#: library/ctypes.rst:3100 msgid "" ":class:`!CField` objects are created via :attr:`~Structure._fields_`; do not " "instantiate the class directly." msgstr "" -#: library/ctypes.rst:2943 +#: 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:2949 +#: library/ctypes.rst:3111 msgid "Name of the field, as a string." msgstr "" -#: library/ctypes.rst:2953 +#: library/ctypes.rst:3115 msgid "Type of the field, as a :ref:`ctypes class `." msgstr "" -#: library/ctypes.rst:2958 +#: library/ctypes.rst:3120 msgid "Offset of the field, in bytes." msgstr "" -#: library/ctypes.rst:2960 +#: 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:2965 +#: library/ctypes.rst:3127 msgid "Size of the field, in bytes." msgstr "" -#: library/ctypes.rst:2967 +#: 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:2972 +#: library/ctypes.rst:3134 msgid "For non-bitfields, equivalent to :attr:`~CField.byte_size`." msgstr "" -#: library/ctypes.rst:2974 +#: 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:2981 +#: library/ctypes.rst:3143 msgid "True if this is a bitfield." msgstr "" -#: library/ctypes.rst:2986 +#: 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:2990 +#: 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:2994 +#: 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:2999 +#: 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:3006 +#: library/ctypes.rst:3168 msgid "Arrays and pointers" msgstr "Tableaux et pointeurs" -#: library/ctypes.rst:3010 +#: library/ctypes.rst:3172 msgid "Abstract base class for arrays." msgstr "Classe de base abstraite pour les *arrays*." -#: library/ctypes.rst:3012 +#: 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`." +"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:3022 +#: 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`." msgstr "" -#: library/ctypes.rst:3029 +#: 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:3032 +#: library/ctypes.rst:3196 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: library/ctypes.rst:3037 +#: 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:3041 -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:3047 +#: library/ctypes.rst:3211 msgid "Private, abstract base class for pointers." msgstr "" -#: library/ctypes.rst:3049 +#: 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:3053 +#: 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, " @@ -4001,21 +4268,21 @@ msgid "" "will probably crash with an access violation (if you're lucky)." msgstr "" -#: library/ctypes.rst:3063 +#: library/ctypes.rst:3227 msgid "Specifies the type pointed to." msgstr "" -#: library/ctypes.rst:3067 +#: 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:3074 +#: library/ctypes.rst:3238 msgid "Exceptions" msgstr "Exceptions" -#: library/ctypes.rst:3078 +#: library/ctypes.rst:3242 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." @@ -4023,26 +4290,26 @@ 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:3084 +#: 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:3088 +#: library/ctypes.rst:3252 msgid "The integer value representing the error code." msgstr "" -#: library/ctypes.rst:3092 +#: library/ctypes.rst:3256 msgid "The error message." msgstr "" -#: library/ctypes.rst:3096 +#: library/ctypes.rst:3260 msgid "The 5-tuple ``(descr, source, helpfile, helpcontext, progid)``." msgstr "" -#: library/ctypes.rst:3098 +#: 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* " @@ -4051,6 +4318,116 @@ msgid "" "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 " diff --git a/library/curses.ascii.po b/library/curses.ascii.po index 0c4e900b7a..78d62ac5f8 100644 --- a/library/curses.ascii.po +++ b/library/curses.ascii.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -15,16 +15,18 @@ msgstr "" "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 ":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 "**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 "" @@ -33,155 +35,155 @@ msgstr "" "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 "Début d'en-tête, interruption de console" -#: library/curses.ascii.rst:25 +#: library/curses.ascii.rst:22 msgid "Start of text" msgstr "Début du texte" -#: library/curses.ascii.rst:27 +#: library/curses.ascii.rst:24 msgid "End of text" msgstr "Fin du texte" -#: library/curses.ascii.rst:29 +#: library/curses.ascii.rst:26 msgid "End of transmission" msgstr "Fin de transmission" -#: library/curses.ascii.rst:31 +#: library/curses.ascii.rst:28 msgid "Enquiry, goes with :const:`ACK` flow control" msgstr "Enquête, va avec le contrôle de flux :const:`ACK`" -#: library/curses.ascii.rst:33 +#: library/curses.ascii.rst:30 msgid "Acknowledgement" msgstr "Accusé de réception" -#: library/curses.ascii.rst:35 +#: library/curses.ascii.rst:32 msgid "Bell" msgstr "Caractère d'appel" -#: library/curses.ascii.rst:37 +#: library/curses.ascii.rst:34 msgid "Backspace" msgstr "Retour arrière" -#: library/curses.ascii.rst:39 +#: library/curses.ascii.rst:36 msgid "Tab" msgstr "Tabulation" -#: library/curses.ascii.rst:41 +#: library/curses.ascii.rst:38 msgid "Alias for :const:`TAB`: \"Horizontal tab\"" msgstr "Alias pour :const:`TAB`: « Tabulation horizontale »" -#: library/curses.ascii.rst:43 +#: library/curses.ascii.rst:40 msgid "Line feed" msgstr "Saut de ligne" -#: library/curses.ascii.rst:45 +#: library/curses.ascii.rst:42 msgid "Alias for :const:`LF`: \"New line\"" msgstr "Alias pour :const:`LF`: « Nouvelle ligne »" -#: library/curses.ascii.rst:47 +#: library/curses.ascii.rst:44 msgid "Vertical tab" msgstr "Tabulation verticale" -#: library/curses.ascii.rst:49 +#: library/curses.ascii.rst:46 msgid "Form feed" 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 "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 "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 "Échappement de liaison de données" -#: library/curses.ascii.rst:59 +#: library/curses.ascii.rst:56 msgid "XON, for flow control" 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 "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 "XOFF, pour le contrôle de flux" -#: library/curses.ascii.rst:65 +#: library/curses.ascii.rst:62 msgid "Device control 4" msgstr "Contrôle de périphérique 4" -#: library/curses.ascii.rst:67 +#: library/curses.ascii.rst:64 msgid "Negative acknowledgement" msgstr "Accusé de réception négatif" -#: library/curses.ascii.rst:69 +#: library/curses.ascii.rst:66 msgid "Synchronous idle" msgstr "Inactif synchrone" -#: library/curses.ascii.rst:71 +#: library/curses.ascii.rst:68 msgid "End transmission block" msgstr "Fin du bloc de transmission" -#: library/curses.ascii.rst:73 +#: library/curses.ascii.rst:70 msgid "Cancel" msgstr "Annuler" -#: library/curses.ascii.rst:75 +#: library/curses.ascii.rst:72 msgid "End of medium" msgstr "Fin du médium" -#: library/curses.ascii.rst:77 +#: library/curses.ascii.rst:74 msgid "Substitute" msgstr "Substitut" -#: library/curses.ascii.rst:79 +#: library/curses.ascii.rst:76 msgid "Escape" 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 "Séparateur d'enregistrement, terminateur en mode bloc" -#: library/curses.ascii.rst:87 +#: library/curses.ascii.rst:84 msgid "Unit separator" msgstr "Séparateur d'unités" -#: library/curses.ascii.rst:89 +#: library/curses.ascii.rst:86 msgid "Space" msgstr "Espace" -#: library/curses.ascii.rst:91 +#: library/curses.ascii.rst:88 msgid "Delete" 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 " @@ -191,7 +193,7 @@ msgstr "" "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:" @@ -199,7 +201,7 @@ 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)``." @@ -207,7 +209,7 @@ 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)``." @@ -215,25 +217,25 @@ 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``." @@ -241,23 +243,23 @@ 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 "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." @@ -265,7 +267,7 @@ 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." @@ -274,11 +276,11 @@ msgstr "" "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 "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``." @@ -286,18 +288,18 @@ 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 " @@ -307,7 +309,7 @@ msgstr "" "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 " @@ -317,7 +319,7 @@ msgstr "" "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." @@ -326,13 +328,13 @@ msgstr "" "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)." @@ -340,7 +342,7 @@ 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)." @@ -348,7 +350,7 @@ 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." @@ -356,7 +358,7 @@ 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 " @@ -375,7 +377,7 @@ msgstr "" "(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 " diff --git a/library/curses.panel.po b/library/curses.panel.po index 81d2cf8f38..daf4c4f861 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 57fad0a5a9..f2fee6ec17 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: 2025-10-17 09:58+0200\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 " @@ -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,7 +125,7 @@ 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 @@ -286,7 +294,7 @@ msgid "" "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:1799 +#: library/curses.rst:1798 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." @@ -650,7 +658,7 @@ msgstr "" 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`, " +"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." @@ -1163,7 +1171,7 @@ msgstr "" #: 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 "" @@ -1246,8 +1254,8 @@ msgstr "" #: 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:1116 @@ -1480,7 +1488,7 @@ msgid "Constants" msgstr "Constantes" #: library/curses.rst:1336 -msgid "The :mod:`curses` module defines the following data members:" +msgid "The :mod:`!curses` module defines the following data members:" msgstr "" #: library/curses.rst:1341 @@ -1495,11 +1503,11 @@ msgid "" "return :const:`OK` upon success." msgstr "" -#: library/curses.rst:1354 +#: library/curses.rst:1353 msgid "A bytes object representing the current version of the module." msgstr "" -#: library/curses.rst:1359 +#: 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 " @@ -1507,535 +1515,535 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: library/curses.rst:1364 +#: library/curses.rst:1363 msgid "Availability: if the ncurses library is used." msgstr "" -#: library/curses.rst:1370 +#: 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:1375 +#: 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:1380 +#: 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`." msgstr "" -#: library/curses.rst:1387 +#: 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`." msgstr "" -#: library/curses.rst:1393 +#: 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:1397 +#: library/curses.rst:1396 msgid "Attribute" msgstr "Attribut" -#: library/curses.rst:1442 library/curses.rst:1780 +#: library/curses.rst:1441 library/curses.rst:1779 msgid "Meaning" msgstr "Signification" -#: library/curses.rst:1399 +#: library/curses.rst:1398 msgid "Alternate character set mode" msgstr "" -#: library/curses.rst:1401 +#: library/curses.rst:1400 msgid "Blink mode" msgstr "" -#: library/curses.rst:1403 +#: library/curses.rst:1402 msgid "Bold mode" msgstr "" -#: library/curses.rst:1405 +#: library/curses.rst:1404 msgid "Dim mode" msgstr "" -#: library/curses.rst:1407 +#: library/curses.rst:1406 msgid "Invisible or blank mode" msgstr "" -#: library/curses.rst:1409 +#: library/curses.rst:1408 msgid "Italic mode" msgstr "" -#: library/curses.rst:1411 +#: library/curses.rst:1410 msgid "Normal attribute" msgstr "Attribut normal" -#: library/curses.rst:1413 +#: library/curses.rst:1412 msgid "Protected mode" msgstr "" -#: library/curses.rst:1415 +#: library/curses.rst:1414 msgid "Reverse background and foreground colors" msgstr "" -#: library/curses.rst:1418 +#: library/curses.rst:1417 msgid "Standout mode" msgstr "" -#: library/curses.rst:1420 +#: library/curses.rst:1419 msgid "Underline mode" msgstr "" -#: library/curses.rst:1422 +#: library/curses.rst:1421 msgid "Horizontal highlight" msgstr "" -#: library/curses.rst:1424 +#: library/curses.rst:1423 msgid "Left highlight" msgstr "" -#: library/curses.rst:1426 +#: library/curses.rst:1425 msgid "Low highlight" msgstr "" -#: library/curses.rst:1428 +#: library/curses.rst:1427 msgid "Right highlight" msgstr "" -#: library/curses.rst:1430 +#: library/curses.rst:1429 msgid "Top highlight" msgstr "" -#: library/curses.rst:1432 +#: library/curses.rst:1431 msgid "Vertical highlight" msgstr "" -#: library/curses.rst:1435 +#: library/curses.rst:1434 msgid "``A_ITALIC`` was added." msgstr "" -#: library/curses.rst:1438 +#: library/curses.rst:1437 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: library/curses.rst:1442 +#: library/curses.rst:1441 msgid "Bit-mask" msgstr "" -#: library/curses.rst:1444 +#: library/curses.rst:1443 msgid "Bit-mask to extract attributes" msgstr "" -#: library/curses.rst:1447 +#: library/curses.rst:1446 msgid "Bit-mask to extract a character" msgstr "" -#: library/curses.rst:1450 +#: library/curses.rst:1449 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: library/curses.rst:1454 +#: 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:1460 +#: library/curses.rst:1459 msgid "Key constant" msgstr "" -#: library/curses.rst:1460 +#: library/curses.rst:1459 msgid "Key" msgstr "Clé" -#: library/curses.rst:1462 +#: library/curses.rst:1461 msgid "Minimum key value" msgstr "" -#: library/curses.rst:1464 +#: library/curses.rst:1463 msgid "Break key (unreliable)" msgstr "" -#: library/curses.rst:1466 +#: library/curses.rst:1465 msgid "Down-arrow" msgstr "" -#: library/curses.rst:1468 +#: library/curses.rst:1467 msgid "Up-arrow" msgstr "" -#: library/curses.rst:1470 +#: library/curses.rst:1469 msgid "Left-arrow" msgstr "" -#: library/curses.rst:1472 +#: library/curses.rst:1471 msgid "Right-arrow" msgstr "" -#: library/curses.rst:1474 +#: library/curses.rst:1473 msgid "Home key (upward+left arrow)" msgstr "" -#: library/curses.rst:1476 +#: library/curses.rst:1475 msgid "Backspace (unreliable)" msgstr "" -#: library/curses.rst:1478 +#: library/curses.rst:1477 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: library/curses.rst:1481 +#: library/curses.rst:1480 msgid "Value of function key *n*" msgstr "" -#: library/curses.rst:1483 +#: library/curses.rst:1482 msgid "Delete line" msgstr "" -#: library/curses.rst:1485 +#: library/curses.rst:1484 msgid "Insert line" msgstr "" -#: library/curses.rst:1487 +#: library/curses.rst:1486 msgid "Delete character" msgstr "" -#: library/curses.rst:1489 +#: library/curses.rst:1488 msgid "Insert char or enter insert mode" msgstr "" -#: library/curses.rst:1491 +#: library/curses.rst:1490 msgid "Exit insert char mode" msgstr "" -#: library/curses.rst:1493 +#: library/curses.rst:1492 msgid "Clear screen" msgstr "" -#: library/curses.rst:1495 +#: library/curses.rst:1494 msgid "Clear to end of screen" msgstr "" -#: library/curses.rst:1497 +#: library/curses.rst:1496 msgid "Clear to end of line" msgstr "" -#: library/curses.rst:1499 +#: library/curses.rst:1498 msgid "Scroll 1 line forward" msgstr "" -#: library/curses.rst:1501 +#: library/curses.rst:1500 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: library/curses.rst:1503 +#: library/curses.rst:1502 msgid "Next page" msgstr "" -#: library/curses.rst:1505 +#: library/curses.rst:1504 msgid "Previous page" msgstr "" -#: library/curses.rst:1507 +#: library/curses.rst:1506 msgid "Set tab" msgstr "" -#: library/curses.rst:1509 +#: library/curses.rst:1508 msgid "Clear tab" msgstr "" -#: library/curses.rst:1511 +#: library/curses.rst:1510 msgid "Clear all tabs" msgstr "" -#: library/curses.rst:1513 +#: library/curses.rst:1512 msgid "Enter or send (unreliable)" msgstr "" -#: library/curses.rst:1515 +#: library/curses.rst:1514 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: library/curses.rst:1517 +#: library/curses.rst:1516 msgid "Reset or hard reset (unreliable)" msgstr "" -#: library/curses.rst:1519 +#: library/curses.rst:1518 msgid "Print" msgstr "" -#: library/curses.rst:1521 +#: library/curses.rst:1520 msgid "Home down or bottom (lower left)" msgstr "" -#: library/curses.rst:1523 +#: library/curses.rst:1522 msgid "Upper left of keypad" msgstr "" -#: library/curses.rst:1525 +#: library/curses.rst:1524 msgid "Upper right of keypad" msgstr "" -#: library/curses.rst:1527 +#: library/curses.rst:1526 msgid "Center of keypad" msgstr "" -#: library/curses.rst:1529 +#: library/curses.rst:1528 msgid "Lower left of keypad" msgstr "" -#: library/curses.rst:1531 +#: library/curses.rst:1530 msgid "Lower right of keypad" msgstr "" -#: library/curses.rst:1533 +#: library/curses.rst:1532 msgid "Back tab" msgstr "" -#: library/curses.rst:1535 +#: library/curses.rst:1534 msgid "Beg (beginning)" msgstr "" -#: library/curses.rst:1537 +#: library/curses.rst:1536 msgid "Cancel" msgstr "" -#: library/curses.rst:1539 +#: library/curses.rst:1538 msgid "Close" msgstr "*Close*" -#: library/curses.rst:1541 +#: library/curses.rst:1540 msgid "Cmd (command)" msgstr "" -#: library/curses.rst:1543 +#: library/curses.rst:1542 msgid "Copy" msgstr "*Copy*" -#: library/curses.rst:1545 +#: library/curses.rst:1544 msgid "Create" msgstr "" -#: library/curses.rst:1547 +#: library/curses.rst:1546 msgid "End" msgstr "" -#: library/curses.rst:1549 +#: library/curses.rst:1548 msgid "Exit" msgstr "*Exit*" -#: library/curses.rst:1551 +#: library/curses.rst:1550 msgid "Find" msgstr "" -#: library/curses.rst:1553 +#: library/curses.rst:1552 msgid "Help" msgstr "" -#: library/curses.rst:1555 +#: library/curses.rst:1554 msgid "Mark" msgstr "" -#: library/curses.rst:1557 +#: library/curses.rst:1556 msgid "Message" msgstr "" -#: library/curses.rst:1559 +#: library/curses.rst:1558 msgid "Move" msgstr "" -#: library/curses.rst:1561 +#: library/curses.rst:1560 msgid "Next" msgstr "" -#: library/curses.rst:1563 +#: library/curses.rst:1562 msgid "Open" msgstr "" -#: library/curses.rst:1565 +#: library/curses.rst:1564 msgid "Options" msgstr "Options" -#: library/curses.rst:1567 +#: library/curses.rst:1566 msgid "Prev (previous)" msgstr "" -#: library/curses.rst:1569 +#: library/curses.rst:1568 msgid "Redo" msgstr "*Redo*" -#: library/curses.rst:1571 +#: library/curses.rst:1570 msgid "Ref (reference)" msgstr "" -#: library/curses.rst:1573 +#: library/curses.rst:1572 msgid "Refresh" msgstr "" -#: library/curses.rst:1575 +#: library/curses.rst:1574 msgid "Replace" msgstr "" -#: library/curses.rst:1577 +#: library/curses.rst:1576 msgid "Restart" msgstr "" -#: library/curses.rst:1579 +#: library/curses.rst:1578 msgid "Resume" msgstr "" -#: library/curses.rst:1581 +#: library/curses.rst:1580 msgid "Save" msgstr "*Save*" -#: library/curses.rst:1583 +#: library/curses.rst:1582 msgid "Shifted Beg (beginning)" msgstr "" -#: library/curses.rst:1585 +#: library/curses.rst:1584 msgid "Shifted Cancel" msgstr "" -#: library/curses.rst:1587 +#: library/curses.rst:1586 msgid "Shifted Command" msgstr "" -#: library/curses.rst:1589 +#: library/curses.rst:1588 msgid "Shifted Copy" msgstr "" -#: library/curses.rst:1591 +#: library/curses.rst:1590 msgid "Shifted Create" msgstr "" -#: library/curses.rst:1593 +#: library/curses.rst:1592 msgid "Shifted Delete char" msgstr "" -#: library/curses.rst:1595 +#: library/curses.rst:1594 msgid "Shifted Delete line" msgstr "" -#: library/curses.rst:1597 +#: library/curses.rst:1596 msgid "Select" msgstr "" -#: library/curses.rst:1599 +#: library/curses.rst:1598 msgid "Shifted End" msgstr "" -#: library/curses.rst:1601 +#: library/curses.rst:1600 msgid "Shifted Clear line" msgstr "" -#: library/curses.rst:1603 +#: library/curses.rst:1602 msgid "Shifted Exit" msgstr "" -#: library/curses.rst:1605 +#: library/curses.rst:1604 msgid "Shifted Find" msgstr "" -#: library/curses.rst:1607 +#: library/curses.rst:1606 msgid "Shifted Help" msgstr "" -#: library/curses.rst:1609 +#: library/curses.rst:1608 msgid "Shifted Home" msgstr "" -#: library/curses.rst:1611 +#: library/curses.rst:1610 msgid "Shifted Input" msgstr "" -#: library/curses.rst:1613 +#: library/curses.rst:1612 msgid "Shifted Left arrow" msgstr "" -#: library/curses.rst:1615 +#: library/curses.rst:1614 msgid "Shifted Message" msgstr "" -#: library/curses.rst:1617 +#: library/curses.rst:1616 msgid "Shifted Move" msgstr "" -#: library/curses.rst:1619 +#: library/curses.rst:1618 msgid "Shifted Next" msgstr "" -#: library/curses.rst:1621 +#: library/curses.rst:1620 msgid "Shifted Options" msgstr "" -#: library/curses.rst:1623 +#: library/curses.rst:1622 msgid "Shifted Prev" msgstr "" -#: library/curses.rst:1625 +#: library/curses.rst:1624 msgid "Shifted Print" msgstr "" -#: library/curses.rst:1627 +#: library/curses.rst:1626 msgid "Shifted Redo" msgstr "" -#: library/curses.rst:1629 +#: library/curses.rst:1628 msgid "Shifted Replace" msgstr "" -#: library/curses.rst:1631 +#: library/curses.rst:1630 msgid "Shifted Right arrow" msgstr "" -#: library/curses.rst:1633 +#: library/curses.rst:1632 msgid "Shifted Resume" msgstr "" -#: library/curses.rst:1635 +#: library/curses.rst:1634 msgid "Shifted Save" msgstr "" -#: library/curses.rst:1637 +#: library/curses.rst:1636 msgid "Shifted Suspend" msgstr "" -#: library/curses.rst:1639 +#: library/curses.rst:1638 msgid "Shifted Undo" msgstr "" -#: library/curses.rst:1641 +#: library/curses.rst:1640 msgid "Suspend" msgstr "" -#: library/curses.rst:1643 +#: library/curses.rst:1642 msgid "Undo" msgstr "*Undo*" -#: library/curses.rst:1645 +#: library/curses.rst:1644 msgid "Mouse event has occurred" msgstr "" -#: library/curses.rst:1647 +#: library/curses.rst:1646 msgid "Terminal resize event" msgstr "" -#: library/curses.rst:1649 +#: library/curses.rst:1648 msgid "Maximum key value" msgstr "" -#: library/curses.rst:1652 +#: 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 " @@ -2048,63 +2056,63 @@ msgid "" "mappings are standard:" msgstr "" -#: library/curses.rst:1661 +#: library/curses.rst:1660 msgid "Keycap" msgstr "" -#: library/curses.rst:1806 library/curses.rst:1930 +#: library/curses.rst:1805 library/curses.rst:1926 msgid "Constant" msgstr "Constante" -#: library/curses.rst:1663 +#: library/curses.rst:1662 msgid ":kbd:`Insert`" msgstr ":kbd:`Insert`" -#: library/curses.rst:1663 +#: library/curses.rst:1662 msgid "KEY_IC" msgstr "" -#: library/curses.rst:1665 +#: library/curses.rst:1664 msgid ":kbd:`Delete`" msgstr ":kbd:`Delete`" -#: library/curses.rst:1665 +#: library/curses.rst:1664 msgid "KEY_DC" msgstr "" -#: library/curses.rst:1667 +#: library/curses.rst:1666 msgid ":kbd:`Home`" msgstr ":kbd:`Home`" -#: library/curses.rst:1667 +#: library/curses.rst:1666 msgid "KEY_HOME" msgstr "KEY_HOME" -#: library/curses.rst:1669 +#: library/curses.rst:1668 msgid ":kbd:`End`" msgstr ":kbd:`End`" -#: library/curses.rst:1669 +#: library/curses.rst:1668 msgid "KEY_END" msgstr "KEY_END" -#: library/curses.rst:1671 +#: library/curses.rst:1670 msgid ":kbd:`Page Up`" msgstr ":kbd:`Page Up`" -#: library/curses.rst:1671 +#: library/curses.rst:1670 msgid "KEY_PPAGE" msgstr "KEY_PPAGE" -#: library/curses.rst:1673 +#: library/curses.rst:1672 msgid ":kbd:`Page Down`" msgstr ":kbd:`Page Down`" -#: library/curses.rst:1673 +#: library/curses.rst:1672 msgid "KEY_NPAGE" msgstr "KEY_NPAGE" -#: library/curses.rst:1678 +#: 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 " @@ -2112,270 +2120,270 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: library/curses.rst:1685 +#: library/curses.rst:1684 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: library/curses.rst:1688 +#: library/curses.rst:1687 msgid "ACS code" msgstr "" -#: library/curses.rst:1690 +#: library/curses.rst:1689 msgid "alternate name for upper right corner" msgstr "" -#: library/curses.rst:1692 +#: library/curses.rst:1691 msgid "solid square block" msgstr "" -#: library/curses.rst:1694 +#: library/curses.rst:1693 msgid "board of squares" msgstr "" -#: library/curses.rst:1696 +#: library/curses.rst:1695 msgid "alternate name for horizontal line" msgstr "" -#: library/curses.rst:1698 +#: library/curses.rst:1697 msgid "alternate name for upper left corner" msgstr "" -#: library/curses.rst:1700 +#: library/curses.rst:1699 msgid "alternate name for top tee" msgstr "" -#: library/curses.rst:1702 +#: library/curses.rst:1701 msgid "bottom tee" msgstr "" -#: library/curses.rst:1704 +#: library/curses.rst:1703 msgid "bullet" msgstr "" -#: library/curses.rst:1706 +#: library/curses.rst:1705 msgid "checker board (stipple)" msgstr "" -#: library/curses.rst:1708 +#: library/curses.rst:1707 msgid "arrow pointing down" msgstr "" -#: library/curses.rst:1710 +#: library/curses.rst:1709 msgid "degree symbol" msgstr "" -#: library/curses.rst:1712 +#: library/curses.rst:1711 msgid "diamond" msgstr "" -#: library/curses.rst:1714 +#: library/curses.rst:1713 msgid "greater-than-or-equal-to" msgstr "" -#: library/curses.rst:1716 +#: library/curses.rst:1715 msgid "horizontal line" msgstr "" -#: library/curses.rst:1718 +#: library/curses.rst:1717 msgid "lantern symbol" msgstr "" -#: library/curses.rst:1720 +#: library/curses.rst:1719 msgid "left arrow" msgstr "" -#: library/curses.rst:1722 +#: library/curses.rst:1721 msgid "less-than-or-equal-to" msgstr "" -#: library/curses.rst:1724 +#: library/curses.rst:1723 msgid "lower left-hand corner" msgstr "" -#: library/curses.rst:1726 +#: library/curses.rst:1725 msgid "lower right-hand corner" msgstr "" -#: library/curses.rst:1728 +#: library/curses.rst:1727 msgid "left tee" msgstr "" -#: library/curses.rst:1730 +#: library/curses.rst:1729 msgid "not-equal sign" msgstr "" -#: library/curses.rst:1732 +#: library/curses.rst:1731 msgid "letter pi" msgstr "" -#: library/curses.rst:1734 +#: library/curses.rst:1733 msgid "plus-or-minus sign" msgstr "" -#: library/curses.rst:1736 +#: library/curses.rst:1735 msgid "big plus sign" msgstr "" -#: library/curses.rst:1738 +#: library/curses.rst:1737 msgid "right arrow" msgstr "" -#: library/curses.rst:1740 +#: library/curses.rst:1739 msgid "right tee" msgstr "" -#: library/curses.rst:1742 +#: library/curses.rst:1741 msgid "scan line 1" msgstr "" -#: library/curses.rst:1744 +#: library/curses.rst:1743 msgid "scan line 3" msgstr "" -#: library/curses.rst:1746 +#: library/curses.rst:1745 msgid "scan line 7" msgstr "" -#: library/curses.rst:1748 +#: library/curses.rst:1747 msgid "scan line 9" msgstr "" -#: library/curses.rst:1750 +#: library/curses.rst:1749 msgid "alternate name for lower right corner" msgstr "" -#: library/curses.rst:1752 +#: library/curses.rst:1751 msgid "alternate name for vertical line" msgstr "" -#: library/curses.rst:1754 +#: library/curses.rst:1753 msgid "alternate name for right tee" msgstr "" -#: library/curses.rst:1756 +#: library/curses.rst:1755 msgid "alternate name for lower left corner" msgstr "" -#: library/curses.rst:1758 +#: library/curses.rst:1757 msgid "alternate name for bottom tee" msgstr "" -#: library/curses.rst:1760 +#: library/curses.rst:1759 msgid "alternate name for left tee" msgstr "" -#: library/curses.rst:1762 +#: library/curses.rst:1761 msgid "alternate name for crossover or big plus" msgstr "" -#: library/curses.rst:1764 +#: library/curses.rst:1763 msgid "pound sterling" msgstr "" -#: library/curses.rst:1766 +#: library/curses.rst:1765 msgid "top tee" msgstr "" -#: library/curses.rst:1768 +#: library/curses.rst:1767 msgid "up arrow" msgstr "" -#: library/curses.rst:1770 +#: library/curses.rst:1769 msgid "upper left corner" msgstr "" -#: library/curses.rst:1772 +#: library/curses.rst:1771 msgid "upper right corner" msgstr "" -#: library/curses.rst:1774 +#: library/curses.rst:1773 msgid "vertical line" msgstr "" -#: library/curses.rst:1777 +#: library/curses.rst:1776 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: library/curses.rst:1780 +#: library/curses.rst:1779 msgid "Mouse button constant" msgstr "" -#: library/curses.rst:1782 +#: library/curses.rst:1781 msgid "Mouse button *n* pressed" msgstr "" -#: library/curses.rst:1784 +#: library/curses.rst:1783 msgid "Mouse button *n* released" msgstr "" -#: library/curses.rst:1786 +#: library/curses.rst:1785 msgid "Mouse button *n* clicked" msgstr "" -#: library/curses.rst:1788 +#: library/curses.rst:1787 msgid "Mouse button *n* double clicked" msgstr "" -#: library/curses.rst:1790 +#: library/curses.rst:1789 msgid "Mouse button *n* triple clicked" msgstr "" -#: library/curses.rst:1792 +#: library/curses.rst:1791 msgid "Shift was down during button state change" msgstr "" -#: library/curses.rst:1796 +#: library/curses.rst:1795 msgid "Control was down during button state change" msgstr "" -#: library/curses.rst:1803 +#: library/curses.rst:1802 msgid "The following table lists the predefined colors:" msgstr "" -#: library/curses.rst:1806 +#: library/curses.rst:1805 msgid "Color" msgstr "" -#: library/curses.rst:1808 +#: library/curses.rst:1807 msgid "Black" msgstr "" -#: library/curses.rst:1810 +#: library/curses.rst:1809 msgid "Blue" msgstr "" -#: library/curses.rst:1812 +#: library/curses.rst:1811 msgid "Cyan (light greenish blue)" msgstr "" -#: library/curses.rst:1814 +#: library/curses.rst:1813 msgid "Green" msgstr "" -#: library/curses.rst:1816 +#: library/curses.rst:1815 msgid "Magenta (purplish red)" msgstr "" -#: library/curses.rst:1818 +#: library/curses.rst:1817 msgid "Red" msgstr "" -#: library/curses.rst:1820 +#: library/curses.rst:1819 msgid "White" msgstr "" -#: library/curses.rst:1822 +#: library/curses.rst:1821 msgid "Yellow" msgstr "" -#: library/curses.rst:1827 -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:1835 +#: 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 " @@ -2383,11 +2391,11 @@ msgid "" "purposes." msgstr "" -#: library/curses.rst:1841 -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:1846 +#: 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 " @@ -2399,15 +2407,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: library/curses.rst:1859 +#: library/curses.rst:1855 msgid "Textbox objects" msgstr "" -#: library/curses.rst:1861 +#: library/curses.rst:1857 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: library/curses.rst:1866 +#: 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 " @@ -2416,13 +2424,13 @@ msgid "" "0)``. The instance's :attr:`stripspaces` flag is initially on." msgstr "" -#: library/curses.rst:1872 +#: 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:1877 +#: 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 " @@ -2433,172 +2441,172 @@ msgid "" "the :attr:`stripspaces` attribute." msgstr "" -#: library/curses.rst:1888 +#: library/curses.rst:1884 msgid "" "Process a single command keystroke. Here are the supported special " "keystrokes:" msgstr "" -#: library/curses.rst:1930 +#: library/curses.rst:1926 msgid "Keystroke" msgstr "" -#: library/curses.rst:1892 +#: library/curses.rst:1888 msgid "Action" msgstr "Action" -#: library/curses.rst:1894 +#: library/curses.rst:1890 msgid ":kbd:`Control-A`" msgstr ":kbd:`Control-A`" -#: library/curses.rst:1894 +#: library/curses.rst:1890 msgid "Go to left edge of window." msgstr "" -#: library/curses.rst:1932 +#: library/curses.rst:1928 msgid ":kbd:`Control-B`" msgstr ":kbd:`Control-B`" -#: library/curses.rst:1896 +#: library/curses.rst:1892 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: library/curses.rst:1899 +#: library/curses.rst:1895 msgid ":kbd:`Control-D`" msgstr ":kbd:`Control-D`" -#: library/curses.rst:1899 +#: library/curses.rst:1895 msgid "Delete character under cursor." msgstr "" -#: library/curses.rst:1901 +#: library/curses.rst:1897 msgid ":kbd:`Control-E`" msgstr ":kbd:`Control-E`" -#: library/curses.rst:1901 +#: library/curses.rst:1897 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: library/curses.rst:1934 +#: library/curses.rst:1930 msgid ":kbd:`Control-F`" msgstr ":kbd:`Control-F`" -#: library/curses.rst:1904 +#: library/curses.rst:1900 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: library/curses.rst:1907 +#: library/curses.rst:1903 msgid ":kbd:`Control-G`" msgstr ":kbd:`Control-G`" -#: library/curses.rst:1907 +#: library/curses.rst:1903 msgid "Terminate, returning the window contents." msgstr "" -#: library/curses.rst:1909 +#: library/curses.rst:1905 msgid ":kbd:`Control-H`" msgstr ":kbd:`Control-H`" -#: library/curses.rst:1909 +#: library/curses.rst:1905 msgid "Delete character backward." msgstr "" -#: library/curses.rst:1911 +#: library/curses.rst:1907 msgid ":kbd:`Control-J`" msgstr ":kbd:`Control-J`" -#: library/curses.rst:1911 +#: library/curses.rst:1907 msgid "Terminate if the window is 1 line, otherwise insert newline." msgstr "" -#: library/curses.rst:1914 +#: library/curses.rst:1910 msgid ":kbd:`Control-K`" msgstr ":kbd:`Control-K`" -#: library/curses.rst:1914 +#: library/curses.rst:1910 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: library/curses.rst:1917 +#: library/curses.rst:1913 msgid ":kbd:`Control-L`" msgstr ":kbd:`Control-L`" -#: library/curses.rst:1917 +#: library/curses.rst:1913 msgid "Refresh screen." msgstr "" -#: library/curses.rst:1938 +#: library/curses.rst:1934 msgid ":kbd:`Control-N`" msgstr ":kbd:`Control-N`" -#: library/curses.rst:1919 +#: library/curses.rst:1915 msgid "Cursor down; move down one line." msgstr "" -#: library/curses.rst:1921 +#: library/curses.rst:1917 msgid ":kbd:`Control-O`" msgstr ":kbd:`Control-O`" -#: library/curses.rst:1921 +#: library/curses.rst:1917 msgid "Insert a blank line at cursor location." msgstr "" -#: library/curses.rst:1936 +#: library/curses.rst:1932 msgid ":kbd:`Control-P`" msgstr ":kbd:`Control-P`" -#: library/curses.rst:1923 +#: library/curses.rst:1919 msgid "Cursor up; move up one line." msgstr "" -#: library/curses.rst:1926 +#: 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:1932 +#: library/curses.rst:1928 #, fuzzy msgid ":const:`~curses.KEY_LEFT`" msgstr ":const:`KEY_LEFT`" -#: library/curses.rst:1934 +#: library/curses.rst:1930 #, fuzzy msgid ":const:`~curses.KEY_RIGHT`" msgstr ":const:`KEY_RIGHT`" -#: library/curses.rst:1936 +#: library/curses.rst:1932 #, fuzzy msgid ":const:`~curses.KEY_UP`" msgstr ":const:`KEY_UP`" -#: library/curses.rst:1938 +#: library/curses.rst:1934 #, fuzzy msgid ":const:`~curses.KEY_DOWN`" msgstr ":const:`KEY_DOWN`" -#: library/curses.rst:1940 +#: library/curses.rst:1936 #, fuzzy msgid ":const:`~curses.KEY_BACKSPACE`" msgstr ":const:`KEY_BACKSPACE`" -#: library/curses.rst:1940 +#: library/curses.rst:1936 msgid ":kbd:`Control-h`" msgstr ":kbd:`Control-h`" -#: library/curses.rst:1943 +#: 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:1949 +#: 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:1955 +#: 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 120d28d408..eaf3812891 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: 2025-10-17 09:58+0200\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" @@ -19,11 +19,11 @@ msgstr "" msgid ":mod:`!dataclasses` --- Data Classes" 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 +#: library/dataclasses.rst:11 msgid "" "This module provides a decorator and functions for automatically adding " "generated :term:`special methods ` such " @@ -35,7 +35,7 @@ msgstr "" "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::" @@ -43,14 +43,14 @@ 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 à ::" -#: library/dataclasses.rst:41 +#: library/dataclasses.rst:38 #, fuzzy msgid "" "Note that this method is automatically added to the class: it is not " @@ -59,11 +59,11 @@ 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 " @@ -74,7 +74,7 @@ msgstr "" "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 " @@ -88,7 +88,7 @@ msgstr "" "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." @@ -96,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 " @@ -110,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 " @@ -122,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 " @@ -135,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." @@ -143,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 " @@ -160,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." @@ -168,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 " @@ -181,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." @@ -189,7 +189,7 @@ 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 " @@ -207,7 +207,7 @@ msgstr "" "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:`!" @@ -218,7 +218,7 @@ msgstr "" "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 true, force ``dataclasses`` to create " @@ -229,7 +229,7 @@ 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*." -#: library/dataclasses.rst:130 +#: library/dataclasses.rst:127 #, fuzzy msgid "" ":meth:`!__hash__` is used by built-in :meth:`hash`, and when objects are " @@ -247,7 +247,7 @@ msgstr "" "et du comportement de la méthode :meth:`__eq__`, et des valeurs des options " "*eq* et *frozen* dans l’appel au décorateur :func:`dataclass`." -#: library/dataclasses.rst:137 +#: library/dataclasses.rst:134 #, fuzzy msgid "" "By default, ``@dataclass`` will not implicitly add " @@ -263,7 +263,7 @@ msgstr "" "a une signification particulière, comme précisé dans la documentation " "de :meth:`__hash__`." -#: library/dataclasses.rst:143 +#: library/dataclasses.rst:140 #, fuzzy msgid "" "If :meth:`!__hash__` is not explicitly defined, or if it is set to ``None``, " @@ -282,7 +282,7 @@ msgstr "" "possible. Il s'agit là d'un cas particulier qui doit être considéré avec la " "plus grande prudence." -#: library/dataclasses.rst:150 +#: library/dataclasses.rst:147 #, fuzzy msgid "" "Here are the rules governing implicit creation of a :meth:`!__hash__` " @@ -295,7 +295,7 @@ msgstr "" "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:155 +#: library/dataclasses.rst:152 #, fuzzy msgid "" "If *eq* and *frozen* are both true, by default ``@dataclass`` will generate " @@ -315,7 +315,7 @@ msgstr "" "parente sera utilisée (si la classe parente est :class:`object`, le " "comportement est un hachage basé sur les id)." -#: library/dataclasses.rst:163 +#: library/dataclasses.rst:160 #, fuzzy msgid "" "*frozen*: If true (the default is ``False``), assigning to fields will " @@ -328,7 +328,7 @@ msgstr "" "sur la classe, alors une :exc:`TypeError` est levée. Voir la discussion ci-" "dessous." -#: library/dataclasses.rst:167 +#: library/dataclasses.rst:164 #, fuzzy msgid "" "If :meth:`~object.__setattr__` or :meth:`~object.__delattr__` is defined in " @@ -338,7 +338,7 @@ msgstr "" "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:170 +#: library/dataclasses.rst:167 #, fuzzy msgid "" "*match_args*: If true (the default is ``True``), " @@ -354,7 +354,7 @@ 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:179 +#: library/dataclasses.rst:176 #, fuzzy msgid "" "*kw_only*: If true (the default value is ``False``), then all fields will be " @@ -373,11 +373,11 @@ msgstr "" "` du glossaire pour plus d'informations. Voir également la " "section :const:`KW_ONLY`." -#: library/dataclasses.rst:187 +#: library/dataclasses.rst:184 msgid "Keyword-only fields are not included in :attr:`!__match_args__`." msgstr "" -#: library/dataclasses.rst:191 +#: library/dataclasses.rst:188 #, fuzzy msgid "" "*slots*: If true (the default is ``False``), :attr:`~object.__slots__` " @@ -390,7 +390,7 @@ msgstr "" "à 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:197 +#: 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 " @@ -398,7 +398,7 @@ msgid "" "workaround. See :gh:`91126` for full details." msgstr "" -#: library/dataclasses.rst:205 +#: library/dataclasses.rst:202 #, fuzzy msgid "" "If a field name is already included in the :attr:`!__slots__` of a base " @@ -416,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:215 +#: library/dataclasses.rst:212 #, fuzzy msgid "" "*weakref_slot*: If true (the default is ``False``), add a slot named " @@ -429,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:223 +#: library/dataclasses.rst:220 msgid "" "``field``\\s may optionally specify a default value, using normal Python " "syntax::" @@ -437,7 +437,7 @@ msgstr "" "Les champs peuvent éventuellement préciser une valeur par défaut, en " "utilisant la syntaxe Python normale ::" -#: library/dataclasses.rst:231 +#: library/dataclasses.rst:228 #, fuzzy msgid "" "In this example, both :attr:`!a` and :attr:`!b` will be included in the " @@ -446,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:236 +#: 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 " @@ -456,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:242 +#: library/dataclasses.rst:239 #, fuzzy msgid "" "For common and simple use cases, no other functionality is required. There " @@ -472,7 +472,7 @@ msgstr "" "fonction :func:`field` à la place de la valeur par défaut, comme dans cet " "exemple ::" -#: library/dataclasses.rst:255 +#: 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 " @@ -486,12 +486,12 @@ msgstr "" "sentinelle :const:`MISSING` est interne au module et ne doit pas être " "utilisée dans vos programmes." -#: library/dataclasses.rst:260 +#: library/dataclasses.rst:257 #, fuzzy msgid "The parameters to :func:`!field` are:" msgstr "Les paramètres de :func:`field` sont :" -#: library/dataclasses.rst:262 +#: library/dataclasses.rst:259 #, fuzzy msgid "" "*default*: If provided, this will be the default value for this field. This " @@ -502,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:266 +#: library/dataclasses.rst:263 #, fuzzy msgid "" "*default_factory*: If provided, it must be a zero-argument callable that " @@ -517,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:272 +#: library/dataclasses.rst:269 #, fuzzy msgid "" "*init*: If true (the default), this field is included as a parameter to the " @@ -526,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:275 +#: library/dataclasses.rst:272 #, fuzzy msgid "" "*repr*: If true (the default), this field is included in the string returned " @@ -535,7 +535,7 @@ 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:278 +#: library/dataclasses.rst:275 #, fuzzy msgid "" "*hash*: This can be a bool or ``None``. If true, this field is included in " @@ -553,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 " @@ -568,7 +568,7 @@ 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 " @@ -579,7 +579,7 @@ msgstr "" "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 " @@ -594,7 +594,7 @@ 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 " @@ -604,15 +604,15 @@ msgstr "" "Cela est utilisé lors du traitement des paramètres de la " "méthode :meth:`__init__` générée." -#: library/dataclasses.rst:308 +#: library/dataclasses.rst:305 msgid "Keyword-only fields are also not included in :attr:`!__match_args__`." msgstr "" -#: library/dataclasses.rst:312 +#: library/dataclasses.rst:309 msgid "*doc*: optional docstring for this field." msgstr "" -#: library/dataclasses.rst:316 +#: library/dataclasses.rst:313 #, fuzzy msgid "" "If the default value of a field is specified by a call to :func:`!field`, " @@ -631,7 +631,7 @@ msgstr "" "valeurs par défaut des champs exactement comme si elles avaient été définies " "directement. Par exemple ::" -#: library/dataclasses.rst:332 +#: library/dataclasses.rst:329 #, fuzzy msgid "" "The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!" @@ -642,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:338 +#: 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 " @@ -656,17 +662,17 @@ msgstr "" "instancier un objet :class:`Field` eux-mêmes. Les attributs documentés sont " "les suivants :" -#: library/dataclasses.rst:343 +#: library/dataclasses.rst:344 #, fuzzy msgid ":attr:`!name`: The name of the field." msgstr "*name* : le nom du champ ;" -#: library/dataclasses.rst:344 +#: 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:345 +#: library/dataclasses.rst:346 #, fuzzy msgid "" ":attr:`!default`, :attr:`!default_factory`, :attr:`!init`, :attr:`!" @@ -678,7 +684,7 @@ msgstr "" "``metadata`` et ``kw_only`` qui correspondent aux paramètres " "de :func:`field` et en prennent les valeurs." -#: library/dataclasses.rst:349 +#: library/dataclasses.rst:350 msgid "" "Other attributes may exist, but they are private and must not be inspected " "or relied on." @@ -686,7 +692,7 @@ 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:354 +#: library/dataclasses.rst:355 msgid "" "``InitVar[T]`` type annotations describe variables that are :ref:`init-only " "`. Fields annotated with :class:`!InitVar` " @@ -695,7 +701,7 @@ msgid "" "parameters to :meth:`~object.__init__` and an optional :meth:`__post_init__`." msgstr "" -#: library/dataclasses.rst:363 +#: 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. " @@ -708,13 +714,13 @@ msgstr "" "telle classe ; si ce n'est pas le cas, une exception :exc:`TypeError` est " "levée." -#: library/dataclasses.rst:370 +#: 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 " @@ -722,20 +728,20 @@ msgstr "" "données sont parcourus récursivement. Les autres objets sont copiés " "avec :func:`copy.deepcopy`." -#: library/dataclasses.rst:376 +#: 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:413 +#: 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:397 +#: library/dataclasses.rst:398 #, fuzzy msgid "" ":func:`!asdict` raises :exc:`TypeError` if *obj* is not a dataclass instance." @@ -743,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:402 +#: 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 " @@ -757,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:408 +#: library/dataclasses.rst:409 msgid "Continuing from the previous example::" msgstr "Pour continuer l'exemple précédent ::" -#: library/dataclasses.rst:417 +#: library/dataclasses.rst:418 #, fuzzy msgid "" ":func:`!astuple` raises :exc:`TypeError` if *obj* is not a dataclass " @@ -770,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:422 +#: library/dataclasses.rst:423 #, fuzzy msgid "" "Creates a new dataclass with name *cls_name*, fields as defined in *fields*, " @@ -792,13 +798,13 @@ msgstr "" "``match_args``, ``kw_only``, ``slots`` et ``weakref_slot`` ont la même " "signification que dans :func:`dataclass`." -#: library/dataclasses.rst:432 +#: 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:436 +#: 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 " @@ -806,7 +812,7 @@ msgid "" "function is used." msgstr "" -#: library/dataclasses.rst:441 +#: library/dataclasses.rst:442 #, fuzzy msgid "" "This function is not strictly required, because any Python mechanism for " @@ -819,15 +825,15 @@ msgstr "" "``__annotation__`` et de lui appliquer la fonction :func:`dataclass`, qui la " "convertit en une classe de données. Par exemple, ceci ::" -#: library/dataclasses.rst:453 +#: library/dataclasses.rst:454 msgid "Is equivalent to::" msgstr "est équivalent à ::" -#: library/dataclasses.rst:464 +#: library/dataclasses.rst:465 msgid "Added the *decorator* parameter." msgstr "" -#: library/dataclasses.rst:469 +#: library/dataclasses.rst:470 #, fuzzy msgid "" "Creates a new object of the same type as *obj*, replacing fields with values " @@ -840,7 +846,7 @@ msgstr "" "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:474 +#: library/dataclasses.rst:475 #, fuzzy msgid "" "The newly returned object is created by calling the :meth:`~object.__init__` " @@ -851,7 +857,7 @@ msgstr "" "classe de données, ce qui garantit que :meth:`__post_init__` est appelée (si " "elle existe)." -#: library/dataclasses.rst:478 +#: library/dataclasses.rst:479 #, fuzzy msgid "" "Init-only variables without default values, if any exist, must be specified " @@ -862,7 +868,7 @@ msgstr "" "il faut l'inclure dans l'appel à :func:`replace` afin qu'il soit passé " "à :meth:`__init__` et :meth:`__post_init__`." -#: library/dataclasses.rst:482 +#: library/dataclasses.rst:483 #, fuzzy msgid "" "It is an error for *changes* to contain any fields that are defined as " @@ -871,7 +877,7 @@ msgstr "" "Si une clé de *changes* correspond à un champ défini avec " "``init=False``, :exc:`ValueError` est levée." -#: library/dataclasses.rst:486 +#: library/dataclasses.rst:487 #, fuzzy msgid "" "Be forewarned about how ``init=False`` fields work during a call to :func:`!" @@ -890,22 +896,23 @@ msgstr "" "instances par des constructeurs de classe alternatifs, ou bien une méthode " "personnalisée ``replace()`` (ou un nom similaire)." -#: library/dataclasses.rst:495 +#: library/dataclasses.rst:496 msgid "" "Dataclass instances are also supported by generic " "function :func:`copy.replace`." msgstr "" -#: library/dataclasses.rst:499 +#: 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:502 +#: 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, " @@ -915,13 +922,13 @@ msgstr "" "non pas lui-même une classe de données, ajoutez le test ``not " "isinstance(obj, type)`` ::" -#: library/dataclasses.rst:511 +#: 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:515 +#: library/dataclasses.rst:517 #, fuzzy msgid "" "A sentinel value used as a type annotation. Any fields after a pseudo-field " @@ -941,14 +948,14 @@ msgstr "" "exclusivement nommés doivent être spécifiés par leur nom lors de " "l'instanciation de la classe." -#: library/dataclasses.rst:524 +#: 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:535 +#: library/dataclasses.rst:537 #, fuzzy msgid "" "In a single dataclass, it is an error to specify more than one field whose " @@ -957,7 +964,7 @@ 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:542 +#: library/dataclasses.rst:544 #, fuzzy msgid "" "Raised when an implicitly defined :meth:`~object.__setattr__` " @@ -968,11 +975,11 @@ msgstr "" "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:549 +#: library/dataclasses.rst:551 msgid "Post-init processing" msgstr "Post-initialisation" -#: library/dataclasses.rst:553 +#: library/dataclasses.rst:555 #, fuzzy msgid "" "When defined on the class, it will be called by the " @@ -990,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:560 +#: library/dataclasses.rst:562 msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" @@ -998,7 +1005,7 @@ msgstr "" "Cette méthode permet, entre autres, d'initialiser des champs qui dépendent " "d'autres champs. Par exemple ::" -#: library/dataclasses.rst:572 +#: library/dataclasses.rst:574 #, fuzzy msgid "" "The :meth:`~object.__init__` method generated by :deco:`dataclass` does not " @@ -1011,7 +1018,7 @@ msgstr "" "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:589 +#: library/dataclasses.rst:591 #, fuzzy msgid "" "Note, however, that in general the dataclass-generated :meth:`!__init__` " @@ -1023,7 +1030,7 @@ 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:593 +#: library/dataclasses.rst:595 #, fuzzy msgid "" "See the section below on init-only variables for ways to pass parameters " @@ -1035,11 +1042,11 @@ msgstr "" "l'avertissement sur le traitement par :func:`replace` des champs définis " "avec ``init=False``." -#: library/dataclasses.rst:600 +#: library/dataclasses.rst:602 msgid "Class variables" msgstr "Variables de classe" -#: library/dataclasses.rst:602 +#: library/dataclasses.rst:604 #, fuzzy msgid "" "One of the few places where :deco:`dataclass` actually inspects the type of " @@ -1057,11 +1064,11 @@ 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:613 +#: library/dataclasses.rst:615 msgid "Init-only variables" msgstr "Variables d'initialisation" -#: library/dataclasses.rst:615 +#: library/dataclasses.rst:617 #, fuzzy msgid "" "Another place where :deco:`dataclass` inspects a type annotation is to " @@ -1082,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:625 +#: 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::" @@ -1090,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:640 +#: library/dataclasses.rst:642 #, fuzzy msgid "" "In this case, :func:`fields` will return :class:`Field` objects for :attr:`!" @@ -1099,11 +1106,11 @@ msgstr "" "Ici, :func:`fields` renvoie des objets :class:`Field` correspondant à ``i`` " "et à ``j``, mais pas à ``database``." -#: library/dataclasses.rst:646 +#: library/dataclasses.rst:648 msgid "Frozen instances" msgstr "Instances figées" -#: library/dataclasses.rst:648 +#: library/dataclasses.rst:650 #, fuzzy msgid "" "It is not possible to create truly immutable Python objects. However, by " @@ -1119,7 +1126,7 @@ 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:654 +#: library/dataclasses.rst:656 #, fuzzy msgid "" "There is a tiny performance penalty when using " @@ -1130,11 +1137,11 @@ msgstr "" "car :meth:`__init__` doit passer par :meth:`object.__setattr__` au lieu de " "simples affectations pour initialiser les champs." -#: library/dataclasses.rst:663 +#: library/dataclasses.rst:665 msgid "Inheritance" msgstr "Héritage" -#: library/dataclasses.rst:665 +#: library/dataclasses.rst:667 #, fuzzy msgid "" "When the dataclass is being created by the :deco:`dataclass` decorator, it " @@ -1155,7 +1162,7 @@ msgstr "" "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:685 +#: library/dataclasses.rst:687 #, fuzzy msgid "" "The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. " @@ -1165,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:688 +#: 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:693 +#: 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:695 +#: library/dataclasses.rst:697 #, fuzzy msgid "" "After the parameters needed for :meth:`~object.__init__` are computed, any " @@ -1192,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:701 +#: library/dataclasses.rst:703 #, fuzzy msgid "" "In this example, :attr:`!Base.y`, :attr:`!Base.w`, and :attr:`!D.t` are " @@ -1203,12 +1210,12 @@ msgstr "" "exclusivement nommés alors que ``Base.x`` et ``D.z`` sont des champs " "normaux ::" -#: library/dataclasses.rst:716 +#: 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:720 +#: 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 " @@ -1218,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:724 +#: library/dataclasses.rst:726 #, fuzzy msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" @@ -1227,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:729 +#: library/dataclasses.rst:731 msgid "Default factory functions" msgstr "Fabriques de valeurs par défaut" -#: library/dataclasses.rst:731 +#: library/dataclasses.rst:733 #, fuzzy msgid "" "If a :func:`field` specifies a *default_factory*, it is called with zero " @@ -1242,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:737 +#: library/dataclasses.rst:739 #, fuzzy msgid "" "If a field is excluded from :meth:`~object.__init__` (using ``init=False``) " @@ -1256,11 +1263,11 @@ msgstr "" "chaque nouvelle instance, puisque c'est le seul moyen d'obtenir une valeur à " "laquelle initialiser le champ." -#: library/dataclasses.rst:744 +#: library/dataclasses.rst:746 msgid "Mutable default values" msgstr "Valeurs par défaut mutables" -#: library/dataclasses.rst:746 +#: library/dataclasses.rst:748 msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" @@ -1268,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:761 +#: library/dataclasses.rst:763 #, fuzzy msgid "" "Note that the two instances of class :class:`!C` share the same class " @@ -1277,15 +1284,15 @@ msgstr "" "Comme attendu, les deux instances de ``C`` partagent le même objet pour " "l'attribut ``x``." -#: library/dataclasses.rst:764 +#: 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:772 +#: library/dataclasses.rst:774 msgid "it would generate code similar to::" msgstr "il générerait un code équivalent à ::" -#: library/dataclasses.rst:783 +#: library/dataclasses.rst:785 #, fuzzy msgid "" "This has the same issue as the original example using class :class:`!C`. " @@ -1309,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:794 +#: library/dataclasses.rst:796 msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" @@ -1318,7 +1325,7 @@ msgstr "" "objet pour chaque instance, utilisez une fonction de fabrique ::" # suit un ':' -#: library/dataclasses.rst:803 +#: library/dataclasses.rst:805 #, fuzzy msgid "" "Instead of looking for and disallowing objects of " @@ -1331,31 +1338,31 @@ msgstr "" "par défaut. Le caractère non-hachable est utilisé pour approximer la " "muabilité." -#: library/dataclasses.rst:810 +#: library/dataclasses.rst:812 msgid "Descriptor-typed fields" msgstr "" -#: library/dataclasses.rst:812 +#: 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:815 +#: 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:819 +#: 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." msgstr "" -#: library/dataclasses.rst:823 +#: library/dataclasses.rst:825 msgid "" "To determine whether a field contains a default value, :deco:`dataclass` " "will call the descriptor's :meth:`!__get__` method using its class access " @@ -1365,7 +1372,7 @@ msgid "" "default value will be provided for the field." msgstr "" -#: library/dataclasses.rst:858 +#: 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/datetime.po b/library/datetime.po index dbce6fed32..378c2ad662 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: 2025-10-17 09:58+0200\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,51 +42,52 @@ 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. " +"Third-party library that introduces distinct static types to for example, " "allow :term:`static type checkers ` to differentiate " "between naive and aware datetimes." msgstr "" @@ -94,11 +95,12 @@ msgstr "" "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,12 +141,13 @@ 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 " +"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 "" @@ -156,7 +159,7 @@ msgstr "" "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 " @@ -176,15 +179,15 @@ msgstr "" "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." @@ -192,7 +195,7 @@ msgstr "" "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." @@ -200,16 +203,17 @@ msgstr "" "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`, " @@ -219,7 +223,7 @@ msgstr "" "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 " @@ -233,7 +237,7 @@ msgstr "" "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`, " @@ -243,7 +247,7 @@ msgstr "" "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." @@ -251,7 +255,7 @@ msgstr "" "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 " @@ -264,7 +268,7 @@ msgstr "" "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." @@ -272,19 +276,27 @@ msgstr "" "Une classe qui implémente la classe mère 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:" @@ -292,7 +304,7 @@ msgstr "" "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." @@ -300,7 +312,7 @@ 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." @@ -309,7 +321,8 @@ msgstr "" "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 @@ -368,11 +381,12 @@ msgstr "" "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." @@ -380,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." @@ -389,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:" @@ -397,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" @@ -421,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 " @@ -443,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 " @@ -458,7 +480,7 @@ 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." @@ -466,7 +488,7 @@ msgstr "" "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::" @@ -474,7 +496,7 @@ msgstr "" "Notez que la normalisation de valeurs négatives peut être surprenante au " "premier abord. Par exemple ::" -#: library/datetime.rst:264 +#: library/datetime.rst:271 #, fuzzy msgid "" "Since the string representation of :class:`!timedelta` objects can be " @@ -483,15 +505,15 @@ msgstr "" "Renvoie une chaîne de la forme objet :class:`timedelta` comme un appel " "construit avec des valeurs d'attributs canoniques." -#: library/datetime.rst:615 library/datetime.rst:1813 library/datetime.rst:2434 +#: library/datetime.rst:628 library/datetime.rst:1850 library/datetime.rst:2486 msgid "Class attributes:" msgstr "Attributs de la classe :" -#: library/datetime.rst:285 +#: 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:290 +#: library/datetime.rst:297 msgid "" "The most positive :class:`timedelta` object, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." @@ -499,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:296 +#: library/datetime.rst:303 msgid "" "The smallest possible difference between non-equal :class:`timedelta` " "objects, ``timedelta(microseconds=1)``." @@ -507,7 +529,7 @@ msgstr "" "La plus petite différence entre des objets :class:`timedelta` non égaux, " "``timedelta(microseconds=1)``." -#: library/datetime.rst:299 +#: library/datetime.rst:307 msgid "" "Note that, because of normalization, ``timedelta.max`` is greater than ``-" "timedelta.min``. ``-timedelta.max`` is not representable as " @@ -517,46 +539,46 @@ msgstr "" "grand que ``-timedelta.min``. ``-timedelta.max`` n'est pas représentable " "sous la forme d'un objet :class:`timedelta`." -#: library/datetime.rst:633 library/datetime.rst:1833 +#: library/datetime.rst:646 library/datetime.rst:1870 msgid "Instance attributes (read-only):" msgstr "Attributs de l'instance (en lecture seule) :" -#: library/datetime.rst:307 +#: library/datetime.rst:315 msgid "Between -999,999,999 and 999,999,999 inclusive." msgstr "Entre -999999999 et 999999999 inclus" -#: library/datetime.rst:312 +#: library/datetime.rst:320 msgid "Between 0 and 86,399 inclusive." msgstr "Entre 0 et 86399 inclus." -#: library/datetime.rst:316 +#: 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:331 +#: library/datetime.rst:340 msgid "Between 0 and 999,999 inclusive." msgstr "Entre 0 et 999999 inclus." -#: library/datetime.rst:650 library/datetime.rst:1248 +#: library/datetime.rst:663 library/datetime.rst:1275 msgid "Supported operations:" msgstr "Opérations gérées :" -#: library/datetime.rst:653 library/datetime.rst:1251 +#: library/datetime.rst:666 library/datetime.rst:1278 msgid "Operation" msgstr "Opération" -#: library/datetime.rst:653 library/datetime.rst:1251 +#: library/datetime.rst:666 library/datetime.rst:1278 msgid "Result" msgstr "Résultat" -#: library/datetime.rst:341 +#: library/datetime.rst:348 msgid "``t1 = t2 + t3``" msgstr "``t1 = t2 + t3``" -#: library/datetime.rst:341 +#: library/datetime.rst:348 msgid "" "Sum of ``t2`` and ``t3``. Afterwards ``t1 - t2 == t3`` and ``t1 - t3 == t2`` " "are true. (1)" @@ -564,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:345 +#: library/datetime.rst:352 msgid "``t1 = t2 - t3``" msgstr "``t1 = t2 - t3``" -#: library/datetime.rst:345 +#: library/datetime.rst:352 msgid "" "Difference of ``t2`` and ``t3``. Afterwards ``t1 == t2 - t3`` and ``t2 == " "t1 + t3`` are true. (1)(6)" @@ -576,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:349 +#: library/datetime.rst:356 msgid "``t1 = t2 * i or t1 = i * t2``" msgstr "``t1 = t2 * i or t1 = i * t2``" -#: library/datetime.rst:349 +#: library/datetime.rst:356 msgid "" "Delta multiplied by an integer. Afterwards ``t1 // i == t2`` is true, " "provided ``i != 0``." @@ -588,15 +610,15 @@ msgstr "" "Delta multiplié par un entier. Ensuite ``t1 // i == t2`` est vrai, en " "admettant que ``i != 0``." -#: library/datetime.rst:353 +#: 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:356 +#: library/datetime.rst:363 msgid "``t1 = t2 * f or t1 = f * t2``" msgstr "``t1 = t2 * f or t1 = f * t2``" -#: library/datetime.rst:356 +#: 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." @@ -605,11 +627,11 @@ msgstr "" "proche de ``timedelta.resolution`` en utilisant la règle de l'arrondi au " "pair le plus proche." -#: library/datetime.rst:360 +#: library/datetime.rst:367 msgid "``f = t2 / t3``" msgstr "``f = t2 / t3``" -#: library/datetime.rst:360 +#: library/datetime.rst:367 msgid "" "Division (3) of overall duration ``t2`` by interval unit ``t3``. Returns " "a :class:`float` object." @@ -617,11 +639,11 @@ msgstr "" "Division (3) de la durée totale ``t2`` par l'unité d'intervalle ``t3``. " "Renvoie un objet :class:`float`." -#: library/datetime.rst:364 +#: library/datetime.rst:371 msgid "``t1 = t2 / f or t1 = t2 / i``" msgstr "``t1 = t2 / f or t1 = t2 / i``" -#: library/datetime.rst:364 +#: 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." @@ -630,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:368 +#: library/datetime.rst:375 msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" msgstr "``t1 = t2 // i`` or ``t1 = t2 // t3``" -#: library/datetime.rst:368 +#: 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)" @@ -642,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:372 +#: library/datetime.rst:379 msgid "``t1 = t2 % t3``" msgstr "``t1 = t2 % t3``" -#: library/datetime.rst:372 +#: 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:375 +#: library/datetime.rst:382 msgid "``q, r = divmod(t1, t2)``" msgstr "``q, r = divmod(t1, t2)``" -#: library/datetime.rst:375 +#: 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." @@ -662,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:380 +#: library/datetime.rst:387 msgid "``+t1``" msgstr "``+t1``" -#: library/datetime.rst:380 +#: 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:383 +#: library/datetime.rst:390 msgid "``-t1``" msgstr "``-t1``" -#: library/datetime.rst:383 +#: library/datetime.rst:390 msgid "" "Equivalent to ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)``, and to " "``t1 * -1``. (1)(4)" @@ -682,11 +704,11 @@ msgstr "" "Équivalent à ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)``, et à " "``t1 * -1``. (1)(4)" -#: library/datetime.rst:387 +#: library/datetime.rst:394 msgid "``abs(t)``" msgstr "``abs(t)``" -#: library/datetime.rst:387 +#: library/datetime.rst:394 msgid "" "Equivalent to ``+t`` when ``t.days >= 0``, and to ``-t`` when ``t.days < " "0``. (2)" @@ -694,11 +716,11 @@ msgstr "" "Équivalent à ``+t`` quand ``t.days >= 0``, et à ``-t`` quand ``t.days < 0``. " "(2)" -#: library/datetime.rst:390 +#: library/datetime.rst:397 msgid "``str(t)``" msgstr "``str(t)``" -#: library/datetime.rst:390 +#: 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)" @@ -706,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:394 +#: library/datetime.rst:401 msgid "``repr(t)``" msgstr "``repr(t)``" -#: library/datetime.rst:394 +#: library/datetime.rst:401 msgid "" "Returns a string representation of the :class:`timedelta` object as a " "constructor call with canonical attribute values." @@ -718,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:672 library/datetime.rst:2663 +#: library/datetime.rst:685 library/datetime.rst:2796 msgid "Notes:" msgstr "Notes :" -#: library/datetime.rst:403 +#: library/datetime.rst:409 msgid "This is exact but may overflow." msgstr "Ceci est exact, mais peut provoquer un débordement." -#: library/datetime.rst:406 +#: 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:409 +#: 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:412 +#: 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:415 +#: library/datetime.rst:421 msgid "" "String representations of :class:`timedelta` objects are normalized " "similarly to their internal representation. This leads to somewhat unusual " @@ -749,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:425 +#: 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 " @@ -759,7 +781,7 @@ 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:429 +#: library/datetime.rst:435 msgid "" "In addition to the operations listed above, :class:`timedelta` objects " "support certain additions and subtractions with :class:`date` " @@ -769,12 +791,13 @@ msgstr "" "implémentent certaines additions et soustractions avec des " "objets :class:`date` et :class:`datetime` (voir ci-dessous)." -#: library/datetime.rst:433 +#: 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 " +"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." +"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 " @@ -782,13 +805,13 @@ msgstr "" "division et la multiplication d'un objet :class:`timedelta` par " "un :class:`float` sont maintenant implémentées." -#: library/datetime.rst:439 +#: 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:441 +#: 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)``." @@ -796,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:714 library/datetime.rst:1956 +#: library/datetime.rst:727 library/datetime.rst:1995 msgid "Instance methods:" msgstr "Méthodes de l'instance :" -#: library/datetime.rst:448 +#: 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:452 +#: 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." @@ -820,23 +844,25 @@ msgstr "" "sur la plupart des plateformes), cette méthode perdra la précision des " "microsecondes." -#: library/datetime.rst:458 -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:460 +#: library/datetime.rst:467 msgid "An additional example of normalization::" msgstr "Un exemple supplémentaire de normalisation ::" -#: library/datetime.rst:472 +#: library/datetime.rst:479 msgid "Examples of :class:`timedelta` arithmetic::" msgstr "Exemples d'arithmétique avec la classe :class:`timedelta` ::" -#: library/datetime.rst:491 -msgid ":class:`date` Objects" +#: library/datetime.rst:499 +#, fuzzy +msgid ":class:`!date` objects" msgstr "Objets :class:`date`" -#: library/datetime.rst:493 +#: 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 " @@ -846,7 +872,7 @@ msgstr "" "calendrier idéal, le calendrier grégorien actuel étant indéfiniment étendu " "dans les deux sens." -#: library/datetime.rst:497 +#: 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. [#]_" @@ -854,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:502 +#: library/datetime.rst:510 msgid "" "All arguments are required. Arguments must be integers, in the following " "ranges:" @@ -862,46 +888,47 @@ msgstr "" "Tous les arguments sont requis. Les arguments peuvent être des entiers, dans " "les intervalles suivants :" -#: library/datetime.rst:505 +#: library/datetime.rst:513 msgid "``MINYEAR <= year <= MAXYEAR``" msgstr "``MINYEAR <= year <= MAXYEAR``" -#: library/datetime.rst:506 +#: library/datetime.rst:514 msgid "``1 <= month <= 12``" msgstr "``1 <= month <= 12``" -#: library/datetime.rst:507 +#: 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:932 +#: 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:937 +#: library/datetime.rst:954 msgid "Other constructors, all class methods:" msgstr "Autres constructeurs, méthodes de classe :" -#: library/datetime.rst:516 +#: library/datetime.rst:524 msgid "Return the current local date." msgstr "Renvoie la date locale courante." -#: library/datetime.rst:518 +#: library/datetime.rst:526 msgid "This is equivalent to ``date.fromtimestamp(time.time())``." msgstr "Cela est équivalent à ``date.fromtimestamp(time.time())``." -#: library/datetime.rst:522 +#: 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:525 +#: 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, " @@ -917,7 +944,7 @@ 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:532 +#: 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` " @@ -929,15 +956,20 @@ msgstr "" "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:541 +#: 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:544 +#: library/datetime.rst:556 msgid "" ":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. " "For any date ``d``, ``date.fromordinal(d.toordinal()) == d``." @@ -946,7 +978,7 @@ msgstr "" "date.max.toordinal()``. Pour toute date ``d``, " "``date.fromordinal(d.toordinal()) == d``." -#: library/datetime.rst:551 +#: 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:" @@ -954,45 +986,46 @@ msgstr "" "Renvoie une :class:`date` correspondant à *date_string* dans un format ISO " "8601 valide, avec les exceptions suivantes :" -#: library/datetime.rst:1097 +#: 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:1099 +#: library/datetime.rst:1125 msgid "" "Extended date representations are not currently supported (``±YYYYYY-MM-" "DD``)." msgstr "" -#: library/datetime.rst:1101 +#: 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:1103 library/datetime.rst:1569 +#: library/datetime.rst:1129 library/datetime.rst:1604 msgid "Examples::" msgstr "Exemples ::" -#: library/datetime.rst:571 +#: 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:576 +#: 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 " +"*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`." -#: library/datetime.rst:583 +#: library/datetime.rst:597 #, fuzzy msgid "" "Return a :class:`.date` corresponding to *date_string*, parsed according to " @@ -1001,7 +1034,7 @@ msgstr "" "Renvoie une classe :class:`.datetime` correspondant à *date_string*, " "analysée selon *format*." -#: library/datetime.rst:588 +#: library/datetime.rst:602 #, fuzzy msgid "" ":exc:`ValueError` is raised if the date_string and format can't be parsed " @@ -1013,26 +1046,26 @@ msgstr "" "pas un *n*-uplet de temps. Voir :ref:`strftime-strptime-behavior` " "et :meth:`datetime.fromisoformat`." -#: library/datetime.rst:595 +#: library/datetime.rst:1184 msgid "" -"If *format* specifies a day of month without a year " -"a :exc:`DeprecationWarning` is 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:" +"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:619 +#: 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:624 +#: 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:629 +#: library/datetime.rst:642 msgid "" "The smallest possible difference between non-equal date objects, " "``timedelta(days=1)``." @@ -1040,84 +1073,84 @@ msgstr "" "La plus petite différence possible entre deux objets dates non-égaux, " "``timedelta(days=1)``." -#: library/datetime.rst:1199 +#: library/datetime.rst:1225 msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "Entre :const:`MINYEAR` et :const:`MAXYEAR` inclus." -#: library/datetime.rst:1204 +#: library/datetime.rst:1230 msgid "Between 1 and 12 inclusive." msgstr "Entre 1 et 12 inclus." -#: library/datetime.rst:1209 +#: 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:655 +#: library/datetime.rst:668 msgid "``date2 = date1 + timedelta``" msgstr "``date2 = date1 + timedelta``" -#: library/datetime.rst:655 +#: 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:658 +#: library/datetime.rst:671 msgid "``date2 = date1 - timedelta``" msgstr "``date2 = date1 - timedelta``" -#: library/datetime.rst:658 +#: 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:661 +#: library/datetime.rst:674 msgid "``timedelta = date1 - date2``" msgstr "``timedelta = date1 - date2``" -#: library/datetime.rst:1257 +#: 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:1259 +#: 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:1262 +#: library/datetime.rst:1289 msgid "Order comparison. (5)" msgstr "" -#: library/datetime.rst:675 +#: 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``. " @@ -1131,11 +1164,11 @@ 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:682 +#: library/datetime.rst:695 msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "``timedelta.seconds`` et ``timedelta.microseconds`` sont ignorés." -#: library/datetime.rst:685 +#: library/datetime.rst:698 #, fuzzy msgid "" "This is exact, and cannot overflow. ``timedelta.seconds`` and " @@ -1145,19 +1178,19 @@ msgstr "" "``timedelta.seconds`` et ``timedelta.microseconds`` valent ``0``, et ``date2 " "+ timedelta == date1`` après cela." -#: library/datetime.rst:689 +#: 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:691 +#: 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:696 +#: library/datetime.rst:709 #, fuzzy msgid "" "*date1* is considered less than *date2* when *date1* precedes *date2* in " @@ -1167,17 +1200,17 @@ msgstr "" "``date1`` est considérée comme inférieure à ``date2`` quand ``date1`` " "précède ``date2`` dans le temps. (4)" -#: library/datetime.rst:700 +#: library/datetime.rst:713 #, fuzzy msgid "" -"Order comparison between a :class:`!date` object that is not also " +"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:1330 +#: 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 " @@ -1186,31 +1219,31 @@ msgid "" "comparison methods in subclasses." msgstr "" -#: library/datetime.rst:712 +#: 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:718 +#: library/datetime.rst:731 #, fuzzy msgid "" "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:2002 +#: library/datetime.rst:2041 msgid "Example::" msgstr "Exemple ::" -#: library/datetime.rst:728 +#: library/datetime.rst:741 msgid "" "The generic function :func:`copy.replace` also supports :class:`date` " "objects." msgstr "" -#: library/datetime.rst:1454 +#: library/datetime.rst:1482 msgid "" "Return a :class:`time.struct_time` such as returned " "by :func:`time.localtime`." @@ -1218,16 +1251,16 @@ msgstr "" "Renvoie une :class:`time.struct_time` telle que renvoyée " "par :func:`time.localtime`." -#: library/datetime.rst:736 +#: 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:1456 +#: library/datetime.rst:1484 msgid "``d.timetuple()`` is equivalent to::" msgstr "``d.timetuple()`` est équivalent à ::" -#: library/datetime.rst:742 +#: library/datetime.rst:755 #, fuzzy msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " @@ -1237,7 +1270,7 @@ msgstr "" "numéro du jour dans l'année courante commençant par ``1`` pour le " "1\\ :sup:`er` janvier." -#: library/datetime.rst:748 +#: library/datetime.rst:761 #, fuzzy msgid "" "Return the proleptic Gregorian ordinal of the date, where January 1 of year " @@ -1248,7 +1281,7 @@ msgstr "" "l'an 1 a l'ordinal 1. Pour tout objet :class:`date` *d*, " "``date.fromordinal(d.toordinal()) == d``." -#: library/datetime.rst:755 +#: 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 " @@ -1258,7 +1291,7 @@ msgstr "" "dimanche vaut 6. Par exemple, ``date(2002, 12, 4).weekday() == 2``, un " "mercredi. Voir aussi :meth:`isoweekday`." -#: library/datetime.rst:762 +#: 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 " @@ -1268,7 +1301,7 @@ msgstr "" "dimanche vaut 7. Par exemple, ``date(2002, 12, 4).isoweekday() == 3``, un " "mercredi. Voir aussi :meth:`weekday`, :meth:`isocalendar`." -#: library/datetime.rst:769 +#: library/datetime.rst:782 msgid "" "Return a :term:`named tuple` object with three components: ``year``, " "``week`` and ``weekday``." @@ -1276,14 +1309,14 @@ msgstr "" "Renvoie un objet :term:`named tuple` avec trois composants : ``year``, " "``week`` et ``weekday``." -#: library/datetime.rst:772 +#: 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:774 +#: 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 " @@ -1297,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:779 +#: 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::" @@ -1306,30 +1339,30 @@ 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:788 +#: 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:793 +#: 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:801 +#: 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:806 +#: library/datetime.rst:821 msgid "Return a string representing the date::" msgstr "Renvoie une chaîne représentant la date ::" -#: library/datetime.rst:1640 +#: library/datetime.rst:1675 msgid "``d.ctime()`` is equivalent to::" msgstr "``d.ctime()`` est équivalent à ::" -#: library/datetime.rst:816 +#: 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 " @@ -1339,7 +1372,7 @@ msgstr "" "(que :func:`time.ctime` invoque, mais pas :meth:`date.ctime`) est conforme " "au standard C." -#: library/datetime.rst:823 +#: 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 " @@ -1351,7 +1384,7 @@ msgstr "" "ou secondes auront pour valeur 0. Voir :ref:`strftime-strptime-behavior` " "et :meth:`date.isoformat`." -#: library/datetime.rst:830 +#: 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`." -#: library/datetime.rst:836 -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:838 +#: 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:857 +#: library/datetime.rst:873 msgid "More examples of working with :class:`date`:" msgstr "Plus d'exemples avec la classe :class:`date` :" -#: library/datetime.rst:906 -msgid ":class:`.datetime` Objects" +#: library/datetime.rst:922 +#, fuzzy +msgid ":class:`!datetime` objects" msgstr "Objets :class:`.datetime`" -#: library/datetime.rst:908 +#: 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." @@ -1387,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:911 +#: 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 " @@ -1399,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:915 +#: library/datetime.rst:931 msgid "Constructor:" msgstr "Constructeur :" -#: library/datetime.rst:919 +#: 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 " @@ -1413,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:923 +#: library/datetime.rst:939 msgid "``MINYEAR <= year <= MAXYEAR``," msgstr "``MINYEAR <= year <= MAXYEAR``," -#: library/datetime.rst:924 +#: library/datetime.rst:940 msgid "``1 <= month <= 12``," msgstr "``1 <= month <= 12``," -#: library/datetime.rst:925 +#: 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:1804 +#: library/datetime.rst:1840 msgid "``0 <= hour < 24``," msgstr "``0 <= hour < 24``," -#: library/datetime.rst:1805 +#: library/datetime.rst:1841 msgid "``0 <= minute < 60``," msgstr "``0 <= minute < 60``," -#: library/datetime.rst:1806 +#: library/datetime.rst:1842 msgid "``0 <= second < 60``," msgstr "``0 <= second < 60``," -#: library/datetime.rst:1807 +#: library/datetime.rst:1843 msgid "``0 <= microsecond < 1000000``," msgstr "``0 <= microsecond < 1000000``," -#: library/datetime.rst:1808 +#: library/datetime.rst:1844 msgid "``fold in [0, 1]``." msgstr "``fold in [0, 1]``." -#: library/datetime.rst:1375 library/datetime.rst:1969 +#: library/datetime.rst:1403 library/datetime.rst:2008 #, fuzzy msgid "Added the *fold* parameter." msgstr "Ajout de l'argument ``fold``." -#: library/datetime.rst:941 +#: 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:943 +#: library/datetime.rst:960 msgid "Equivalent to::" msgstr "Équivalent à ::" -#: library/datetime.rst:947 +#: library/datetime.rst:964 msgid "See also :meth:`now`, :meth:`fromtimestamp`." msgstr "Voir aussi :meth:`now`, :meth:`fromtimestamp`." -#: library/datetime.rst:949 +#: library/datetime.rst:966 msgid "" "This method is functionally equivalent to :meth:`now`, but without a ``tz`` " "parameter." @@ -1471,11 +1507,11 @@ msgstr "" "Cette méthode est fonctionnellement équivalente à :meth:`now`, mais sans le " "paramètre ``tz``." -#: library/datetime.rst:954 +#: library/datetime.rst:972 msgid "Return the current local date and time." msgstr "Renvoie la date et l'heure locale actuelle." -#: library/datetime.rst:956 +#: 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 " @@ -1489,7 +1525,7 @@ msgstr "" "exemple, cela peut être possible sur des plateformes fournissant la fonction " "C :c:func:`gettimeofday`)." -#: library/datetime.rst:962 +#: 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." @@ -1498,22 +1534,22 @@ msgstr "" "classe :class:`tzinfo`, et la date et l'heure courantes sont converties vers " "le fuseau horaire *tz*." -#: library/datetime.rst:965 +#: 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:969 +#: 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:974 +#: 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:976 +#: 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 " @@ -1524,7 +1560,7 @@ msgstr "" "courant avisé peut être obtenu en appelant ``datetime.now(timezone.utc)``. " "Voir aussi :meth:`now`." -#: library/datetime.rst:982 +#: 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 " @@ -1537,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:989 +#: library/datetime.rst:1008 msgid "Use :meth:`datetime.now` with :const:`UTC` instead." msgstr "" -#: library/datetime.rst:994 +#: 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 " @@ -1554,7 +1590,7 @@ msgstr "" "vers la date et l'heure locales de la plateforme, et " "l'objet :class:`.datetime` renvoyé est naïf." -#: library/datetime.rst:999 +#: 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." @@ -1563,7 +1599,7 @@ msgstr "" "classe :class:`tzinfo`, et l'horodatage (*timestamp* en anglais) est " "converti vers le fuseau horaire *tz*." -#: library/datetime.rst:1002 +#: 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` " @@ -1586,7 +1622,7 @@ msgstr "" "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:1013 +#: 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` " @@ -1599,13 +1635,13 @@ msgstr "" "une :exc:`OSError` plutôt qu'une :exc:`ValueError` en cas d'échec " "de :c:func:`localtime` ou :c:func:`gmtime`." -#: library/datetime.rst:1020 +#: 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." -#: library/datetime.rst:1025 +#: library/datetime.rst:1048 msgid "" "Return the UTC :class:`.datetime` corresponding to the POSIX timestamp, " "with :attr:`.tzinfo` ``None``. (The resulting object is naive.)" @@ -1613,7 +1649,7 @@ 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:1028 +#: 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, " @@ -1625,13 +1661,13 @@ msgstr "" "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:1033 +#: 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` ::" -#: library/datetime.rst:1037 +#: library/datetime.rst:1060 msgid "" "On the POSIX compliant platforms, it is equivalent to the following " "expression::" @@ -1639,7 +1675,7 @@ msgstr "" "Sur les plateformes respectant *POSIX*, cela est équivalent à l'expression " "suivante ::" -#: library/datetime.rst:1042 +#: library/datetime.rst:1065 msgid "" "except the latter formula always supports the full years range: " "between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." @@ -1647,7 +1683,7 @@ msgstr "" "excepté que la dernière formule gère l'intervalle complet des années " "entre :const:`MINYEAR` et :const:`MAXYEAR` incluses." -#: library/datetime.rst:1047 +#: 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 " @@ -1661,7 +1697,7 @@ 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:1053 +#: 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` " @@ -1673,11 +1709,11 @@ msgstr "" "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:1061 +#: library/datetime.rst:1087 msgid "Use :meth:`datetime.fromtimestamp` with :const:`UTC` instead." msgstr "" -#: library/datetime.rst:1066 +#: 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 " @@ -1691,7 +1727,7 @@ msgstr "" "datetime.max.toordinal()``. Les heures, minutes, secondes et microsecondes " "du résultat valent toutes 0, et :attr:`.tzinfo` est ``None``." -#: library/datetime.rst:1074 +#: library/datetime.rst:1100 #, fuzzy msgid "" "Return a new :class:`.datetime` object whose date components are equal to " @@ -1699,7 +1735,7 @@ 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 " +"*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 " @@ -1709,7 +1745,7 @@ msgstr "" "du résultat, autrement l'attribut :attr:`~.time.tzinfo` de l'argument *time* " "est utilisé." -#: library/datetime.rst:1082 +#: library/datetime.rst:1108 #, fuzzy msgid "" "For any :class:`.datetime` object ``d``, ``d == datetime.combine(d.date(), " @@ -1719,11 +1755,11 @@ msgstr "" "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:1085 +#: library/datetime.rst:1111 msgid "Added the *tzinfo* argument." msgstr "Ajout de l'argument *tzinfo*." -#: library/datetime.rst:1091 +#: library/datetime.rst:1117 msgid "" "Return a :class:`.datetime` corresponding to a *date_string* in any valid " "ISO 8601 format, with the following exceptions:" @@ -1731,22 +1767,22 @@ msgstr "" "Renvoie une classe :class:`.datetime` correspondant à *date_string* dans un " "format ISO 8601 valide, avec les exceptions suivantes :" -#: library/datetime.rst:1904 +#: 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:1095 +#: 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:1909 +#: 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:1127 +#: library/datetime.rst:1153 #, fuzzy msgid "" "Previously, this method only supported formats that could be emitted " @@ -1755,11 +1791,12 @@ msgstr "" "Auparavant, cette méthode prenait en charge seulement les formats émis " "par :meth:`date.isoformat()` et :meth:`datetime.isoformat()`." -#: library/datetime.rst:1134 +#: 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 " +"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 " @@ -1767,7 +1804,7 @@ msgstr "" "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:1143 +#: library/datetime.rst:1170 msgid "" "Return a :class:`.datetime` corresponding to *date_string*, parsed according " "to *format*." @@ -1775,7 +1812,7 @@ msgstr "" "Renvoie une classe :class:`.datetime` correspondant à *date_string*, " "analysée selon *format*." -#: library/datetime.rst:1146 +#: library/datetime.rst:1173 #, fuzzy msgid "" "If *format* does not contain microseconds or time zone information, this is " @@ -1784,7 +1821,7 @@ msgstr "" "Si *format* ne contient pas de microsecondes ou d'informations sur le fuseau " "horaire, cela équivaut à ::" -#: library/datetime.rst:1150 +#: 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. " @@ -1796,18 +1833,7 @@ msgstr "" "pas un *n*-uplet de temps. Voir :ref:`strftime-strptime-behavior` " "et :meth:`datetime.fromisoformat`." -#: library/datetime.rst:1157 -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 "" - -#: library/datetime.rst:1179 +#: library/datetime.rst:1205 msgid "" "The earliest representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." @@ -1815,7 +1841,7 @@ msgstr "" "Le plus ancien :class:`.datetime` représentable, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." -#: library/datetime.rst:1185 +#: library/datetime.rst:1211 msgid "" "The latest representable :class:`.datetime`, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." @@ -1823,7 +1849,7 @@ msgstr "" "Le dernier :class:`.datetime` représentable, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." -#: library/datetime.rst:1191 +#: library/datetime.rst:1217 msgid "" "The smallest possible difference between non-equal :class:`.datetime` " "objects, ``timedelta(microseconds=1)``." @@ -1831,19 +1857,19 @@ msgstr "" "La plus petite différence possible entre deux objets :class:`.datetime` non-" "égaux, ``timedelta(microseconds=1)``." -#: library/datetime.rst:1837 +#: library/datetime.rst:1874 msgid "In ``range(24)``." msgstr "Dans ``range(24)``." -#: library/datetime.rst:1224 library/datetime.rst:1847 +#: library/datetime.rst:1250 library/datetime.rst:1884 msgid "In ``range(60)``." msgstr "Dans ``range(60)``." -#: library/datetime.rst:1852 +#: library/datetime.rst:1889 msgid "In ``range(1000000)``." msgstr "Dans ``range(1000000)``." -#: library/datetime.rst:1234 +#: library/datetime.rst:1260 msgid "" "The object passed as the *tzinfo* argument to the :class:`.datetime` " "constructor, or ``None`` if none was passed." @@ -1851,7 +1877,7 @@ 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é." -#: library/datetime.rst:1863 +#: library/datetime.rst:1900 #, fuzzy msgid "" "In ``[0, 1]``. Used to disambiguate wall times during a repeated interval. " @@ -1867,57 +1893,57 @@ 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:1253 +#: library/datetime.rst:1280 msgid "``datetime2 = datetime1 + timedelta``" msgstr "``datetime2 = datetime1 + timedelta``" -#: library/datetime.rst:2490 library/datetime.rst:2507 -#: library/datetime.rst:2572 library/datetime.rst:2581 +#: library/datetime.rst:2544 library/datetime.rst:2554 +#: library/datetime.rst:2564 library/datetime.rst:2668 msgid "\\(1)" msgstr "\\(1)" -#: library/datetime.rst:1255 +#: library/datetime.rst:1282 msgid "``datetime2 = datetime1 - timedelta``" msgstr "``datetime2 = datetime1 - timedelta``" -#: library/datetime.rst:2523 +#: library/datetime.rst:2674 msgid "\\(2)" msgstr "\\(2)" -#: library/datetime.rst:1257 +#: 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:1269 +#: library/datetime.rst:1296 #, fuzzy msgid "" "``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, " @@ -1937,7 +1963,7 @@ msgstr "" "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:1278 +#: library/datetime.rst:1305 #, fuzzy msgid "" "Computes the ``datetime2`` such that ``datetime2 + timedelta == datetime1``. " @@ -1950,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:1283 +#: 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 "" @@ -1961,7 +1988,7 @@ msgstr "" "avisés. Si l'un est avisé et que l'autre est naïf, une :exc:`TypeError` est " "levée." -#: library/datetime.rst:1287 +#: library/datetime.rst:1314 #, fuzzy msgid "" "If both are naive, or both are aware and have the " @@ -1976,7 +2003,7 @@ msgstr "" "``datetime2 + t == datetime1``. Aucun ajustement de fuseau horaire n'a lieu " "dans ce cas." -#: library/datetime.rst:1292 +#: library/datetime.rst:1319 #, fuzzy msgid "" "If both are aware and have different :attr:`~.datetime.tzinfo` attributes, " @@ -1991,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:1298 +#: 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:1301 +#: 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` ::" -#: library/datetime.rst:1303 +#: library/datetime.rst:1330 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " @@ -2012,7 +2039,7 @@ 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 " @@ -2023,7 +2050,7 @@ msgstr "" "premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " "``self.utcoffset()``)." -#: library/datetime.rst:1313 +#: library/datetime.rst:1340 #, fuzzy msgid "" "*datetime1* is considered less than *datetime2* when *datetime1* precedes " @@ -2032,7 +2059,7 @@ msgstr "" "*datetime1* est considéré inférieur à *datetime2* quand il le précède dans " "le temps." -#: library/datetime.rst:1316 +#: library/datetime.rst:1343 #, fuzzy msgid "" "Order comparison between naive and aware :class:`.datetime` objects " @@ -2041,7 +2068,7 @@ 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:1319 +#: library/datetime.rst:1346 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " @@ -2059,7 +2086,7 @@ msgstr "" "premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " "``self.utcoffset()``)." -#: library/datetime.rst:1326 +#: library/datetime.rst:1353 msgid "" "Equality comparisons between aware and naive :class:`.datetime` instances " "don't raise :exc:`TypeError`." @@ -2067,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:1342 +#: 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:1347 +#: 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`." @@ -2080,11 +2107,11 @@ msgstr "" "microsecondes et *fold*. :attr:`.tzinfo` est ``None``. Voir aussi la " "méthode :meth:`timetz`." -#: library/datetime.rst:1359 +#: 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:1356 +#: library/datetime.rst:1384 msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond, " "fold, and tzinfo attributes. See also method :meth:`time`." @@ -2093,7 +2120,7 @@ msgstr "" "seconde, microseconde, *fold* et *tzinfo*. Voir aussi la " "méthode :meth:`time`." -#: library/datetime.rst:1367 +#: library/datetime.rst:1395 #, fuzzy msgid "" "Return a new :class:`datetime` object with the same attributes, but with " @@ -2106,13 +2133,13 @@ msgstr "" "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:1372 +#: library/datetime.rst:1400 msgid "" ":class:`.datetime` objects are also supported by generic " "function :func:`copy.replace`." msgstr "" -#: library/datetime.rst:1381 +#: 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 " @@ -2122,7 +2149,7 @@ 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:1385 +#: library/datetime.rst:1413 #, fuzzy msgid "" "If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and " @@ -2134,7 +2161,7 @@ msgstr "" "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:1389 +#: library/datetime.rst:1417 #, fuzzy msgid "" "If called without arguments (or with ``tz=None``) the system local time zone " @@ -2148,7 +2175,7 @@ msgstr "" "de :class:`timezone` avec le nom de fuseau et le décalage obtenus depuis " "l'OS." -#: library/datetime.rst:1394 +#: library/datetime.rst:1422 #, fuzzy msgid "" "If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no " @@ -2163,7 +2190,7 @@ 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:1400 +#: library/datetime.rst:1428 #, fuzzy msgid "" "If you merely want to attach a :class:`timezone` object *tz* to a datetime " @@ -2178,7 +2205,7 @@ msgstr "" "horaire d'un *datetime* *dt* avisé sans conversion des données de date et " "d'heure, utilisez ``dt.replace(tzinfo=None)``." -#: library/datetime.rst:1405 +#: 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 " @@ -2189,11 +2216,11 @@ msgstr "" "par :meth:`astimezone`. En ignorant les cas d'erreurs, :meth:`astimezone` se " "comporte comme ::" -#: library/datetime.rst:1417 +#: library/datetime.rst:1445 msgid "*tz* now can be omitted." msgstr "*tz* peut maintenant être omis." -#: library/datetime.rst:1420 +#: library/datetime.rst:1448 msgid "" "The :meth:`astimezone` method can now be called on naive instances that are " "presumed to represent system local time." @@ -2201,7 +2228,7 @@ 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:1427 +#: 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 " @@ -2213,12 +2240,12 @@ msgstr "" "précédente ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une " "magnitude inférieure à un jour." -#: library/datetime.rst:2042 library/datetime.rst:2394 -#: library/datetime.rst:2716 +#: 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:1437 +#: 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 " @@ -2230,11 +2257,11 @@ msgstr "" "ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:2052 library/datetime.rst:2203 +#: 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:1447 +#: 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 " @@ -2244,7 +2271,7 @@ msgstr "" "``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:1462 +#: library/datetime.rst:1490 #, fuzzy msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " @@ -2263,7 +2290,7 @@ msgstr "" "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:1473 +#: library/datetime.rst:1501 #, fuzzy msgid "" "If :class:`.datetime` instance ``d`` is naive, this is the same as " @@ -2276,7 +2303,7 @@ msgstr "" "compte de ce que renvoie ``d.dst()``. L'heure d'été n'est jamais effective " "pour un temps UTC." -#: library/datetime.rst:1477 +#: library/datetime.rst:1505 #, fuzzy msgid "" "If ``d`` is aware, ``d`` is normalized to UTC time, by subtracting " @@ -2291,7 +2318,7 @@ msgstr "" "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:1486 +#: 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 " @@ -2308,7 +2335,7 @@ msgstr "" "UTC, utilisez ``datetime.replace(tzinfo=timezone.utc)`` pour la rendre " "avisée, puis vous pouvez utiliser :meth:`.datetime.timetuple`." -#: library/datetime.rst:1495 +#: library/datetime.rst:1524 msgid "" "Return the proleptic Gregorian ordinal of the date. The same as " "``self.date().toordinal()``." @@ -2316,7 +2343,7 @@ msgstr "" "Renvoie l'ordinal du calendrier grégorien proleptique de cette date. " "Identique à ``self.date().toordinal()``." -#: library/datetime.rst:1500 +#: 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 " @@ -2326,15 +2353,14 @@ msgstr "" "La valeur renvoyée est un :class:`float` similaire à ceux renvoyés " "par :func:`time.time`." -#: library/datetime.rst:1504 +#: 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 " @@ -2343,22 +2369,14 @@ 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:1511 +#: 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:1518 -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:1524 +#: library/datetime.rst:1548 #, fuzzy msgid "" "There is no method to obtain the POSIX timestamp directly from a " @@ -2372,11 +2390,25 @@ 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:1532 +#: library/datetime.rst:1556 msgid "or by calculating the timestamp directly::" msgstr "ou en calculant l'horodatage (*timestamp* en anglais) directement ::" -#: library/datetime.rst:1538 +#: 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`." @@ -2385,7 +2417,7 @@ msgstr "" "dimanche vaut 6. Identique à ``self.date().weekday()``. Voir " "aussi :meth:`isoweekday`." -#: library/datetime.rst:1544 +#: 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 " @@ -2395,7 +2427,7 @@ msgstr "" "dimanche vaut 7. Identique à ``self.date().isoweekday()``. Voir " "aussi :meth:`weekday`, :meth:`isocalendar`." -#: library/datetime.rst:1551 +#: library/datetime.rst:1586 msgid "" "Return a :term:`named tuple` with three components: ``year``, ``week`` and " "``weekday``. The same as ``self.date().isocalendar()``." @@ -2403,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:1557 +#: 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:1559 +#: 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:1560 +#: 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:1562 +#: library/datetime.rst:1597 msgid "" "If :meth:`utcoffset` does not return ``None``, a string is appended, giving " "the UTC offset:" @@ -2424,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:1565 +#: library/datetime.rst:1600 msgid "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " "is not 0" @@ -2432,13 +2464,13 @@ msgstr "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` " "ne vaut pas 0" -#: library/datetime.rst:1567 +#: 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:1577 +#: 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::" @@ -2447,7 +2479,7 @@ msgstr "" "caractère, placé entre les portions du résultat correspondant à la date et à " "l'heure. Par exemple ::" -#: library/datetime.rst:1982 +#: 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 " @@ -2457,7 +2489,7 @@ msgstr "" "additionnels de temps à inclure (par défaut ``'auto'``). Il peut valoir " "l'une des valeurs suivantes :" -#: library/datetime.rst:1986 +#: library/datetime.rst:2025 msgid "" "``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " "``'microseconds'`` otherwise." @@ -2465,17 +2497,17 @@ msgstr "" "``'auto'`` : Identique à ``'seconds'`` si :attr:`microsecond` vaut 0, à " "``'microseconds'`` sinon." -#: library/datetime.rst:1988 +#: 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:1989 +#: 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:1990 +#: library/datetime.rst:2029 msgid "" "``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " "``HH:MM:SS`` format." @@ -2483,7 +2515,7 @@ msgstr "" "``'seconds'`` : Inclut :attr:`hour`, :attr:`minute` et :attr:`second` au " "format ``HH:MM:SS``." -#: library/datetime.rst:1992 +#: library/datetime.rst:2031 msgid "" "``'milliseconds'``: Include full time, but truncate fractional second part " "to milliseconds. ``HH:MM:SS.sss`` format." @@ -2491,26 +2523,26 @@ msgstr "" "``'milliseconds'`` : Inclut le temps complet, mais tronque la partie " "fractionnaire des millisecondes, au format ``HH:MM:SS.sss``." -#: library/datetime.rst:1994 +#: 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:1998 +#: 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:1609 +#: 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:2013 +#: library/datetime.rst:2052 #, fuzzy msgid "Added the *timespec* parameter." msgstr "Ajout de l'argument *timespec*." -#: library/datetime.rst:1625 +#: library/datetime.rst:1660 #, fuzzy msgid "" "For a :class:`.datetime` instance ``d``, ``str(d)`` is equivalent to " @@ -2519,11 +2551,11 @@ msgstr "" "Pour une instance *d* de :class:`.datetime`, ``str(d)`` est équivalent à " "``d.isoformat(' ')``." -#: library/datetime.rst:1631 +#: 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:1637 +#: library/datetime.rst:1672 msgid "" "The output string will *not* include time zone information, regardless of " "whether the input is aware or naive." @@ -2531,7 +2563,7 @@ 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:1644 +#: 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 " @@ -2541,7 +2573,7 @@ msgstr "" "(que :func:`time.ctime` invoque, mais pas :meth:`datetime.ctime`) est " "conforme au standard C." -#: library/datetime.rst:1651 +#: 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` " @@ -2551,7 +2583,7 @@ msgstr "" "de format explicite. Voir :ref:`strftime-strptime-behavior` " "et :meth:`datetime.isoformat`." -#: library/datetime.rst:1658 +#: 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 " @@ -2563,16 +2595,17 @@ msgstr "" "formatage littérale ` et en utilisant :meth:`str.format`. " "Voir :ref:`strftime-strptime-behavior` et :meth:`datetime.isoformat`." -#: library/datetime.rst:1665 -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:1667 +#: 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:1720 +#: 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 " @@ -2582,15 +2615,16 @@ 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:1767 +#: library/datetime.rst:1802 msgid "Usage of ``KabulTz`` from above::" msgstr "Utilisation de ``KabulTz`` cité plus haut ::" -#: library/datetime.rst:1793 -msgid ":class:`.time` Objects" +#: library/datetime.rst:1829 +#, fuzzy +msgid ":class:`!time` objects" msgstr "Objets :class:`.time`" -#: library/datetime.rst:1795 +#: library/datetime.rst:1831 #, fuzzy msgid "" "A :class:`.time` object represents a (local) time of day, independent of any " @@ -2600,7 +2634,7 @@ msgstr "" "de tout jour particulier, et sujette à des ajustements par un " "objet :class:`tzinfo`." -#: library/datetime.rst:1800 +#: 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 " @@ -2610,7 +2644,7 @@ msgstr "" "instance d'une sous-classe :class:`tzinfo`. Les autres arguments doivent " "être des nombres entiers, dans les intervalles suivants :" -#: library/datetime.rst:1810 +#: library/datetime.rst:1846 #, fuzzy msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised. " @@ -2620,18 +2654,18 @@ msgstr "" "levée. Ils valent tous ``0`` par défaut, à l'exception de *tzinfo* qui " "vaut :const:`None`." -#: library/datetime.rst:1818 +#: 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:1823 +#: 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:1828 +#: library/datetime.rst:1865 msgid "" "The smallest possible difference between non-equal :class:`.time` objects, " "``timedelta(microseconds=1)``, although note that arithmetic " @@ -2641,7 +2675,7 @@ msgstr "" "égaux, ``timedelta(microseconds=1)``, notez cependant que les " "objets :class:`.time` n'implémentent pas d'opérations arithmétiques." -#: library/datetime.rst:1857 +#: library/datetime.rst:1894 msgid "" "The object passed as the tzinfo argument to the :class:`.time` constructor, " "or ``None`` if none was passed." @@ -2649,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:1871 +#: 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:1874 +#: 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:1878 +#: library/datetime.rst:1916 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`~.time.tzinfo` " @@ -2678,7 +2712,7 @@ msgstr "" "premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " "``self.utcoffset()``)." -#: library/datetime.rst:1884 +#: library/datetime.rst:1922 #, fuzzy msgid "" "Equality comparisons between aware and naive :class:`.time` instances don't " @@ -2687,31 +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:1888 +#: 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:1890 +#: 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:1897 +#: library/datetime.rst:1935 #, fuzzy msgid "Other constructors:" msgstr "Autre constructeur :" -#: library/datetime.rst:1901 +#: library/datetime.rst:1939 msgid "" "Return a :class:`.time` corresponding to a *time_string* in any valid ISO " "8601 format, with the following exceptions:" @@ -2719,7 +2754,7 @@ msgstr "" "Renvoie une :class:`.time` correspondant à *time_string* dans un format ISO " "8601 valide, avec les exceptions suivantes :" -#: library/datetime.rst:1905 +#: 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." @@ -2727,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:1907 +#: library/datetime.rst:1945 msgid "" "Fractional seconds may have any number of digits (anything beyond 6 will be " "truncated)." @@ -2735,12 +2770,12 @@ 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:1911 +#: library/datetime.rst:1949 #, fuzzy msgid "Examples:" msgstr "Exemples ::" -#: library/datetime.rst:1935 +#: library/datetime.rst:1973 #, fuzzy msgid "" "Previously, this method only supported formats that could be emitted " @@ -2749,7 +2784,7 @@ msgstr "" "Auparavant, cette méthode ne prenait en charge que les formats émis " "par :meth:`time.isoformat()`." -#: library/datetime.rst:1941 +#: library/datetime.rst:1980 #, fuzzy msgid "" "Return a :class:`.time` corresponding to *date_string*, parsed according to " @@ -2758,7 +2793,7 @@ msgstr "" "Renvoie une classe :class:`.datetime` correspondant à *date_string*, " "analysée selon *format*." -#: library/datetime.rst:1944 +#: library/datetime.rst:1983 #, fuzzy msgid "" "If *format* does not contain microseconds or timezone information, this is " @@ -2767,7 +2802,7 @@ msgstr "" "Si *format* ne contient pas de microsecondes ou d'informations sur le fuseau " "horaire, cela équivaut à ::" -#: library/datetime.rst:1948 +#: library/datetime.rst:1987 #, fuzzy msgid "" ":exc:`ValueError` is raised if the *date_string* and *format* cannot be " @@ -2780,12 +2815,12 @@ msgstr "" "pas un *n*-uplet de temps. Voir :ref:`strftime-strptime-behavior` " "et :meth:`datetime.fromisoformat`." -#: library/datetime.rst:1961 +#: library/datetime.rst:2000 #, fuzzy msgid "" "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 " +"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 " @@ -2794,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:1966 +#: library/datetime.rst:2005 msgid "" ":class:`.time` objects are also supported by generic " "function :func:`copy.replace`." msgstr "" -#: library/datetime.rst:1975 +#: 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:1977 +#: 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:1978 +#: 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:1979 +#: library/datetime.rst:2018 msgid "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " "return ``None``" @@ -2820,7 +2855,7 @@ msgstr "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :meth:`utcoffset` ne renvoie pas " "``None``" -#: library/datetime.rst:1980 +#: library/datetime.rst:2019 msgid "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 " "and :meth:`utcoffset` does not return ``None``" @@ -2828,17 +2863,17 @@ msgstr "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0 " "et :meth:`utcoffset` ne renvoie pas ``None``" -#: library/datetime.rst:2000 +#: 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:2019 +#: 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:2024 +#: library/datetime.rst:2063 msgid "" "Return a string representing the time, controlled by an explicit format " "string. See also :ref:`strftime-strptime-behavior` " @@ -2848,7 +2883,7 @@ msgstr "" "formatage explicite. Voir :ref:`strftime-strptime-behavior` " "et :meth:`time.isoformat`." -#: library/datetime.rst:2030 +#: 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`." -#: library/datetime.rst:2038 +#: 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 " @@ -2872,7 +2907,7 @@ msgstr "" "précédente ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une " "magnitude inférieure à un jour." -#: library/datetime.rst:2048 +#: 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 " @@ -2884,7 +2919,7 @@ msgstr "" "ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:2057 +#: 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 " @@ -2894,22 +2929,25 @@ msgstr "" "``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:2062 -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:2064 +#: 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:2095 -msgid ":class:`tzinfo` Objects" +#: library/datetime.rst:2136 +#, fuzzy +msgid ":class:`!tzinfo` objects" msgstr "Objets :class:`tzinfo`" -#: library/datetime.rst:2099 +#: 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 " @@ -2917,14 +2955,15 @@ msgstr "" "de :class:`tzinfo` pour capturer des informations sur un fuseau horaire " "particulier." -#: library/datetime.rst:2103 +#: 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`. " @@ -2933,13 +2972,13 @@ 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:2109 +#: 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` " +"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 "" @@ -2951,7 +2990,7 @@ msgstr "" "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:2116 +#: library/datetime.rst:2157 #, fuzzy msgid "" "Special requirement for pickling: A :class:`tzinfo` subclass must have " @@ -2965,7 +3004,7 @@ msgstr "" "désérialisé. C'est un prérequis technique qui pourrait être assoupli dans " "le futur." -#: library/datetime.rst:2122 +#: library/datetime.rst:2163 #, fuzzy msgid "" "A concrete subclass of :class:`tzinfo` may need to implement the following " @@ -2977,7 +3016,7 @@ msgstr "" "l'utilisation qui est faite des objets :mod:`datetime` avisés. Dans le " "doute, implémentez-les toutes." -#: library/datetime.rst:2129 +#: 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." @@ -2986,7 +3025,7 @@ 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:2132 +#: 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 " @@ -3006,7 +3045,7 @@ msgstr "" "doit être inférieure à un jour). La plupart des implémentations " "de :meth:`utcoffset` ressembleront probablement à l'une des deux suivantes ::" -#: library/datetime.rst:2143 +#: library/datetime.rst:2184 msgid "" "If :meth:`utcoffset` does not return ``None``, :meth:`dst` should not return " "``None`` either." @@ -3014,7 +3053,7 @@ msgstr "" "Si :meth:`utcoffset` ne renvoie pas ``None``, :meth:`dst` ne doit pas non " "plus renvoyer ``None``." -#: library/datetime.rst:2146 +#: library/datetime.rst:2187 msgid "" "The default implementation of :meth:`utcoffset` " "raises :exc:`NotImplementedError`." @@ -3022,7 +3061,7 @@ msgstr "" "L'implémentation par défaut de :meth:`utcoffset` lève " "une :exc:`NotImplementedError`." -#: library/datetime.rst:2155 +#: 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." @@ -3030,7 +3069,7 @@ 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." -#: library/datetime.rst:2159 +#: library/datetime.rst:2200 #, fuzzy msgid "" "Return ``timedelta(0)`` if DST is not in effect. If DST is in effect, return " @@ -3056,7 +3095,7 @@ msgstr "" "et :meth:`tzinfo.fromutc` fait appel à :meth:`dst` pour tenir compte des " "heures d'été quand elle traverse des fuseaux horaires." -#: library/datetime.rst:2169 +#: 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:" @@ -3064,19 +3103,19 @@ 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:2172 +#: library/datetime.rst:2213 msgid "``tz.utcoffset(dt) - tz.dst(dt)``" msgstr "``tz.utcoffset(dt) - tz.dst(dt)``" -#: library/datetime.rst:2174 +#: 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 " +"``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` " +"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." @@ -3092,7 +3131,7 @@ msgstr "" "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:2183 +#: library/datetime.rst:2224 msgid "" "Most implementations of :meth:`dst` will probably look like one of these " "two::" @@ -3100,18 +3139,18 @@ msgstr "" "La plupart des implémentations de :meth:`dst` ressembleront probablement à " "l'une des deux suivantes ::" -#: library/datetime.rst:2189 +#: library/datetime.rst:2232 msgid "or::" msgstr "ou ::" -#: library/datetime.rst:2201 +#: 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`." -#: library/datetime.rst:2209 +#: library/datetime.rst:2254 #, fuzzy msgid "" "Return the time zone name corresponding to the :class:`.datetime` object " @@ -3122,8 +3161,8 @@ msgid "" "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." +"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 " @@ -3136,7 +3175,7 @@ msgstr "" "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:2219 +#: library/datetime.rst:2264 msgid "" "The default implementation of :meth:`tzname` " "raises :exc:`NotImplementedError`." @@ -3144,14 +3183,15 @@ msgstr "" "L'implémentation par défaut de :meth:`tzname` lève " "une :exc:`NotImplementedError`." -#: library/datetime.rst:2222 +#: 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:`.datetime`." +"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 " @@ -3160,7 +3200,7 @@ msgstr "" "classes :class:`tzinfo` doivent alors être prêtes à recevoir un argument " "``None`` pour *dt*, ou une instance de :class:`.datetime`." -#: library/datetime.rst:2228 +#: 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 " @@ -3175,15 +3215,15 @@ 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:2234 +#: 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 " +"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." +"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 " @@ -3193,7 +3233,7 @@ msgstr "" "temps local, et n'aient pas à se soucier des objets dans d'autres fuseaux " "horaires." -#: library/datetime.rst:2240 +#: library/datetime.rst:2285 msgid "" "There is one more :class:`tzinfo` method that a subclass may wish to " "override:" @@ -3201,7 +3241,7 @@ msgstr "" "Il y a une dernière méthode de :class:`tzinfo` que les sous-classes peuvent " "vouloir redéfinir :" -#: library/datetime.rst:2245 +#: library/datetime.rst:2290 #, fuzzy msgid "" "This is called from the default :meth:`datetime.astimezone` implementation. " @@ -3217,7 +3257,7 @@ msgstr "" "d'ajuster les données de date et d'heure, renvoyant un objet *datetime* " "équivalent à *self*, dans le temps local." -#: library/datetime.rst:2251 +#: library/datetime.rst:2296 #, fuzzy msgid "" "Most :class:`tzinfo` subclasses should be able to inherit the " @@ -3245,7 +3285,7 @@ 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:2262 +#: library/datetime.rst:2307 msgid "" "Skipping code for error cases, the default :meth:`fromutc` implementation " "acts like::" @@ -3253,7 +3293,7 @@ msgstr "" "En omettant le code des cas d'erreurs, l'implémentation par défaut " "de :meth:`fromutc` se comporte comme suit ::" -#: library/datetime.rst:2280 +#: 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:" @@ -3261,7 +3301,7 @@ msgstr "" "Dans le fichier :download:`tzinfo_examples.py <../includes/" "tzinfo_examples.py>` il y a des exemples de :class:`tzinfo` classes :" -#: library/datetime.rst:2286 +#: 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, " @@ -3276,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:2300 +#: 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, " @@ -3290,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:2319 +#: library/datetime.rst:2366 #, fuzzy msgid "" "When DST ends (the \"end\" line), there's a potentially worse problem: " @@ -3319,7 +3359,7 @@ msgstr "" "les plus récents l'ont à 1. Par exemple, lors du changement d'heure de " "l'automne 2016, nous obtenons ::" -#: library/datetime.rst:2341 +#: library/datetime.rst:2390 #, fuzzy msgid "" "Note that the :class:`.datetime` instances that differ only by the value of " @@ -3329,13 +3369,13 @@ msgstr "" "valeur de leur attribut :attr:`~datetime.fold` sont considérées égales dans " "les comparaisons." -#: library/datetime.rst:2344 +#: 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 " +"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 "" @@ -3347,11 +3387,11 @@ msgstr "" "représentant uniquement le fuseau EST (de décalage fixe *-5h*) ou uniquement " "EDT (*-4h*))." -#: library/datetime.rst:2352 +#: library/datetime.rst:2401 msgid ":mod:`zoneinfo`" msgstr ":mod:`zoneinfo`" -#: library/datetime.rst:2353 +#: library/datetime.rst:2402 #, fuzzy msgid "" "The :mod:`!datetime` module has a basic :class:`timezone` class (for " @@ -3362,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:2357 +#: library/datetime.rst:2406 #, fuzzy msgid "" "``zoneinfo`` brings the *IANA time zone database* (also known as the Olson " @@ -3371,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:2360 +#: library/datetime.rst:2409 #, fuzzy msgid "`IANA time zone database `_" msgstr "" "`Base de données des fuseaux horaires de l'IANA `_" -#: library/datetime.rst:2361 +#: 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 " @@ -3393,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:2371 -msgid ":class:`timezone` Objects" +#: library/datetime.rst:2420 +#, fuzzy +msgid ":class:`!timezone` objects" msgstr "Objets :class:`timezone`" -#: library/datetime.rst:2373 +#: library/datetime.rst:2422 #, fuzzy msgid "" "The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance " @@ -3407,7 +3448,7 @@ msgstr "" "chaque instance représente un fuseau horaire défini par un décalage fixe par " "rapport à UTC." -#: library/datetime.rst:2377 +#: library/datetime.rst:2426 #, fuzzy msgid "" "Objects of this class cannot be used to represent time zone information in " @@ -3419,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:2384 +#: 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 " @@ -3431,7 +3472,7 @@ msgstr "" "strictement compris entre ``-timedelta(hours=24)`` et " "``timedelta(hours=24)``, autrement une :exc:`ValueError` est levée." -#: library/datetime.rst:2389 +#: 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." @@ -3440,7 +3481,7 @@ msgstr "" "qui sera utilisée comme valeur de retour de la " "méthode :meth:`datetime.tzname`." -#: library/datetime.rst:2411 +#: library/datetime.rst:2461 msgid "" "Return the fixed value specified when the :class:`timezone` instance is " "constructed." @@ -3448,7 +3489,7 @@ msgstr "" "Renvoie la valeur fixe spécifiée lorsque l'instance :class:`timezone` est " "construite." -#: library/datetime.rst:2403 +#: 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." @@ -3457,7 +3498,7 @@ msgstr "" "instance :class:`timedelta` égale à la différence entre le temps local et " "UTC." -#: library/datetime.rst:2414 +#: 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 " @@ -3472,7 +3513,7 @@ msgstr "" "et HH et MM sont respectivement les représentations à deux chiffres de " "``offset.hours`` et ``offset.minutes``." -#: library/datetime.rst:2420 +#: library/datetime.rst:2470 msgid "" "Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not " "``'UTC+00:00'``." @@ -3480,11 +3521,11 @@ msgstr "" "Le nom généré à partir de ``offset=timedelta(0)`` est maintenant ``'UTC'`` " "plutôt que ``'UTC+00:00'``." -#: library/datetime.rst:2427 +#: library/datetime.rst:2477 msgid "Always returns ``None``." msgstr "Renvoie toujours ``None``." -#: library/datetime.rst:2431 +#: library/datetime.rst:2482 msgid "" "Return ``dt + offset``. The *dt* argument must be an " "aware :class:`.datetime` instance, with ``tzinfo`` set to ``self``." @@ -3492,17 +3533,17 @@ msgstr "" "Renvoie ``dt + offset``. L'argument *dt* doit être une instance avisée " "de :class:`.datetime`, avec ``tzinfo`` valant ``self``." -#: library/datetime.rst:2438 +#: library/datetime.rst:2490 #, fuzzy msgid "The UTC time zone, ``timezone(timedelta(0))``." msgstr "Le fuseau horaire UTC, ``timezone(timedelta(0))``." -#: library/datetime.rst:2447 +#: 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:2449 +#: 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 " @@ -3513,7 +3554,7 @@ msgstr "" "temps sous forme d'une chaîne, contrôlée par une chaîne de formatage " "explicite." -#: library/datetime.rst:2453 +#: library/datetime.rst:2505 #, fuzzy msgid "" "Conversely, the :meth:`date.strptime`, :meth:`datetime.strptime` " @@ -3524,7 +3565,7 @@ msgstr "" "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:2457 +#: library/datetime.rst:2509 #, fuzzy msgid "" "The table below provides a high-level comparison " @@ -3533,60 +3574,59 @@ msgstr "" "Le tableau ci-dessous fournit une comparaison de haut niveau " "entre :meth:`strftime` et :meth:`strptime` :" -#: library/datetime.rst:2461 +#: library/datetime.rst:2513 msgid "``strftime``" msgstr "``strftime``" -#: library/datetime.rst:2461 +#: library/datetime.rst:2513 msgid "``strptime``" msgstr "``strptime``" -#: library/datetime.rst:2463 +#: library/datetime.rst:2515 msgid "Usage" msgstr "Utilisation" -#: library/datetime.rst:2463 +#: 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:2463 +#: 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:2465 +#: library/datetime.rst:2517 msgid "Type of method" msgstr "Type de méthode" -#: library/datetime.rst:2465 +#: library/datetime.rst:2517 msgid "Instance method" msgstr "Méthode d'instance" -#: library/datetime.rst:2465 +#: library/datetime.rst:2517 msgid "Class method" msgstr "Méthode de classe" -#: library/datetime.rst:2467 +#: library/datetime.rst:2519 msgid "Signature" msgstr "Signature" -#: library/datetime.rst:2467 +#: library/datetime.rst:2519 msgid "``strftime(format)``" msgstr "``strftime(format)``" -#: library/datetime.rst:2467 +#: library/datetime.rst:2519 msgid "``strptime(date_string, format)``" msgstr "``strptime(date_string, format)``" -#: library/datetime.rst:2474 +#: 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:2476 +#: library/datetime.rst:2528 msgid "" "These methods accept format codes that can be used to parse and format " "dates::" @@ -3594,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:2484 +#: 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:2591 +#: library/datetime.rst:2696 msgid "Directive" msgstr "Directive" -#: library/datetime.rst:2591 +#: library/datetime.rst:2696 msgid "Meaning" msgstr "Signification" -#: library/datetime.rst:2591 +#: library/datetime.rst:2696 msgid "Example" msgstr "Exemple" -#: library/datetime.rst:2591 +#: library/datetime.rst:2696 msgid "Notes" msgstr "Notes" -#: library/datetime.rst:2490 +#: library/datetime.rst:2544 msgid "``%a``" msgstr "``%a``" -#: library/datetime.rst:2490 +#: 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:2495 +#: library/datetime.rst:2549 msgid "``%A``" msgstr "``%A``" -#: library/datetime.rst:2495 +#: 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:2500 -msgid "``%w``" -msgstr "``%w``" - -#: library/datetime.rst:2500 -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:2500 -msgid "0, 1, ..., 6" -msgstr "0, 1, ..., 6" - -#: library/datetime.rst:2504 -msgid "``%d``" -msgstr "``%d``" - -#: library/datetime.rst:2504 -msgid "Day of the month as a zero-padded decimal number." -msgstr "Jour du mois sur deux chiffres." - -#: library/datetime.rst:2504 -msgid "01, 02, ..., 31" -msgstr "01, 02, ..., 31" - -#: library/datetime.rst:2517 library/datetime.rst:2526 -#: library/datetime.rst:2535 library/datetime.rst:2553 -msgid "\\(9)" -msgstr "\\(9)" - -#: library/datetime.rst:2507 +#: library/datetime.rst:2554 msgid "``%b``" msgstr "``%b``" -#: library/datetime.rst:2507 +#: 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:2512 +#: library/datetime.rst:2559 msgid "``%B``" msgstr "``%B``" -#: library/datetime.rst:2512 +#: 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:2517 -msgid "``%m``" -msgstr "``%m``" +#: library/datetime.rst:2564 +msgid "``%c``" +msgstr "``%c``" -#: library/datetime.rst:2517 -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:2529 -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:2520 -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:2520 -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:2520 -msgid "00, 01, ..., 99" -msgstr "00, 01, ..., 99" +#: library/datetime.rst:2569 +#, fuzzy +msgid "01, 02, ..., 99" +msgstr "01, 02, ..., 31" -#: library/datetime.rst:2523 -msgid "``%Y``" -msgstr "``%Y``" +#: library/datetime.rst:2585 library/datetime.rst:2595 +msgid "\\(0)" +msgstr "" -#: library/datetime.rst:2523 -msgid "Year with century as a decimal number." -msgstr "Année complète sur quatre chiffres." +#: 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:2593 +#: 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:2590 +msgid "``%G``" +msgstr "``%G``" + +#: 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:2674 msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" msgstr "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" -#: library/datetime.rst:2526 +#: 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:2526 +#: 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:2526 +#: library/datetime.rst:2597 msgid "00, 01, ..., 23" msgstr "00, 01, ..., 23" -#: library/datetime.rst:2529 +#: library/datetime.rst:2600 msgid "``%I``" msgstr "``%I``" -#: library/datetime.rst:2529 +#: 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:2532 +#: 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:2532 +#: 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:2532 +#: library/datetime.rst:2617 msgid "\\(1), \\(3)" msgstr "\\(1), \\(3)" -#: library/datetime.rst:2535 -msgid "``%M``" -msgstr "``%M``" +#: library/datetime.rst:2620 +msgid "``%r``" +msgstr "" -#: library/datetime.rst:2535 -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:2538 -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:2623 +msgid "10:01" +msgstr "" -#: library/datetime.rst:2538 +#: library/datetime.rst:2625 msgid "``%S``" msgstr "``%S``" -#: library/datetime.rst:2538 +#: library/datetime.rst:2625 msgid "Second as a zero-padded decimal number." msgstr "Secondes sur deux chiffres." -#: library/datetime.rst:2538 +#: library/datetime.rst:2625 msgid "\\(4), \\(9)" msgstr "\\(4), \\(9)" -#: library/datetime.rst:2541 -msgid "``%f``" -msgstr "``%f``" - -#: library/datetime.rst:2541 -msgid "Microsecond as a decimal number, zero-padded to 6 digits." -msgstr "Microsecondes sur 6 chiffres." - -#: library/datetime.rst:2541 -msgid "000000, 000001, ..., 999999" -msgstr "000000, 000001, ..., 999999" - -#: library/datetime.rst:2541 -msgid "\\(5)" -msgstr "\\(5)" - -#: library/datetime.rst:2704 -msgid "``%z``" -msgstr "``%z``" +#: library/datetime.rst:2628 +msgid "``%t``" +msgstr "" -#: library/datetime.rst:2545 +#: 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:2545 -msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" -msgstr "(vide), +0000, -0400, +1030, +063415, -030712.345216" - -#: library/datetime.rst:2550 library/datetime.rst:2607 -msgid "\\(6)" -msgstr "\\(6)" +#: library/datetime.rst:2628 +msgid "``\\t``" +msgstr "" -#: library/datetime.rst:2730 -msgid "``%Z``" -msgstr "``%Z``" +#: library/datetime.rst:2632 +msgid "``%T``" +msgstr "" -#: library/datetime.rst:2550 -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:2550 -msgid "(empty), UTC, GMT" -msgstr "(vide), UTC, GMT" +#: library/datetime.rst:2632 +msgid "10:01:59" +msgstr "" -#: library/datetime.rst:2553 -msgid "``%j``" -msgstr "``%j``" +#: library/datetime.rst:2635 +msgid "``%u``" +msgstr "``%u``" -#: library/datetime.rst:2553 -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:2553 -msgid "001, 002, ..., 366" -msgstr "001, 002, ..., 366" +#: library/datetime.rst:2635 +msgid "1, 2, ..., 7" +msgstr "1, 2, ..., 7" -#: library/datetime.rst:2556 +#: library/datetime.rst:2638 msgid "``%U``" msgstr "``%U``" -#: library/datetime.rst:2556 +#: 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 " @@ -3887,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:2564 +#: library/datetime.rst:2656 msgid "00, 01, ..., 53" msgstr "00, 01, ..., 53" -#: library/datetime.rst:2564 +#: library/datetime.rst:2656 msgid "\\(7), \\(9)" msgstr "\\(7), \\(9)" -#: library/datetime.rst:2564 +#: 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:2564 +#: 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 " @@ -3909,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:2572 -msgid "``%c``" -msgstr "``%c``" - -#: library/datetime.rst:2572 -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:2577 +#: library/datetime.rst:2664 msgid "``%x``" msgstr "``%x``" -#: library/datetime.rst:2577 +#: 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:2581 +#: library/datetime.rst:2668 msgid "``%X``" msgstr "``%X``" -#: library/datetime.rst:2581 +#: 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:2584 +#: 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:2584 +#: library/datetime.rst:2685 msgid "A literal ``'%'`` character." msgstr "Un caractère ``'%'`` littéral." -#: library/datetime.rst:2584 +#: library/datetime.rst:2685 msgid "%" msgstr "%" -#: library/datetime.rst:2587 +#: 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:2593 -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:2593 +#: 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:2593 -msgid "\\(8)" -msgstr "\\(8)" - -#: library/datetime.rst:2598 -msgid "``%u``" -msgstr "``%u``" - -#: library/datetime.rst:2598 -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:2598 -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:2601 -msgid "``%V``" -msgstr "``%V``" +#: library/datetime.rst:2698 +msgid "``%f``" +msgstr "``%f``" -#: library/datetime.rst:2601 -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:2601 -msgid "01, 02, ..., 53" -msgstr "01, 02, ..., 53" +#: library/datetime.rst:2698 +msgid "000000, 000001, ..., 999999" +msgstr "000000, 000001, ..., 999999" -#: library/datetime.rst:2601 -msgid "\\(8), \\(9)" -msgstr "\\(8), \\(9)" +#: library/datetime.rst:2698 +msgid "\\(5)" +msgstr "\\(5)" -#: library/datetime.rst:2726 +#: library/datetime.rst:2862 msgid "``%:z``" msgstr "" -#: library/datetime.rst:2607 +#: library/datetime.rst:2702 #, fuzzy msgid "" "UTC offset in the form ``±HH:MM[:SS[.ffffff]]`` (empty string if the object " @@ -4043,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:2607 +#: 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:2613 -#, 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:2618 +#: library/datetime.rst:2708 #, fuzzy msgid "" "The full set of format codes supported varies across platforms, because " @@ -4081,19 +4287,26 @@ msgstr "" "des différences entre les plateformes dans la gestion de format non pris en " "charge." -#: library/datetime.rst:2624 +#: library/datetime.rst:2714 msgid "``%G``, ``%u`` and ``%V`` were added." msgstr "``%G``, ``%u`` et ``%V`` ont été ajoutés." -#: library/datetime.rst:2627 -msgid "``%:z`` was added." +#: library/datetime.rst:2717 +msgid "``%:z`` was added for :meth:`~.datetime.strftime`." msgstr "" -#: library/datetime.rst:2631 -msgid "Technical Detail" +#: library/datetime.rst:2720 +msgid "" +"``%D``, ``%F``, ``%n``, ``%t``, and ``%:z`` were added " +"for :meth:`~.datetime.strptime`." +msgstr "" + +#: library/datetime.rst:2726 +#, fuzzy +msgid "Technical detail" msgstr "Détail technique" -#: library/datetime.rst:2633 +#: library/datetime.rst:2728 #, fuzzy msgid "" "Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's " @@ -4104,23 +4317,39 @@ msgstr "" "``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:2637 +#: 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:2641 +#: 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:2645 +#: library/datetime.rst:2778 #, fuzzy msgid "" "except when the format includes sub-second components or time zone offset " @@ -4131,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:2649 +#: library/datetime.rst:2782 #, fuzzy msgid "" "For :class:`.time` objects, the format codes for year, month, and day should " @@ -4143,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:2653 +#: library/datetime.rst:2786 #, fuzzy msgid "" "For :class:`date` objects, the format codes for hours, minutes, seconds, and " @@ -4155,7 +4384,7 @@ 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:2657 +#: 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 " @@ -4170,7 +4399,12 @@ msgstr "" "plateformes ``strftime`` lève une :exc:`UnicodeError` ou renvoie une chaîne " "vide." -#: library/datetime.rst:2666 +#: 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 " @@ -4182,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:2672 +#: library/datetime.rst:2808 #, fuzzy msgid "" "The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] " @@ -4192,7 +4426,7 @@ msgstr "" "[1, 9999], mais toutes les années < 1000 doivent être représentées sur " "quatre chiffres." -#: library/datetime.rst:2675 +#: library/datetime.rst:2811 #, fuzzy msgid "" "In previous versions, :meth:`~.datetime.strftime` method was restricted to " @@ -4201,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:2679 +#: library/datetime.rst:2815 #, fuzzy msgid "" "In version 3.2, :meth:`~.datetime.strftime` method was restricted to years " @@ -4209,7 +4443,7 @@ msgid "" msgstr "" "En version 3.2, la méthode :meth:`strftime` était limitée aux années >= 1000." -#: library/datetime.rst:2684 +#: library/datetime.rst:2820 #, fuzzy msgid "" "When used with the :meth:`~.datetime.strptime` method, the ``%p`` directive " @@ -4220,7 +4454,7 @@ msgstr "" "n'affecte l'heure extraite que si la directive ``%I`` est utilisée pour " "analyser l'heure." -#: library/datetime.rst:2688 +#: library/datetime.rst:2824 #, fuzzy msgid "" "Unlike the :mod:`time` module, the :mod:`!datetime` module does not support " @@ -4229,7 +4463,7 @@ msgstr "" "À l'inverse du module :mod:`time`, le module :mod:`datetime` ne gère pas les " "secondes intercalaires." -#: library/datetime.rst:2692 +#: library/datetime.rst:2828 #, fuzzy msgid "" "When used with the :meth:`~.datetime.strptime` method, the ``%f`` directive " @@ -4243,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:2699 +#: library/datetime.rst:2835 #, fuzzy msgid "" "For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced " @@ -4252,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:2702 +#: library/datetime.rst:2838 msgid "For an aware object:" msgstr "Pour un objet avisé :" -#: library/datetime.rst:2705 +#: library/datetime.rst:2841 #, fuzzy msgid "" ":meth:`~.datetime.utcoffset` is transformed into a string of the form " @@ -4282,27 +4516,40 @@ msgstr "" "``timedelta(hours=-3, minutes=-30)``, ``%z`` est remplacé par la chaîne " "``'-0330'``." -#: library/datetime.rst:2719 +#: 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:2727 +#: 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:2731 +#: 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 " @@ -4313,20 +4560,20 @@ msgstr "" "dans :meth:`strftime`. Autrement ``%Z`` est remplacé par la valeur renvoyée, " "qui doit être une chaîne." -#: library/datetime.rst:2735 +#: 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:2737 +#: 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:2738 +#: 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:2740 +#: 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 " @@ -4336,7 +4583,7 @@ msgstr "" "``UTC`` et ``GMT``, mais probablement pas ``EST``. Les valeurs invalides " "lèvent ``ValueError``." -#: library/datetime.rst:2744 +#: library/datetime.rst:2886 #, fuzzy msgid "" "When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` " @@ -4347,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:2750 +#: library/datetime.rst:2892 #, fuzzy msgid "" "When used with the :meth:`~.datetime.strptime` method, ``%U`` and ``%W`` are " @@ -4358,7 +4605,7 @@ 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:2755 +#: library/datetime.rst:2897 #, fuzzy msgid "" "Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the " @@ -4371,7 +4618,7 @@ msgstr "" "dans la chaîne de formatage :meth:`strptime`. Notez aussi que ``%G`` et " "``%Y`` ne sont pas interchangeables." -#: library/datetime.rst:2761 +#: library/datetime.rst:2903 #, fuzzy msgid "" "When used with the :meth:`~.datetime.strptime` method, the leading zero is " @@ -4384,32 +4631,35 @@ msgstr "" "``%M``, ``%S``, ``%j``, ``%U``, ``%W`` et ``%V``. Le format ``%y`` requiert " "un zéro en entête." -#: library/datetime.rst:2766 +#: 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:2778 +#: library/datetime.rst:2920 +msgid "Using ``%d`` without a year now raises :exc:`ValueError`." +msgstr "" + +#: 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:2785 +#: library/datetime.rst:2928 msgid "Footnotes" msgstr "Notes" -#: library/datetime.rst:2786 -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:2788 +#: 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 " @@ -4422,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:2794 +#: 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:2798 #, 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 " diff --git a/library/dbm.po b/library/dbm.po index 685c0bafd4..1f72c00b45 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: 2025-10-17 09:58+0200\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." 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:270 library/dbm.rst:471 +#: 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,7 +100,7 @@ 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 " @@ -100,48 +108,48 @@ msgid "" "above that can be imported is used." msgstr "" -#: library/dbm.rst:242 +#: 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:182 library/dbm.rst:374 +#: 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:184 library/dbm.rst:375 +#: library/dbm.rst:189 library/dbm.rst:398 msgid "``'r'`` (default): |flag_r|" msgstr "" -#: library/dbm.rst:185 library/dbm.rst:376 library/dbm.rst:452 +#: library/dbm.rst:190 library/dbm.rst:399 library/dbm.rst:475 msgid "``'w'``: |flag_w|" msgstr "" -#: library/dbm.rst:186 library/dbm.rst:377 +#: library/dbm.rst:191 library/dbm.rst:400 msgid "``'c'``: |flag_c|" msgstr "" -#: library/dbm.rst:187 library/dbm.rst:378 library/dbm.rst:454 +#: library/dbm.rst:192 library/dbm.rst:401 library/dbm.rst:477 msgid "``'n'``: |flag_n|" msgstr "" -#: library/dbm.rst:264 library/dbm.rst:456 +#: 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 basic functionality of " "mutable :term:`mappings `; keys and their corresponding values can " @@ -151,77 +159,78 @@ msgid "" "view object. The :meth:`!setdefault` method requires two arguments." msgstr "" -#: library/dbm.rst:95 +#: 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:99 +#: 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:102 +#: library/dbm.rst:108 msgid "" ":meth:`!get` and :meth:`!setdefault` methods are now available for " -"all :mod:`dbm` backends." +"all :mod:`!dbm` backends." msgstr "" -#: library/dbm.rst:106 +#: 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:110 +#: 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:114 -msgid ":meth:`!clear` methods are now available for all :mod:`dbm` backends." +#: library/dbm.rst:120 +msgid ":meth:`!clear` methods are now available for all :mod:`!dbm` backends." msgstr "" -#: library/dbm.rst:118 +#: 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:148 +#: library/dbm.rst:154 msgid "Module :mod:`shelve`" msgstr "Module :mod:`shelve`" -#: library/dbm.rst:149 +#: library/dbm.rst:155 msgid "Persistence module which stores non-string data." msgstr "" -#: library/dbm.rst:152 +#: library/dbm.rst:158 msgid "The individual submodules are described in the following sections." msgstr "" -#: library/dbm.rst:155 -msgid ":mod:`dbm.sqlite3` --- SQLite backend for dbm" +#: library/dbm.rst:161 +msgid ":mod:`!dbm.sqlite3` --- SQLite backend for dbm" msgstr "" -#: library/dbm.rst:163 +#: library/dbm.rst:168 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/sqlite3.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:167 +#: 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 "Disponibilité" @@ -231,21 +240,21 @@ msgid "" "availability` for more information." msgstr "" -#: library/dbm.rst:176 +#: library/dbm.rst:181 msgid "Open an SQLite database." msgstr "" -#: library/dbm.rst:178 +#: library/dbm.rst:183 msgid "The path to the database to be opened." msgstr "" -#: library/dbm.rst:189 +#: 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:193 +#: 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` " @@ -253,33 +262,48 @@ msgid "" "manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:399 -msgid "The following method is also provided:" +#: library/dbm.rst:304 library/dbm.rst:507 +msgid "The following methods are also provided:" msgstr "" -#: library/dbm.rst:202 +#: library/dbm.rst:207 msgid "Close the SQLite database." msgstr "" -#: library/dbm.rst:206 -msgid ":mod:`dbm.gnu` --- GNU database manager" +#: 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:212 +#: library/dbm.rst:228 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/gnu.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:216 +#: 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:342 +#: 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 "" @@ -289,24 +313,24 @@ msgid "" "availability>` or :ref:`WebAssembly platforms `." msgstr "" -#: library/dbm.rst:229 +#: library/dbm.rst:247 msgid "" -"Raised on :mod:`dbm.gnu`-specific errors, such as I/O " +"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:235 +#: library/dbm.rst:253 msgid "" "A string of characters the *flag* parameter of :meth:`~dbm.gnu.open` " "supports." msgstr "" -#: library/dbm.rst:240 +#: library/dbm.rst:258 msgid "Open a GDBM database and return a :class:`!gdbm` object." msgstr "" -#: library/dbm.rst:246 +#: 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 " @@ -318,29 +342,29 @@ msgid "" "flag characters." msgstr "" -#: library/dbm.rst:252 +#: library/dbm.rst:270 msgid "" "The following additional characters may be appended to control how the " "database is opened:" msgstr "" -#: library/dbm.rst:255 +#: library/dbm.rst:273 msgid "" "``'f'``: Open the database in fast mode. Writes to the database will not be " "synchronized." msgstr "" -#: library/dbm.rst:257 +#: library/dbm.rst:275 msgid "" "``'s'``: Synchronized mode. Changes to the database will be written " "immediately to the file." msgstr "" -#: library/dbm.rst:259 +#: library/dbm.rst:277 msgid "``'u'``: Do not lock database." msgstr "" -#: library/dbm.rst:261 +#: 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." @@ -350,11 +374,11 @@ msgstr "" msgid "Raises" msgstr "" -#: library/dbm.rst:267 +#: library/dbm.rst:285 msgid "If an invalid *flag* argument is passed." msgstr "" -#: library/dbm.rst:273 +#: library/dbm.rst:291 msgid "" ":class:`!gdbm` objects behave similar to mutable :term:`mappings `, " "but methods :meth:`!items`, :meth:`!values`, :meth:`!pop`, :meth:`!popitem`, " @@ -363,23 +387,19 @@ msgid "" "supports a \"closing\" context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:393 +#: library/dbm.rst:416 msgid "Added the :meth:`!get` and :meth:`!setdefault` methods." msgstr "" -#: library/dbm.rst:396 +#: library/dbm.rst:419 msgid "Added the :meth:`!clear` method." msgstr "" -#: library/dbm.rst:479 -msgid "The following methods are also provided:" -msgstr "" - -#: library/dbm.rst:290 +#: library/dbm.rst:308 msgid "Close the GDBM database." msgstr "" -#: library/dbm.rst:294 +#: 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 " @@ -387,14 +407,14 @@ msgid "" "starting key." msgstr "" -#: library/dbm.rst:301 +#: 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:312 +#: 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 " @@ -403,29 +423,42 @@ msgid "" "be kept and reused as new (key, value) pairs are added." msgstr "" -#: library/dbm.rst:320 +#: library/dbm.rst:337 +msgid "" +"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: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:325 -msgid ":mod:`dbm.ndbm` --- New Database Manager" +#: library/dbm.rst:347 +msgid ":mod:`!dbm.ndbm` --- New Database Manager" msgstr "" -#: library/dbm.rst:331 +#: library/dbm.rst:352 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/ndbm.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:335 +#: 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:347 +#: 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 " @@ -433,32 +466,32 @@ msgid "" "result in a hard crash (segmentation fault)." msgstr "" -#: library/dbm.rst:356 +#: library/dbm.rst:379 msgid "" -"Raised on :mod:`dbm.ndbm`-specific errors, such as I/O " +"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:362 +#: library/dbm.rst:385 msgid "Name of the NDBM implementation library used." msgstr "" -#: library/dbm.rst:367 +#: library/dbm.rst:390 msgid "Open an NDBM database and return an :class:`!ndbm` object." msgstr "" -#: library/dbm.rst:369 +#: library/dbm.rst:392 msgid "" "The basename of the database file (without the :file:`.dir` or :file:`.pag` " "extensions)." msgstr "" -#: library/dbm.rst:383 +#: library/dbm.rst:406 msgid "Accepts :term:`path-like object` for filename." msgstr "" -#: library/dbm.rst:386 +#: library/dbm.rst:409 msgid "" ":class:`!ndbm` objects behave similar to mutable :term:`mappings `, " "but methods :meth:`!items`, :meth:`!values`, :meth:`!pop`, :meth:`!popitem`, " @@ -467,86 +500,90 @@ msgid "" "supports a \"closing\" context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:403 +#: library/dbm.rst:422 +msgid "The following method is also provided:" +msgstr "" + +#: library/dbm.rst:426 msgid "Close the NDBM database." msgstr "" -#: library/dbm.rst:407 -msgid ":mod:`dbm.dumb` --- Portable DBM implementation" +#: library/dbm.rst:430 +msgid ":mod:`!dbm.dumb` --- Portable DBM implementation" msgstr "" -#: library/dbm.rst:412 +#: library/dbm.rst:435 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/dumb.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:418 +#: 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 " +"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:425 +#: 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:430 +#: library/dbm.rst:453 #, fuzzy msgid "The :mod:`!dbm.dumb` module defines the following:" msgstr "Le module définit :" -#: library/dbm.rst:434 +#: library/dbm.rst:457 msgid "" -"Raised on :mod:`dbm.dumb`-specific errors, such as I/O " +"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:440 +#: library/dbm.rst:463 msgid "Open a :mod:`!dbm.dumb` database." msgstr "" -#: library/dbm.rst:442 +#: 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`" msgstr "" -#: library/dbm.rst:443 +#: library/dbm.rst:466 msgid "" "The basename of the database file (without extensions). A new database " "creates the following files:" msgstr "" -#: library/dbm.rst:446 +#: library/dbm.rst:469 msgid ":file:`{filename}.dat`" msgstr "" -#: library/dbm.rst:447 +#: library/dbm.rst:470 msgid ":file:`{filename}.dir`" msgstr "" -#: library/dbm.rst:450 +#: library/dbm.rst:473 msgid "" "* ``'r'``: |flag_r| * ``'w'``: |flag_w| * ``'c'`` (default): |flag_c| * " "``'n'``: |flag_n|" msgstr "" -#: library/dbm.rst:451 +#: library/dbm.rst:474 msgid "``'r'``: |flag_r|" msgstr "" -#: library/dbm.rst:453 +#: library/dbm.rst:476 msgid "``'c'`` (default): |flag_c|" msgstr "" -#: library/dbm.rst:460 +#: library/dbm.rst:483 #, fuzzy msgid "" "It is possible to crash the Python interpreter when loading a database with " @@ -557,18 +594,25 @@ 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:464 +#: 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:467 +#: 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:474 +#: library/dbm.rst:502 msgid "" "The returned database object behaves similar to a mutable :term:`mapping`, " "but the :meth:`!keys` and :meth:`!items` methods return lists, and " @@ -576,11 +620,24 @@ msgid "" "\"closing\" context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:483 +#: library/dbm.rst:511 msgid "Close the database." msgstr "" -#: library/dbm.rst:487 +#: library/dbm.rst:515 +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 not be reused." +msgstr "" + +#: 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." diff --git a/library/debug.po b/library/debug.po index fdfd80d7b4..db7238b14d 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 f3d9c2033e..f3555e3521 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: 2025-10-17 09:58+0200\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,14 +20,14 @@ 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 " +"The :mod:`!decimal` module provides support for fast correctly rounded " "decimal floating-point arithmetic. It offers several advantages over " "the :class:`float` datatype:" msgstr "" @@ -35,13 +35,14 @@ msgstr "" "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,7 +159,7 @@ 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 " @@ -175,7 +176,7 @@ msgstr "" "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 " @@ -191,7 +192,7 @@ msgstr "" "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 " @@ -205,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 `_." @@ -214,12 +215,12 @@ msgstr "" "Arithmetic Specification `_ " "(article en anglais)." -#: library/decimal.rst:125 +#: 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 " @@ -229,7 +230,7 @@ msgstr "" "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 " @@ -244,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 " @@ -254,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 " @@ -264,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`::" @@ -272,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 " @@ -281,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 " @@ -298,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 " @@ -308,19 +316,21 @@ 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 :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 " +"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:" @@ -330,7 +340,7 @@ msgstr "" "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 " @@ -343,7 +353,7 @@ msgstr "" "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 " @@ -354,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:" @@ -362,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` " @@ -377,15 +387,15 @@ 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 " @@ -399,7 +409,7 @@ msgstr "" "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 " @@ -414,7 +424,7 @@ msgstr "" "alphabets (par exemple les chiffres indo-arabes ou Devanagari) ainsi que les " "chiffres de pleine largeur ``'\\uff10'`` jusqu'à ``'\\uff19'``." -#: library/decimal.rst:373 +#: 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 " @@ -426,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:378 +#: library/decimal.rst:392 #, fuzzy msgid "" "If *value* is a :class:`float`, the binary floating-point value is " @@ -441,7 +451,7 @@ msgstr "" "``Decimal(float('1.1'))`` devient " "``Decimal('1.100000000000000088817841970012523233890533447265625')``." -#: library/decimal.rst:384 +#: 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, " @@ -453,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:389 +#: 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 " @@ -465,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:394 +#: 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:396 +#: library/decimal.rst:410 msgid "" "The argument to the constructor is now permitted to be a :class:`float` " "instance." @@ -478,7 +488,7 @@ msgstr "" "l'argument du constructeur peut désormais être un objet :class:`float`." # suit un : -#: library/decimal.rst:400 +#: library/decimal.rst:414 msgid "" ":class:`float` arguments raise an exception if the :exc:`FloatOperation` " "trap is set. By default the trap is off." @@ -487,7 +497,7 @@ msgstr "" "pour :exc:`FloatOperation`. Par défaut le déroutement n'est pas activé." # suit un : -#: library/decimal.rst:404 +#: library/decimal.rst:418 msgid "" "Underscores are allowed for grouping, as with integral and floating-point " "literals in code." @@ -495,7 +505,7 @@ msgstr "" "les tirets bas sont autorisés pour regrouper, tout comme pour l'arithmétique " "en virgule fixe et flottante." -#: library/decimal.rst:408 +#: library/decimal.rst:422 #, fuzzy msgid "" "Decimal floating-point objects share many properties with the other built-in " @@ -513,7 +523,7 @@ msgstr "" "comparés, classés et convertis vers un autre type (tel que :class:`float` " "ou :class:`int`)." -#: library/decimal.rst:415 +#: 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 " @@ -525,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:425 +#: 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 " @@ -535,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:434 +#: library/decimal.rst:448 msgid "" "The ``%`` and ``//`` operators implement the ``remainder`` and ``divide-" "integer`` operations (respectively) as described in the specification." @@ -543,7 +553,7 @@ 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:438 +#: 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 " @@ -563,7 +573,7 @@ msgstr "" "types." # suit un : -#: library/decimal.rst:446 +#: library/decimal.rst:460 msgid "" "Mixed-type comparisons between :class:`Decimal` instances and other numeric " "types are now fully supported." @@ -571,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:450 +#: library/decimal.rst:464 #, fuzzy msgid "" "In addition to the standard numeric properties, decimal floating-point " @@ -580,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:456 +#: 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()`` " @@ -592,7 +602,7 @@ 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:463 +#: 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 " @@ -602,7 +612,7 @@ msgstr "" "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:470 +#: library/decimal.rst:484 msgid "" "The conversion is exact. Raise OverflowError on infinities and ValueError " "on NaNs." @@ -610,7 +620,7 @@ msgstr "" "La conversion est exacte. Lève une ``OverflowError`` sur l'infini et " "``ValueError`` sur les *Nan*." -#: library/decimal.rst:477 +#: library/decimal.rst:491 msgid "" "Return a :term:`named tuple` representation of the number: " "``DecimalTuple(sign, digits, exponent)``." @@ -618,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:483 +#: 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 " @@ -628,7 +638,7 @@ msgstr "" "instance :class:`Decimal` est toujours canonique, donc cette opération " "renvoie son argument inchangé." -#: library/decimal.rst:489 +#: 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::" @@ -637,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:500 +#: 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 " @@ -648,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:506 +#: 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 " @@ -662,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:515 +#: 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 " @@ -678,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:533 library/decimal.rst:865 +#: 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 " @@ -689,7 +699,7 @@ msgstr "" "Exceptionnellement, la version C peut lever une *InvalidOperation* si le " "deuxième opérande ne peut pas être converti exactement." -#: library/decimal.rst:528 +#: 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. " @@ -701,7 +711,7 @@ msgstr "" "chaque opérande. ``x.compare_total_mag(y)`` est équivalent à " "``x.copy_abs().compare_total(y.copy_abs())``." -#: library/decimal.rst:539 +#: library/decimal.rst:553 msgid "" "Just returns self, this method is only to comply with the Decimal " "Specification." @@ -709,7 +719,7 @@ msgstr "" "Ne fait que renvoyer self ; cette méthode existe uniquement pour se " "conformer à la spécification." -#: library/decimal.rst:544 +#: 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." @@ -718,7 +728,7 @@ msgstr "" "contexte et est silencieuse : aucun drapeau n'est modifié et aucun arrondi " "n'est effectué." -#: library/decimal.rst:550 +#: 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." @@ -727,7 +737,7 @@ msgstr "" "et est silencieuse : aucun drapeau n'est modifié et aucun arrondi n'est " "effectué." -#: library/decimal.rst:555 +#: 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:" @@ -735,7 +745,7 @@ 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:567 +#: 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` " @@ -745,7 +755,7 @@ msgstr "" "résultat est correctement arrondi en utilisant le mode " "d'arrondi :const:`ROUND_HALF_EVEN`." -#: library/decimal.rst:578 +#: library/decimal.rst:592 msgid "" "Alternative constructor that only accepts instances of :class:`float` " "or :class:`int`." @@ -753,7 +763,7 @@ msgstr "" "Constructeur alternatif qui n'accepte que les instances de :class:`float` " "ou :class:`int`." -#: library/decimal.rst:581 +#: 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 " @@ -769,7 +779,7 @@ msgstr "" "``0.1000000000000000055511151231257827021181583404541015625``." # suit un : -#: library/decimal.rst:587 +#: library/decimal.rst:601 msgid "" "From Python 3.2 onwards, a :class:`Decimal` instance can also be constructed " "directly from a :class:`float`." @@ -777,7 +787,7 @@ msgstr "" "depuis Python 3.2, une instance :class:`Decimal` peut également être " "construite directement à partir d'un :class:`float`." -#: library/decimal.rst:605 +#: library/decimal.rst:619 #, fuzzy msgid "" "Alternative constructor that only accepts instances " @@ -787,7 +797,7 @@ msgstr "" "Constructeur alternatif qui n'accepte que les instances de :class:`float` " "ou :class:`int`." -#: library/decimal.rst:622 +#: library/decimal.rst:636 msgid "" "Fused multiply-add. Return self*other+third with no rounding of the " "intermediate product self*other." @@ -795,7 +805,7 @@ msgstr "" "Multiplier-ajouter fusionné. Renvoie ``self*other+third`` sans arrondir le " "produit intermédiaire ``self*other``." -#: library/decimal.rst:630 +#: 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 " @@ -805,7 +815,7 @@ msgstr "" "et :const:`False` sinon. Actuellement, une instance :class:`Decimal` est " "toujours canonique, donc cette opération renvoie toujours :const:`True`." -#: library/decimal.rst:636 +#: 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." @@ -813,7 +823,7 @@ 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:641 +#: library/decimal.rst:655 msgid "" "Return :const:`True` if the argument is either positive or negative infinity " "and :const:`False` otherwise." @@ -821,7 +831,7 @@ msgstr "" "Renvoie :const:`True` si l'argument est un infini positif ou " "négatif, :const:`False` sinon." -#: library/decimal.rst:646 +#: library/decimal.rst:660 msgid "" "Return :const:`True` if the argument is a (quiet or signaling) NaN " "and :const:`False` otherwise." @@ -829,7 +839,7 @@ msgstr "" "Renvoie :const:`True` si l'argument est un *NaN* (signalétique ou " "silencieux), :const:`False` sinon." -#: library/decimal.rst:651 +#: 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." @@ -838,7 +848,7 @@ msgstr "" "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:656 +#: library/decimal.rst:670 msgid "" "Return :const:`True` if the argument is a quiet NaN, and :const:`False` " "otherwise." @@ -846,7 +856,7 @@ msgstr "" "Renvoie :const:`True` si l'argument est un *NaN* silencieux, :const:`False` " "sinon." -#: library/decimal.rst:661 +#: 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." @@ -854,7 +864,7 @@ 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:666 +#: library/decimal.rst:680 msgid "" "Return :const:`True` if the argument is a signaling NaN and :const:`False` " "otherwise." @@ -862,7 +872,7 @@ msgstr "" "Renvoie :const:`True` si l'argument est un *NaN* " "signalétique, :const:`False` sinon." -#: library/decimal.rst:671 +#: library/decimal.rst:685 msgid "" "Return :const:`True` if the argument is subnormal, and :const:`False` " "otherwise." @@ -870,7 +880,7 @@ 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:676 +#: library/decimal.rst:690 msgid "" "Return :const:`True` if the argument is a (positive or negative) zero " "and :const:`False` otherwise." @@ -878,7 +888,7 @@ msgstr "" "Renvoie :const:`True` si l'argument est un zéro (positif ou " "négatif), :const:`False` sinon." -#: library/decimal.rst:681 +#: 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." @@ -886,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:686 +#: 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." @@ -894,7 +904,7 @@ 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:691 +#: 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('-" @@ -906,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:699 +#: 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 " @@ -916,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:705 +#: library/decimal.rst:719 msgid "" ":meth:`logical_invert` is a logical operation. The result is the digit-wise " "inversion of the operand." @@ -924,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:710 +#: 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 " @@ -934,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:716 +#: 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 " @@ -944,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:722 +#: 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 " @@ -954,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:729 +#: library/decimal.rst:743 msgid "" "Similar to the :meth:`.max` method, but the comparison is done using the " "absolute values of the operands." @@ -962,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:734 +#: 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 " @@ -972,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:741 +#: library/decimal.rst:755 msgid "" "Similar to the :meth:`.min` method, but the comparison is done using the " "absolute values of the operands." @@ -980,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:746 +#: 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 " @@ -990,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:752 +#: 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 " @@ -1000,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:758 +#: 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 " @@ -1012,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:765 +#: library/decimal.rst:779 msgid "" "Used for producing canonical values of an equivalence class within either " "the current context or the specified context." @@ -1020,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:768 +#: 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 " @@ -1036,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:775 +#: library/decimal.rst:789 msgid "" "For example, ``Decimal('32.100')`` and ``Decimal('0.321000e+2')`` both " "normalize to the equivalent value ``Decimal('32.1')``." @@ -1044,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:778 +#: 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:780 +#: library/decimal.rst:794 msgid "" "In the latest versions of the specification, this operation is also known as " "``reduce``." @@ -1058,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:785 +#: library/decimal.rst:799 msgid "" "Return a string describing the *class* of the operand. The returned value " "is one of the following ten strings." @@ -1067,19 +1077,19 @@ msgstr "" "est l'une des dix chaînes suivantes." # Élément d'une liste, d'où le ; final -#: library/decimal.rst:788 +#: 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:789 +#: 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:790 +#: library/decimal.rst:804 msgid "" "``\"-Subnormal\"``, indicating that the operand is negative and subnormal." msgstr "" @@ -1087,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:791 +#: 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:792 +#: 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:793 +#: 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:794 +#: 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:795 +#: 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:796 +#: 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:797 +#: 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:801 +#: library/decimal.rst:815 msgid "" "Return a value equal to the first operand after rounding and having the " "exponent of the second operand." @@ -1136,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:807 +#: 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` " @@ -1149,7 +1159,7 @@ msgstr "" "condition d'erreur, l'exposant quantifié est toujours égal à celui de " "l'opérande de droite." -#: library/decimal.rst:813 +#: library/decimal.rst:827 msgid "" "Also unlike other operations, quantize never signals Underflow, even if the " "result is subnormal and inexact." @@ -1158,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:816 +#: 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 " @@ -1172,7 +1182,7 @@ 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:822 +#: 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`." @@ -1180,7 +1190,7 @@ 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:827 +#: 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." @@ -1189,7 +1199,7 @@ msgstr "" "classe :class:`Decimal` fait toute son arithmétique. Inclus pour la " "compatibilité avec la spécification." -#: library/decimal.rst:833 +#: 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 " @@ -1204,11 +1214,11 @@ msgstr "" "exacte de ``self / other`` et, si deux entiers sont également proches, alors " "l'entier pair est choisi." -#: library/decimal.rst:840 +#: 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:851 +#: 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 " @@ -1228,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:862 +#: 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:871 +#: 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 " @@ -1245,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:877 +#: 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 " @@ -1264,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:887 +#: 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:1549 +#: 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:1551 +#: 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 " @@ -1285,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:898 +#: 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:902 +#: 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." @@ -1299,7 +1309,7 @@ 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:907 +#: 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 " @@ -1312,7 +1322,7 @@ msgstr "" "``context`` donné. Si aucun paramètre n'est donné, le mode d'arrondi du " "contexte courant est utilisé." -#: library/decimal.rst:915 +#: library/decimal.rst:929 msgid "" "Round to the nearest integer without signaling :const:`Inexact` " "or :const:`Rounded`. If given, applies *rounding*; otherwise, uses the " @@ -1322,11 +1332,11 @@ msgstr "" "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:919 +#: library/decimal.rst:933 msgid "Decimal numbers can be rounded using the :func:`.round` function:" msgstr "" -#: library/decimal.rst:924 +#: 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 " @@ -1334,7 +1344,7 @@ msgid "" "infinity or :exc:`ValueError` if it is a (quiet or signaling) NaN." msgstr "" -#: library/decimal.rst:930 +#: 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 " @@ -1347,31 +1357,31 @@ msgid "" "non-corner cases:" msgstr "" -#: library/decimal.rst:940 +#: library/decimal.rst:954 msgid "" "if *ndigits* is positive, return *number* rounded to *ndigits* decimal " "places;" msgstr "" -#: library/decimal.rst:942 +#: library/decimal.rst:956 msgid "if *ndigits* is zero, return *number* rounded to the nearest integer;" msgstr "" -#: library/decimal.rst:943 +#: library/decimal.rst:957 msgid "" "if *ndigits* is negative, return *number* rounded to the nearest multiple of " "``10**abs(ndigits)``." msgstr "" -#: library/decimal.rst:946 +#: library/decimal.rst:960 msgid "For example::" msgstr "Par exemple ::" -#: library/decimal.rst:965 +#: library/decimal.rst:979 msgid "Logical operands" msgstr "Opérandes logiques" -#: library/decimal.rst:967 +#: 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 " @@ -1386,11 +1396,11 @@ msgstr "" "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:979 +#: library/decimal.rst:993 msgid "Context objects" msgstr "Objets de contexte" -#: library/decimal.rst:981 +#: 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, " @@ -1400,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:985 +#: 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:" @@ -1408,15 +1418,15 @@ 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:991 +#: 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:996 +#: 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:998 +#: library/decimal.rst:1012 msgid "" "You can also use the :keyword:`with` statement and the :func:`localcontext` " "function to temporarily change the active context." @@ -1424,7 +1434,7 @@ msgstr "" "Vous pouvez également utiliser l'instruction :keyword:`with` et la " "fonction :func:`localcontext` pour modifier temporairement le contexte actif." -#: library/decimal.rst:1003 +#: 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 " @@ -1439,7 +1449,7 @@ msgstr "" "utilisée. L'argument *kwargs* est utilisé pour définir les attributs du " "nouveau contexte." -#: library/decimal.rst:1009 +#: 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 " @@ -1449,11 +1459,11 @@ msgstr "" "chiffres, effectue un calcul, puis restaure automatiquement le contexte " "précédent ::" -#: library/decimal.rst:1019 +#: 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:1027 +#: library/decimal.rst:1041 msgid "" "Raises :exc:`TypeError` if *kwargs* supplies an attribute " "that :class:`Context` doesn't support. Raises either :exc:`TypeError` " @@ -1463,7 +1473,7 @@ msgstr "" "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:1031 +#: library/decimal.rst:1045 msgid "" ":meth:`localcontext` now supports setting context attributes through the use " "of keyword arguments." @@ -1471,14 +1481,14 @@ 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:1036 +#: 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:1042 +#: 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:" @@ -1487,7 +1497,7 @@ msgstr "" "constructeur :class:`Context` décrit ci-dessous. De plus, le module fournit " "trois contextes prédéfinis :" -#: library/decimal.rst:1048 +#: 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 " @@ -1501,14 +1511,14 @@ msgstr "" "déroutements sont activés (ils lèvent des exceptions) " "sauf :const:`Inexact`, :const:`Rounded` et :const:`Subnormal`." -#: library/decimal.rst:1054 +#: 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:1059 +#: 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 " @@ -1521,7 +1531,7 @@ msgstr "" "désactivées (afin que les exceptions ne soient pas levées pendant les " "calculs)." -#: library/decimal.rst:1064 +#: 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 " @@ -1534,7 +1544,7 @@ msgstr "" "de terminer une exécution en présence de conditions qui, autrement, " "arrêteraient le programme." -#: library/decimal.rst:1072 +#: 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 " @@ -1546,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:1076 +#: 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 " @@ -1560,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:1081 +#: 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." @@ -1569,7 +1579,7 @@ msgstr "" "pas utiliser ce contexte du tout. Créez plutôt simplement des contextes " "explicitement comme décrit ci-dessous." -#: library/decimal.rst:1084 +#: library/decimal.rst:1098 msgid "" "The default values are :attr:`Context.prec`\\ =\\ " "``28``, :attr:`Context.rounding`\\ =\\ :const:`ROUND_HALF_EVEN`, and enabled " @@ -1581,7 +1591,7 @@ msgstr "" "interruptions sont activées " "pour :class:`Overflow`, :class:`InvalidOperation` et :class:`DivisionByZero`." -#: library/decimal.rst:1089 +#: library/decimal.rst:1103 msgid "" "In addition to the three supplied contexts, new contexts can be created with " "the :class:`Context` constructor." @@ -1589,7 +1599,7 @@ msgstr "" "En plus des trois contextes fournis, de nouveaux contextes peuvent être " "créés avec le constructeur :class:`Context`." -#: library/decimal.rst:1095 +#: 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* " @@ -1600,7 +1610,7 @@ msgstr "" "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:1101 +#: library/decimal.rst:1115 #, fuzzy msgid "" "An integer in the range [``1``, :const:`MAX_PREC`] that sets the precision " @@ -1609,14 +1619,14 @@ 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:1106 +#: 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:1111 +#: library/decimal.rst:1125 #, fuzzy msgid "" "Lists of any signals to be set. Generally, new contexts should only set " @@ -1626,7 +1636,7 @@ msgstr "" "général, les nouveaux contextes ne doivent qu'activer des surveillances et " "laisser les drapeaux baissés." -#: library/decimal.rst:1117 +#: library/decimal.rst:1131 #, fuzzy msgid "" "Integers specifying the outer limits allowable for exponents. *Emin* must be " @@ -1637,7 +1647,7 @@ msgstr "" "autorisées pour les exposants. *Emin* doit être dans [:const:`MIN_EMIN`, " "``0``], *Emax* dans la plage [``0``, :const:`MAX_EMAX`]." -#: library/decimal.rst:1123 +#: library/decimal.rst:1137 #, fuzzy msgid "" "Either ``0`` or ``1`` (the default). If set to ``1``, exponents are printed " @@ -1648,7 +1658,7 @@ msgstr "" "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:1129 +#: library/decimal.rst:1143 #, fuzzy msgid "" "Either ``0`` (the default) or ``1``. If set to ``1``, the exponent ``e`` of " @@ -1673,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:1143 +#: library/decimal.rst:1157 msgid "" "A *clamp* value of ``1`` allows compatibility with the fixed-width decimal " "interchange formats specified in IEEE 754." @@ -1681,7 +1691,7 @@ 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:1146 +#: 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 " @@ -1705,23 +1715,23 @@ msgstr "" "méthode :class:`Context` accepte un entier Python (une instance " "de :class:`int`) partout où une instance Decimal est acceptée." -#: library/decimal.rst:1159 +#: library/decimal.rst:1173 msgid "Resets all of the flags to ``0``." msgstr "Réinitialise tous les drapeaux à ``0``." -#: library/decimal.rst:1163 +#: library/decimal.rst:1177 msgid "Resets all of the traps to ``0``." msgstr "Réinitialise toutes les surveillances à ``0``." -#: library/decimal.rst:1169 +#: library/decimal.rst:1183 msgid "Return a duplicate of the context." msgstr "Renvoie une copie du contexte." -#: library/decimal.rst:1173 +#: 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:1177 +#: 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 " @@ -1732,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:1181 +#: 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 " @@ -1747,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:1195 +#: 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 " @@ -1757,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:1201 +#: 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 " @@ -1770,7 +1780,7 @@ msgstr "" "d'arrondi, les indicateurs et les surveillances sont appliqués à la " "conversion." -#: library/decimal.rst:1221 +#: 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 " @@ -1780,11 +1790,11 @@ msgstr "" "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:1227 +#: library/decimal.rst:1241 msgid "Returns a value equal to ``Emax - prec + 1``." msgstr "Renvoie une valeur égale à ``Emax - prec + 1``." -#: library/decimal.rst:1229 +#: 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 " @@ -1800,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:1239 +#: library/decimal.rst:1253 msgid "Returns the absolute value of *x*." msgstr "Renvoie la valeur absolue de *x*." -#: library/decimal.rst:1244 +#: library/decimal.rst:1258 msgid "Return the sum of *x* and *y*." msgstr "Renvoie la somme de *x* et *y*." -#: library/decimal.rst:1249 +#: library/decimal.rst:1263 msgid "Returns the same Decimal object *x*." msgstr "Renvoie l'objet Decimal *x* lui-même." -#: library/decimal.rst:1254 +#: library/decimal.rst:1268 msgid "Compares *x* and *y* numerically." msgstr "Compare *x* et *y* numériquement." -#: library/decimal.rst:1259 +#: 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:1264 +#: 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:1269 +#: 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:1274 +#: 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:1279 +#: 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:1284 +#: library/decimal.rst:1298 msgid "Copies the sign from *y* to *x*." msgstr "Copie le signe de *y* vers *x*." -#: library/decimal.rst:1289 +#: library/decimal.rst:1303 msgid "Return *x* divided by *y*." msgstr "Renvoie *x* divisé par *y*." -#: library/decimal.rst:1294 +#: 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:1299 +#: 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:1304 +#: library/decimal.rst:1318 msgid "Returns ``e ** x``." msgstr "Renvoie ``e ** x``." -#: library/decimal.rst:1309 +#: library/decimal.rst:1323 msgid "Returns *x* multiplied by *y*, plus *z*." msgstr "Renvoie *x* multiplié par *y*, plus *z*." -#: library/decimal.rst:1314 +#: 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:1319 +#: 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:1324 +#: 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:1329 +#: 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:1334 +#: 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:1339 +#: 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:1344 +#: 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:1349 +#: 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:1354 +#: 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:1359 +#: 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:1364 +#: 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:1369 +#: library/decimal.rst:1383 msgid "Returns the base 10 logarithm of *x*." msgstr "Renvoie le logarithme en base 10 de *x*." -#: library/decimal.rst:1374 +#: 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:1379 +#: 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:1384 +#: library/decimal.rst:1398 msgid "Invert all the digits in *x*." msgstr "Inverse tous les chiffres de *x*." -#: library/decimal.rst:1389 +#: 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:1394 +#: 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:1399 +#: 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:1414 +#: 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:1409 +#: 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:1419 +#: 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:1424 +#: library/decimal.rst:1438 msgid "Return the product of *x* and *y*." msgstr "Renvoie la multiplication de *x* avec *y*." -#: library/decimal.rst:1429 +#: 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:1434 +#: 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:1439 +#: 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:1444 +#: library/decimal.rst:1458 msgid "Reduces *x* to its simplest form." msgstr "Réduit *x* à sa forme la plus simple." -#: library/decimal.rst:1449 +#: 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:1454 +#: 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 " @@ -1993,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:1461 +#: 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:1463 +#: 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 " @@ -2013,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:1469 +#: library/decimal.rst:1483 msgid "" "``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if " "``InvalidOperation`` is not trapped, then results in ``Decimal('NaN')``." @@ -2021,7 +2031,7 @@ msgstr "" "``Decimal(0) ** Decimal(0)`` donne ``InvalidOperation`` et, si " "``InvalidOperation`` n'est pas surveillé, cela donne ``Decimal('NaN')``." -#: library/decimal.rst:1472 +#: 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 " @@ -2031,7 +2041,7 @@ msgstr "" "et :meth:`ln` correctement arrondies. Le résultat est bien défini mais " "seulement « presque toujours correctement arrondi »." -#: library/decimal.rst:1477 +#: library/decimal.rst:1491 msgid "" "With three arguments, compute ``(x**y) % modulo``. For the three argument " "form, the following restrictions on the arguments hold:" @@ -2039,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:1480 +#: 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:1481 +#: 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:1482 +#: 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:1483 +#: 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:1485 +#: 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 " @@ -2073,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:1495 +#: 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:1500 +#: library/decimal.rst:1514 msgid "Just returns 10, as this is Decimal, :)" msgstr "Renvoie 10 car c'est *Decimal*, :)" -#: library/decimal.rst:1505 +#: library/decimal.rst:1519 msgid "Returns the remainder from integer division." msgstr "Renvoie le reste de la division entière." -#: library/decimal.rst:1507 +#: library/decimal.rst:1521 msgid "" "The sign of the result, if non-zero, is the same as that of the original " "dividend." @@ -2093,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:1513 +#: 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*)." @@ -2102,103 +2112,115 @@ msgstr "" "exacte de ``x / y`` (si le résultat est 0 alors son signe est le signe de " "*x*)." -#: library/decimal.rst:1519 +#: 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:1524 +#: 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:1529 +#: 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:1534 +#: 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:1539 +#: 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:1544 +#: library/decimal.rst:1558 msgid "Return the difference between *x* and *y*." msgstr "Renvoie la différence entre *x* et *y*." -#: library/decimal.rst:1558 +#: library/decimal.rst:1572 msgid "Rounds to an integer." msgstr "Arrondit à un entier." -#: library/decimal.rst:1563 +#: 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:1570 +#: library/decimal.rst:1584 msgid "Constants" msgstr "Constantes" -#: library/decimal.rst:1572 +#: 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:1576 +#: library/decimal.rst:1599 msgid "32-bit" msgstr "32-bit" -#: library/decimal.rst:1576 +#: library/decimal.rst:1599 msgid "64-bit" msgstr "64-bit" -#: library/decimal.rst:1580 +#: library/decimal.rst:1603 msgid "``425000000``" msgstr "``425000000``" -#: library/decimal.rst:1580 +#: library/decimal.rst:1603 msgid "``999999999999999999``" msgstr "``999999999999999999``" -#: library/decimal.rst:1582 +#: library/decimal.rst:1605 msgid "``-425000000``" msgstr "``-425000000``" -#: library/decimal.rst:1582 +#: library/decimal.rst:1605 msgid "``-999999999999999999``" msgstr "``-999999999999999999``" -#: library/decimal.rst:1584 +#: library/decimal.rst:1607 msgid "``-849999999``" msgstr "``-849999999``" -#: library/decimal.rst:1584 +#: library/decimal.rst:1607 msgid "``-1999999999999999997``" msgstr "``-1999999999999999997``" -#: library/decimal.rst:1586 +#: library/decimal.rst:1609 msgid "``256``" msgstr "" -#: library/decimal.rst:1586 +#: library/decimal.rst:1609 msgid "``512``" msgstr "" -#: library/decimal.rst:1591 +#: 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:1597 +#: 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 " @@ -2207,55 +2229,55 @@ msgid "" "scenarios." msgstr "" -#: library/decimal.rst:1606 +#: library/decimal.rst:1629 msgid "Rounding modes" msgstr "Modes d'arrondi" -#: library/decimal.rst:1610 +#: library/decimal.rst:1633 msgid "Round towards ``Infinity``." msgstr "" -#: library/decimal.rst:1614 +#: library/decimal.rst:1637 msgid "Round towards zero." msgstr "" -#: library/decimal.rst:1618 +#: library/decimal.rst:1641 msgid "Round towards ``-Infinity``." msgstr "" -#: library/decimal.rst:1622 +#: library/decimal.rst:1645 msgid "Round to nearest with ties going towards zero." msgstr "" -#: library/decimal.rst:1626 +#: library/decimal.rst:1649 msgid "Round to nearest with ties going to nearest even integer." msgstr "" -#: library/decimal.rst:1630 +#: library/decimal.rst:1653 msgid "Round to nearest with ties going away from zero." msgstr "" -#: library/decimal.rst:1634 +#: library/decimal.rst:1657 msgid "Round away from zero." msgstr "" -#: library/decimal.rst:1638 +#: 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:1645 +#: library/decimal.rst:1668 msgid "Signals" msgstr "Signaux" -#: library/decimal.rst:1647 +#: 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:1650 +#: 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, " @@ -2263,7 +2285,7 @@ msgid "" "sure to clear all flags before starting the next computation." msgstr "" -#: library/decimal.rst:1655 +#: 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 " @@ -2271,58 +2293,58 @@ msgid "" "exception is raised upon encountering the condition." msgstr "" -#: library/decimal.rst:1663 +#: library/decimal.rst:1686 msgid "Altered an exponent to fit representation constraints." msgstr "" -#: library/decimal.rst:1665 +#: 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." msgstr "" -#: library/decimal.rst:1672 +#: library/decimal.rst:1695 msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`." msgstr "" -#: library/decimal.rst:1677 +#: library/decimal.rst:1700 msgid "Signals the division of a non-infinite number by zero." msgstr "" -#: library/decimal.rst:1679 +#: 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:1686 +#: library/decimal.rst:1709 msgid "Indicates that rounding occurred and the result is not exact." msgstr "" -#: library/decimal.rst:1688 +#: 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:1695 +#: library/decimal.rst:1718 msgid "An invalid operation was performed." msgstr "" -#: library/decimal.rst:1697 +#: 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:1713 +#: library/decimal.rst:1736 msgid "Numerical overflow." msgstr "Débordement numérique." -#: library/decimal.rst:1715 +#: 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, " @@ -2331,42 +2353,42 @@ msgid "" "and :class:`Rounded` are also signaled." msgstr "" -#: library/decimal.rst:1724 +#: library/decimal.rst:1747 msgid "Rounding occurred though possibly no information was lost." msgstr "" -#: library/decimal.rst:1726 +#: 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:1734 +#: library/decimal.rst:1757 msgid "Exponent was lower than :attr:`~Context.Emin` prior to rounding." msgstr "" -#: library/decimal.rst:1736 +#: 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:1742 +#: library/decimal.rst:1765 msgid "Numerical underflow with result rounded to zero." msgstr "" -#: library/decimal.rst:1744 +#: library/decimal.rst:1767 msgid "" "Occurs when a subnormal result is pushed to zero by " "rounding. :class:`Inexact` and :class:`Subnormal` are also signaled." msgstr "" -#: library/decimal.rst:1750 +#: library/decimal.rst:1773 msgid "Enable stricter semantics for mixing floats and Decimals." msgstr "" -#: library/decimal.rst:1752 +#: library/decimal.rst:1775 msgid "" "If the signal is not trapped (default), mixing floats and Decimals is " "permitted in the :class:`~decimal.Decimal` " @@ -2377,26 +2399,26 @@ msgid "" "or :meth:`~decimal.Context.create_decimal_from_float` do not set the flag." msgstr "" -#: library/decimal.rst:1760 +#: 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`." msgstr "" -#: library/decimal.rst:1764 +#: library/decimal.rst:1787 msgid "The following table summarizes the hierarchy of signals::" msgstr "" -#: library/decimal.rst:1785 +#: library/decimal.rst:1808 msgid "Floating-point notes" msgstr "" -#: library/decimal.rst:1789 +#: library/decimal.rst:1812 msgid "Mitigating round-off error with increased precision" msgstr "" -#: library/decimal.rst:1791 +#: 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 " @@ -2404,7 +2426,7 @@ msgid "" "precision." msgstr "" -#: library/decimal.rst:1795 +#: 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 " @@ -2413,24 +2435,24 @@ msgid "" "of the associative and distributive properties of addition:" msgstr "" -#: library/decimal.rst:1819 +#: 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:1839 +#: library/decimal.rst:1862 msgid "Special values" msgstr "" -#: library/decimal.rst:1841 +#: 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:1845 +#: 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 " @@ -2439,14 +2461,14 @@ msgid "" "representable number." msgstr "" -#: library/decimal.rst:1850 +#: 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:1854 +#: library/decimal.rst:1877 msgid "" "Some operations are indeterminate and return ``NaN``, or if " "the :exc:`InvalidOperation` signal is trapped, raise an exception. For " @@ -2457,14 +2479,14 @@ msgid "" "the calculation to proceed while flagging specific results as invalid." msgstr "" -#: library/decimal.rst:1862 +#: 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:1866 +#: 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 " @@ -2481,7 +2503,7 @@ msgid "" "and :meth:`~Decimal.compare_signal` methods instead." msgstr "" -#: library/decimal.rst:1879 +#: 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 " @@ -2489,7 +2511,7 @@ msgid "" "negative zeros are treated as equal and their sign is informational." msgstr "" -#: library/decimal.rst:1884 +#: 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 " @@ -2498,11 +2520,11 @@ msgid "" "that the following calculation returns a value equal to zero:" msgstr "" -#: library/decimal.rst:1899 +#: library/decimal.rst:1922 msgid "Working with threads" msgstr "" -#: library/decimal.rst:1901 +#: 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 " @@ -2510,13 +2532,13 @@ msgid "" "other threads." msgstr "" -#: library/decimal.rst:1905 +#: library/decimal.rst:1928 msgid "" "Likewise, the :func:`setcontext` function automatically assigns its target " "to the current thread." msgstr "" -#: library/decimal.rst:1908 +#: 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 " @@ -2524,7 +2546,7 @@ msgid "" "the :data:`decimal.DefaultContext` object." msgstr "" -#: library/decimal.rst:1913 +#: library/decimal.rst:1936 msgid "" "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 " @@ -2534,7 +2556,7 @@ msgid "" "of :meth:`threading.Thread.start`." msgstr "" -#: library/decimal.rst:1920 +#: library/decimal.rst:1943 msgid "" "To control the defaults so that each thread will use the same values " "throughout the application, directly modify the *DefaultContext* object. " @@ -2542,58 +2564,62 @@ msgid "" "a race condition between threads calling :func:`getcontext`. For example::" msgstr "" -#: library/decimal.rst:1944 +#: library/decimal.rst:1967 msgid "Recipes" msgstr "Cas pratiques" -#: library/decimal.rst:1946 +#: 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:2101 +#: library/decimal.rst:2124 msgid "Decimal FAQ" msgstr "FAQ *decimal*" -#: library/decimal.rst:2103 +#: 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:2106 -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:2112 +#: 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:2116 +#: 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:2134 +#: 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:2137 +#: 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:" @@ -2604,7 +2630,7 @@ msgstr "" "entiers, changent le nombre de décimales et doivent être suivies d'une " "étape :meth:`~Decimal.quantize` :" -#: library/decimal.rst:2155 +#: library/decimal.rst:2178 msgid "" "In developing fixed-point applications, it is convenient to define functions " "to handle the :meth:`~Decimal.quantize` step:" @@ -2613,27 +2639,27 @@ msgstr "" "définir des fonctions pour gérer cette étape de quantification " "par :meth:`~Decimal.quantize` :" -#: library/decimal.rst:2169 +#: 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:2174 +#: 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:2181 -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:2183 +#: 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 " @@ -2641,87 +2667,87 @@ msgid "" "computation::" msgstr "" -#: library/decimal.rst:2201 +#: 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:2204 +#: 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:2209 +#: 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:2219 -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:2221 +#: 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:2230 +#: 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:2233 +#: 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:2238 +#: 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:2242 +#: 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:2255 +#: 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:2264 +#: library/decimal.rst:2287 msgid "" "Alternatively, inputs can be rounded upon creation using " "the :meth:`Context.create_decimal` method:" msgstr "" -#: library/decimal.rst:2270 -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:2272 +#: library/decimal.rst:2295 msgid "" -"A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of " +"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 [#]_. " @@ -2732,7 +2758,7 @@ msgid "" "large numbers." msgstr "" -#: library/decimal.rst:2282 +#: 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 " @@ -2740,19 +2766,19 @@ msgid "" "default). Setting :attr:`~Context.prec` requires some care." msgstr "" -#: library/decimal.rst:2286 +#: 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:2295 +#: library/decimal.rst:2318 msgid "" "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:2303 +#: 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 " @@ -2760,14 +2786,14 @@ msgid "" "of 500MB each::" msgstr "" -#: library/decimal.rst:2327 +#: 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:2336 +#: library/decimal.rst:2359 msgid "" "This approach now works for all exact results except for non-integer powers." msgstr "" diff --git a/library/dialog.po b/library/dialog.po index a7025fb519..5ccf6d9584 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 145a28459b..00b22eee87 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: 2025-10-17 09:58+0200\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 " @@ -41,7 +41,7 @@ msgstr "" "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 " @@ -71,7 +71,7 @@ msgstr "" "séquences de montage minimales, mais tend à donner des correspondances qui " "« semblent correctes » pour les gens." -#: library/difflib.rst:41 +#: 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 " @@ -108,12 +108,12 @@ msgstr "" "``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,7 +222,7 @@ 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 " @@ -234,11 +234,11 @@ msgstr "" "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,7 +309,7 @@ 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." @@ -317,7 +317,7 @@ msgstr "" "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." @@ -326,7 +326,7 @@ msgstr "" "(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,37 +390,37 @@ 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 " @@ -431,7 +431,7 @@ msgid "" "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,41 +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 `_" 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." 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 " @@ -553,26 +565,26 @@ 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`." 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-" @@ -582,19 +594,19 @@ msgid "" "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 " @@ -602,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 " @@ -630,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 " @@ -639,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 " @@ -647,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*." 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')`` " @@ -675,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 == " @@ -683,80 +695,80 @@ 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 " @@ -764,21 +776,21 @@ msgid "" "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, " @@ -787,15 +799,15 @@ msgid "" "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, " @@ -803,13 +815,13 @@ msgid "" "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:" 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, " @@ -817,30 +829,30 @@ msgid "" "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`:" 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`." 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-" @@ -850,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 " @@ -882,17 +894,17 @@ 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 " @@ -901,11 +913,12 @@ msgid "" "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 " @@ -913,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 ef8358ad04..3c933d0085 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: 2025-10-17 09:58+0200\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,10 +68,10 @@ 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 specialize it for different runtime conditions. The adaptive bytecode can " -"be shown by passing ``adaptive=True``." +"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 "" #: library/dis.rst:45 @@ -127,7 +128,8 @@ msgid "Command-line interface" msgstr "" #: library/dis.rst:90 -msgid "The :mod:`dis` module can be invoked as a script from the command line:" +msgid "" +"The :mod:`!dis` module can be invoked as a script from the command line:" msgstr "" #: library/dis.rst:96 @@ -309,8 +311,9 @@ msgid "Analysis functions" msgstr "Analyse de fonctions" #: 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:" @@ -538,7 +541,7 @@ msgstr "" #: 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 :attr:`~codeobject.co_firstlineno` and :attr:`!codeobject.co_lnotab` " "attributes of the :ref:`code object `." msgstr "" @@ -1090,7 +1093,7 @@ msgid "" "``None``." msgstr "" -#: library/dis.rst:1764 +#: library/dis.rst:1768 msgid "" "Previously, this instruction also pushed a boolean value indicating success " "(``True``) or failure (``False``)." @@ -1661,7 +1664,7 @@ msgstr "" #: 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:1652 @@ -1710,21 +1713,30 @@ msgstr "" msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: library/dis.rst:1684 +#: 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:1690 +#: library/dis.rst:1694 msgid "if it is 3, implements::" msgstr "" -#: library/dis.rst:1697 +#: library/dis.rst:1701 msgid "See the :func:`slice` built-in function for more information." msgstr "" -#: library/dis.rst:1702 +#: 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 " @@ -1732,42 +1744,42 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: library/dis.rst:1710 +#: library/dis.rst:1714 msgid "Convert value to a string, depending on ``oparg``::" msgstr "" -#: library/dis.rst:1716 +#: library/dis.rst:1720 msgid "``oparg == 1``: call :func:`str` on *value*" msgstr "" -#: library/dis.rst:1717 +#: library/dis.rst:1721 msgid "``oparg == 2``: call :func:`repr` on *value*" msgstr "" -#: library/dis.rst:1718 +#: library/dis.rst:1722 msgid "``oparg == 3``: call :func:`ascii` on *value*" msgstr "" -#: library/dis.rst:1733 library/dis.rst:1746 +#: library/dis.rst:1737 library/dis.rst:1750 msgid "Used for implementing formatted string literals (f-strings)." msgstr "" -#: library/dis.rst:1727 +#: library/dis.rst:1731 msgid "Formats the value on top of stack::" msgstr "" -#: library/dis.rst:1739 +#: library/dis.rst:1743 msgid "Formats the given value with the given format spec::" msgstr "" -#: library/dis.rst:1753 +#: 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:1757 +#: 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 " @@ -1775,255 +1787,255 @@ msgid "" "Otherwise, push ``None``." msgstr "" -#: library/dis.rst:1771 +#: library/dis.rst:1775 msgid "A no-op. Performs internal tracing, debugging and optimization checks." msgstr "" -#: library/dis.rst:1773 +#: library/dis.rst:1777 msgid "" "The ``context`` operand consists of two parts. The lowest two bits indicate " "where the ``RESUME`` occurs:" msgstr "" -#: library/dis.rst:1776 +#: 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:1778 +#: library/dis.rst:1782 msgid "``1`` After a ``yield`` expression" msgstr "" -#: library/dis.rst:1779 +#: library/dis.rst:1783 msgid "``2`` After a ``yield from`` expression" msgstr "" -#: library/dis.rst:1780 +#: library/dis.rst:1784 msgid "``3`` After an ``await`` expression" msgstr "" -#: library/dis.rst:1782 +#: 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:1787 +#: library/dis.rst:1791 msgid "The oparg value changed to include information about except-depth" msgstr "" -#: library/dis.rst:1793 +#: 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:1802 +#: 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:1805 +#: 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:1814 +#: 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:1818 +#: library/dis.rst:1822 msgid "" "If your application uses pseudo instructions or specialized instructions, " "use the :data:`hasarg` collection instead." msgstr "" -#: library/dis.rst:1821 +#: 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:1825 +#: 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:1830 +#: library/dis.rst:1834 msgid "Use :data:`hasarg` instead." msgstr "" -#: library/dis.rst:1835 +#: 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:1893 +#: library/dis.rst:1897 msgid "The operand determines which intrinsic function is called:" msgstr "" -#: library/dis.rst:1896 +#: library/dis.rst:1900 msgid "Operand" msgstr "" -#: library/dis.rst:1896 +#: library/dis.rst:1900 msgid "Description" msgstr "Description" -#: library/dis.rst:1844 +#: library/dis.rst:1848 msgid "``INTRINSIC_1_INVALID``" msgstr "" -#: library/dis.rst:1898 +#: library/dis.rst:1902 msgid "Not valid" msgstr "" -#: library/dis.rst:1846 +#: library/dis.rst:1850 msgid "``INTRINSIC_PRINT``" msgstr "" -#: library/dis.rst:1846 +#: library/dis.rst:1850 msgid "Prints the argument to standard out. Used in the REPL." msgstr "" -#: library/dis.rst:1849 +#: library/dis.rst:1853 msgid "``INTRINSIC_IMPORT_STAR``" msgstr "" -#: library/dis.rst:1849 +#: library/dis.rst:1853 msgid "Performs ``import *`` for the named module." msgstr "" -#: library/dis.rst:1852 +#: library/dis.rst:1856 msgid "``INTRINSIC_STOPITERATION_ERROR``" msgstr "" -#: library/dis.rst:1852 +#: library/dis.rst:1856 msgid "Extracts the return value from a ``StopIteration`` exception." msgstr "" -#: library/dis.rst:1855 +#: library/dis.rst:1859 msgid "``INTRINSIC_ASYNC_GEN_WRAP``" msgstr "" -#: library/dis.rst:1855 +#: library/dis.rst:1859 msgid "Wraps an async generator value" msgstr "" -#: library/dis.rst:1857 +#: library/dis.rst:1861 msgid "``INTRINSIC_UNARY_POSITIVE``" msgstr "" -#: library/dis.rst:1857 +#: library/dis.rst:1861 msgid "Performs the unary ``+`` operation" msgstr "" -#: library/dis.rst:1860 +#: library/dis.rst:1864 msgid "``INTRINSIC_LIST_TO_TUPLE``" msgstr "" -#: library/dis.rst:1860 +#: library/dis.rst:1864 msgid "Converts a list to a tuple" msgstr "" -#: library/dis.rst:1862 +#: library/dis.rst:1866 msgid "``INTRINSIC_TYPEVAR``" msgstr "" -#: library/dis.rst:1862 +#: library/dis.rst:1866 msgid "Creates a :class:`typing.TypeVar`" msgstr "" -#: library/dis.rst:1864 +#: library/dis.rst:1868 msgid "``INTRINSIC_PARAMSPEC``" msgstr "" -#: library/dis.rst:1864 +#: library/dis.rst:1868 msgid "Creates a :class:`typing.ParamSpec`" msgstr "" -#: library/dis.rst:1867 +#: library/dis.rst:1871 msgid "``INTRINSIC_TYPEVARTUPLE``" msgstr "" -#: library/dis.rst:1867 +#: library/dis.rst:1871 msgid "Creates a :class:`typing.TypeVarTuple`" msgstr "" -#: library/dis.rst:1870 +#: library/dis.rst:1874 msgid "``INTRINSIC_SUBSCRIPT_GENERIC``" msgstr "" -#: library/dis.rst:1870 +#: library/dis.rst:1874 msgid "Returns :class:`typing.Generic` subscripted with the argument" msgstr "" -#: library/dis.rst:1873 +#: library/dis.rst:1877 msgid "``INTRINSIC_TYPEALIAS``" msgstr "" -#: library/dis.rst:1873 +#: 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:1885 +#: 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:1898 +#: library/dis.rst:1902 msgid "``INTRINSIC_2_INVALID``" msgstr "" -#: library/dis.rst:1900 +#: library/dis.rst:1904 msgid "``INTRINSIC_PREP_RERAISE_STAR``" msgstr "" -#: library/dis.rst:1900 +#: library/dis.rst:1904 msgid "Calculates the :exc:`ExceptionGroup` to raise from a ``try-except*``." msgstr "" -#: library/dis.rst:1904 +#: library/dis.rst:1908 msgid "``INTRINSIC_TYPEVAR_WITH_BOUND``" msgstr "" -#: library/dis.rst:1904 +#: library/dis.rst:1908 msgid "Creates a :class:`typing.TypeVar` with a bound." msgstr "" -#: library/dis.rst:1907 +#: library/dis.rst:1911 msgid "``INTRINSIC_TYPEVAR_WITH_CONSTRAINTS``" msgstr "" -#: library/dis.rst:1907 +#: library/dis.rst:1911 msgid "Creates a :class:`typing.TypeVar` with constraints." msgstr "" -#: library/dis.rst:1911 +#: library/dis.rst:1915 msgid "``INTRINSIC_SET_FUNCTION_TYPE_PARAMS``" msgstr "" -#: library/dis.rst:1911 +#: library/dis.rst:1915 msgid "Sets the ``__type_params__`` attribute of a function." msgstr "" -#: library/dis.rst:1920 +#: 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__; " @@ -2031,25 +2043,25 @@ msgid "" "leave ``STACK[-1].__xxx__; NULL`` on the stack." msgstr "" -#: library/dis.rst:1929 +#: library/dis.rst:1933 msgid "**Pseudo-instructions**" msgstr "" -#: library/dis.rst:1931 +#: 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:1936 +#: 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:1943 +#: 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 " @@ -2058,14 +2070,14 @@ msgid "" "exception handler at ``target``." msgstr "" -#: library/dis.rst:1952 +#: 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:1956 +#: 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 " @@ -2073,82 +2085,77 @@ msgid "" "stack." msgstr "" -#: library/dis.rst:1963 +#: 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:1969 -msgid "" -"Works as :opcode:`LOAD_CONST`, but is more efficient for immortal objects." -msgstr "" - -#: library/dis.rst:1975 +#: 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:1981 +#: 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:1986 +#: library/dis.rst:1985 msgid "" "Pushes a reference to the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -#: library/dis.rst:1989 +#: library/dis.rst:1988 msgid "" "Note that ``LOAD_CLOSURE`` is replaced with ``LOAD_FAST`` in the assembler." msgstr "" -#: library/dis.rst:1991 +#: library/dis.rst:1990 msgid "This opcode is now a pseudo-instruction." msgstr "" -#: library/dis.rst:1998 +#: library/dis.rst:1997 msgid "Opcode collections" msgstr "" -#: library/dis.rst:2000 +#: library/dis.rst:1999 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: library/dis.rst:2003 +#: 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:2010 +#: library/dis.rst:2009 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: library/dis.rst:2015 +#: library/dis.rst:2014 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: library/dis.rst:2020 +#: library/dis.rst:2019 msgid "Sequence of all compare operation names." msgstr "" -#: library/dis.rst:2025 +#: library/dis.rst:2024 msgid "Sequence of bytecodes that use their argument." msgstr "" -#: library/dis.rst:2032 +#: library/dis.rst:2031 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: library/dis.rst:2037 +#: 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 " @@ -2157,39 +2164,39 @@ msgid "" "scopes." msgstr "" -#: library/dis.rst:2045 +#: library/dis.rst:2044 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: library/dis.rst:2050 +#: library/dis.rst:2049 msgid "Sequence of bytecodes that have a jump target. All jumps are relative." msgstr "" -#: library/dis.rst:2057 +#: library/dis.rst:2056 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: library/dis.rst:2062 +#: library/dis.rst:2061 msgid "Sequence of bytecodes of Boolean operations." msgstr "" -#: library/dis.rst:2066 +#: library/dis.rst:2065 msgid "Sequence of bytecodes that set an exception handler." msgstr "" -#: library/dis.rst:2073 +#: library/dis.rst:2072 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: library/dis.rst:2075 +#: library/dis.rst:2074 msgid "All jumps are now relative. Use :data:`hasjump`." msgstr "" -#: library/dis.rst:2081 +#: library/dis.rst:2080 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: library/dis.rst:2083 +#: library/dis.rst:2082 msgid "All jumps are now relative. This list is empty." msgstr "" diff --git a/library/distutils.po b/library/distutils.po index 7830cc32cb..39ac89f6bf 100644 --- a/library/distutils.po +++ b/library/distutils.po @@ -6,11 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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: fr\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/library/doctest.po b/library/doctest.po index 3535da3e0d..93550ab585 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: 2025-10-17 09:58+0200\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,18 +89,18 @@ 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 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`." +"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`." msgstr "" "C'est tout ce dont vous avez besoin pour pouvoir commencer une utilisation " "productive de :mod:`doctest` ! Allez-y. Les sections suivantes donnent tous " @@ -106,17 +109,17 @@ 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:139 +#: library/doctest.rst:134 msgid "" "Output is colorized by default and can be :ref:`controlled using environment " "variables `." msgstr "" -#: library/doctest.rst:147 +#: library/doctest.rst:142 msgid "Simple Usage: Checking Examples in Docstrings" msgstr "Utilisation simple : vérifier des exemples dans des *docstrings*" -#: library/doctest.rst:149 +#: 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::" @@ -125,12 +128,12 @@ msgstr "" "la façon avec laquelle vous continuerez) est de terminer chaque " "module :mod:`!M` avec ::" -#: library/doctest.rst:156 +#: 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:158 +#: library/doctest.rst:153 msgid "" "Running the module as a script causes the examples in the docstrings to get " "executed and verified::" @@ -138,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:163 +#: 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, " @@ -150,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:168 +#: 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:172 +#: 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." @@ -162,7 +165,7 @@ 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:175 +#: library/doctest.rst:170 #, fuzzy msgid "" "You can force verbose mode by passing ``verbose=True`` to :func:`testmod`, " @@ -175,7 +178,7 @@ msgstr "" "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:180 +#: library/doctest.rst:175 #, fuzzy msgid "" "There is also a command line shortcut for running :func:`testmod`, see " @@ -184,7 +187,7 @@ msgstr "" "Pour plus d'informations sur :func:`testmod`, consultez la " "section :ref:`doctest-basic-api`." -#: library/doctest.rst:183 +#: library/doctest.rst:178 msgid "" "For more information on :func:`testmod`, see section :ref:`doctest-basic-" "api`." @@ -192,11 +195,11 @@ msgstr "" "Pour plus d'informations sur :func:`testmod`, consultez la " "section :ref:`doctest-basic-api`." -#: library/doctest.rst:189 +#: 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:191 +#: 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::" @@ -205,7 +208,7 @@ msgstr "" "interactifs dans un fichier texte. Ceci est fait avec la " "fonction :func:`testfile` ::" -#: library/doctest.rst:197 +#: 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 " @@ -218,7 +221,7 @@ msgstr "" "contenir un programme Python ! Par exemple, prenons un " "fichier :file:`example.txt` contenant :" -#: library/doctest.rst:220 +#: library/doctest.rst:215 msgid "" "Running ``doctest.testfile(\"example.txt\")`` then finds the error in this " "documentation::" @@ -226,7 +229,7 @@ msgstr "" "Exécuter ``doctest.testfile(\"example.txt\")`` recherche les erreurs dans " "cette documentation ::" -#: library/doctest.rst:231 +#: library/doctest.rst:226 #, fuzzy msgid "" "As with :func:`testmod`, :func:`testfile` won't display anything unless an " @@ -239,7 +242,7 @@ msgstr "" "et leurs causes sont affichés sur *stdout*, dans le même format " "que :func:`testmod`." -#: library/doctest.rst:236 +#: 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 " @@ -251,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:240 +#: 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*." @@ -260,7 +263,7 @@ msgstr "" "ajustée avec l'option de ligne de commande ``-v`` ou avec le mot clé " "*verbose*." -#: library/doctest.rst:244 +#: library/doctest.rst:239 #, fuzzy msgid "" "There is also a command line shortcut for running :func:`testfile`, see " @@ -269,7 +272,7 @@ msgstr "" "Pour plus d'information sur :func:`testfile`, consultez la " "section :ref:`doctest-basic-api`." -#: library/doctest.rst:247 +#: library/doctest.rst:242 msgid "" "For more information on :func:`testfile`, see section :ref:`doctest-basic-" "api`." @@ -277,16 +280,16 @@ msgstr "" "Pour plus d'information sur :func:`testfile`, consultez la " "section :ref:`doctest-basic-api`." -#: library/doctest.rst:253 +#: library/doctest.rst:248 msgid "Command-line Usage" msgstr "" -#: library/doctest.rst:255 +#: library/doctest.rst:250 msgid "" -"The :mod:`doctest` module can be invoked as a script from the command line:" +"The :mod:`!doctest` module can be invoked as a script from the command line:" msgstr "" -#: library/doctest.rst:265 +#: library/doctest.rst:260 #, fuzzy msgid "" "Detailed report of all examples tried is printed to standard output, along " @@ -295,7 +298,7 @@ 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:270 +#: library/doctest.rst:265 #, fuzzy msgid "" "This will import :file:`example.py` as a standalone module and " @@ -307,7 +310,7 @@ msgstr "" "fonctionner si le fichier fait partie d'un paquet et importe d'autres sous-" "modules de ce paquet." -#: library/doctest.rst:274 +#: library/doctest.rst:269 #, fuzzy msgid "" "If the file name does not end with :file:`.py`, :mod:`!doctest` infers that " @@ -317,24 +320,24 @@ msgstr "" "en déduit qu'il s'exécute à l'aide de :func:`testfile`, et non " "pas :func:`testmod`." -#: library/doctest.rst:281 +#: library/doctest.rst:276 msgid "" "Option flags control various aspects of doctest's behavior, see " "section :ref:`doctest-options`." msgstr "" -#: library/doctest.rst:288 +#: 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:296 +#: library/doctest.rst:291 msgid "How It Works" msgstr "Comment ça marche" -#: library/doctest.rst:298 +#: 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 " @@ -352,11 +355,11 @@ msgstr "" "pour de l'information sur l'exécution de *doctest* sur ces exemples, " "consultez les sections suivantes." -#: library/doctest.rst:309 +#: library/doctest.rst:304 msgid "Which Docstrings Are Examined?" msgstr "Quelles *docstrings* sont considérées ?" -#: library/doctest.rst:311 +#: 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." @@ -365,7 +368,7 @@ msgstr "" "sont cherchées. Les objets qui sont importés dans le module ne sont pas " "cherchés." -#: library/doctest.rst:321 +#: library/doctest.rst:316 #, fuzzy msgid "" "In addition, there are cases when you want tests to be part of a module but " @@ -385,11 +388,11 @@ 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:330 +#: library/doctest.rst:325 msgid "For example, place this block of code at the top of :file:`example.py`:" msgstr "" -#: library/doctest.rst:344 +#: 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 " @@ -398,7 +401,7 @@ msgid "" "scanned for tests." msgstr "" -#: library/doctest.rst:350 +#: library/doctest.rst:345 msgid "" "Any classes found are recursively searched similarly, to test docstrings in " "their contained methods and nested classes." @@ -406,23 +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:355 +#: 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:358 +#: 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:364 +#: library/doctest.rst:359 msgid "How are Docstring Examples Recognized?" msgstr "Comment les exemples *docstring* sont-ils identifiés ?" -#: library/doctest.rst:366 +#: 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 " @@ -432,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:391 +#: 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 " @@ -442,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:395 +#: library/doctest.rst:390 msgid "The fine print:" msgstr "En détail :" -#: library/doctest.rst:397 +#: 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 " @@ -458,7 +461,7 @@ 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:402 +#: 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 " @@ -488,7 +491,7 @@ msgstr "" "la gestion des tabulations en rédigeant une classe sur " "mesure :class:`DocTestParser`." -#: library/doctest.rst:414 +#: library/doctest.rst:409 msgid "" "Output to stdout is captured, but not output to stderr (exception tracebacks " "are captured via a different means)." @@ -496,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:417 +#: 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 " @@ -507,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:427 +#: 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. " @@ -520,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:437 +#: 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:444 +#: 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." @@ -532,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:451 +#: library/doctest.rst:446 msgid "What's the Execution Context?" msgstr "Quel est le contexte d'exécution ?" -#: library/doctest.rst:453 +#: 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 " @@ -556,7 +560,7 @@ 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:461 +#: 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." @@ -565,11 +569,11 @@ msgstr "" "d'exécution en passant ``globs=your_dict`` à :func:`testmod` ou encore, " "à :func:`testfile`." -#: library/doctest.rst:468 +#: library/doctest.rst:463 msgid "What About Exceptions?" msgstr "Qu'en est-il des exceptions ?" -#: library/doctest.rst:470 +#: 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 " @@ -583,11 +587,11 @@ 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:476 +#: library/doctest.rst:471 msgid "Simple example::" msgstr "Exemple simple ::" -#: library/doctest.rst:483 +#: 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." @@ -595,7 +599,7 @@ 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é." -#: library/doctest.rst:486 +#: 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 " @@ -605,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:493 +#: 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, " @@ -616,7 +620,7 @@ msgstr "" "habituellement omise, ou est copiée verbatim à partir d'une séance " "interactive." -#: library/doctest.rst:497 +#: 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 " @@ -629,7 +633,7 @@ msgstr "" "l'exception a un détail sur plusieurs lignes, il est possible de prolonger " "sur plusieurs lignes ::" -#: library/doctest.rst:509 +#: 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." @@ -638,7 +642,7 @@ msgstr "" "comparées avec le type et le détail de l'exception ; tout le reste est " "ignoré." -#: library/doctest.rst:512 +#: 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 " @@ -648,7 +652,7 @@ 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:522 +#: library/doctest.rst:517 msgid "" "Note that tracebacks are treated very specially. In particular, in the " "rewritten example, the use of ``...`` is independent of " @@ -663,13 +667,13 @@ msgstr "" "(ou trois cents) virgules ou chiffres, ou une retranscription indentée d'une " "parodie de Monty Python." -#: library/doctest.rst:528 +#: 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:530 +#: 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 " @@ -686,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:537 +#: 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. " @@ -702,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:543 +#: 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 " @@ -712,7 +716,7 @@ 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:547 +#: library/doctest.rst:542 #, fuzzy msgid "" "The interactive shell omits the traceback header line for " @@ -729,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:555 +#: library/doctest.rst:550 msgid "" "For some exceptions, Python displays the position of the error using ``^`` " "markers and tildes::" @@ -737,7 +741,7 @@ msgstr "" "Pour certaines erreurs, Python affiche la position de l'erreur en utilisant " "le marqueur ``^`` et des tildes ::" -#: library/doctest.rst:564 +#: 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 " @@ -749,11 +753,11 @@ msgstr "" "exemple, le test suivant réussira, même si le marqueur ``^`` n'est pas à la " "bonne place ::" -#: library/doctest.rst:579 +#: library/doctest.rst:574 msgid "Option Flags" msgstr "Options de ligne de commande" -#: library/doctest.rst:581 +#: 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 " @@ -770,7 +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:587 +#: 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:" @@ -779,7 +783,7 @@ msgstr "" "contrôler comment *doctest* décide si la sortie obtenue correspond à la " "sortie attendue de l'exemple :" -#: library/doctest.rst:593 +#: 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 " @@ -801,7 +805,7 @@ msgstr "" "« petit entier » (*little integer*) fonctionnent encore dans ces cas. Cette " "option disparaîtra probablement, mais pas avant plusieurs années." -#: library/doctest.rst:605 +#: 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 " @@ -818,7 +822,7 @@ msgstr "" "l'option :const:`DONT_ACCEPT_BLANKLINE` est précisée, cette substitution " "n'est pas permise." -#: library/doctest.rst:614 +#: 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 " @@ -836,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:625 +#: 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 " @@ -853,14 +857,14 @@ msgstr "" "correspondances !\" que l'utilisation de ``.*`` dans les expressions " "régulières." -#: library/doctest.rst:634 +#: 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:638 +#: 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, " @@ -870,14 +874,14 @@ msgid "" "all three of these variations will work with the flag specified:" msgstr "" -#: library/doctest.rst:660 +#: 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:664 +#: library/doctest.rst:659 msgid "" ":const:`IGNORE_EXCEPTION_DETAIL` now also ignores any information relating " "to the module containing the exception under test." @@ -886,7 +890,7 @@ msgstr "" "information liée au module contenant l'exception qui est en train d'être " "testée." -#: library/doctest.rst:671 +#: 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, " @@ -902,26 +906,26 @@ msgstr "" "l'exemple peut dépendre de ressources inatteignables pour l'exécuteur de " "test." -#: library/doctest.rst:677 +#: 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:682 +#: 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:684 +#: 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:689 +#: library/doctest.rst:684 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "are displayed using a unified diff." @@ -929,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:695 +#: library/doctest.rst:690 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "will be displayed using a context diff." @@ -937,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:701 +#: 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 " @@ -955,7 +959,7 @@ msgstr "" "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:710 +#: 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 " @@ -974,7 +978,7 @@ msgstr "" "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:721 +#: 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 " @@ -987,22 +991,23 @@ msgstr "" "durant le débogage, étant donné que les exemples suivant le premier échec ne " "produiront aucune sortie de débogage." -#: library/doctest.rst:729 +#: 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:732 +#: 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:738 +#: 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 " @@ -1018,11 +1023,11 @@ msgstr "" "fonction :func:`register_optionflag` devrait toujours être appelée par " "l'expression suivante ::" -#: library/doctest.rst:754 +#: library/doctest.rst:749 msgid "Directives" msgstr "Instructions" -#: library/doctest.rst:756 +#: 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 " @@ -1033,7 +1038,7 @@ msgstr "" "instructions *doctest* sont des commentaires Python spéciaux suivant le code " "source d'un exemple :" -#: library/doctest.rst:767 +#: 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 " @@ -1043,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:771 +#: 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." @@ -1052,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:774 +#: library/doctest.rst:769 #, fuzzy msgid "For example, this test passes:" msgstr "Par exemple, ce test réussit :" -#: library/doctest.rst:783 +#: library/doctest.rst:778 #, fuzzy msgid "" "Without the directive it would fail, both because the actual output doesn't " @@ -1071,7 +1076,7 @@ msgstr "" "ligne. Ce test réussit aussi, et nécessite lui aussi une instruction pour ce " "faire :" -#: library/doctest.rst:794 +#: library/doctest.rst:789 #, fuzzy msgid "" "Multiple directives can be used on a single physical line, separated by " @@ -1080,7 +1085,7 @@ msgstr "" "Plusieurs instructions sont utilisées sur une unique ligne physique, " "séparées par des virgules :" -#: library/doctest.rst:803 +#: library/doctest.rst:798 #, fuzzy msgid "" "If multiple directive comments are used for a single example, then they are " @@ -1089,7 +1094,7 @@ msgstr "" "Si plusieurs commentaires d'instructions sont utilisés pour un exemple " "unique, alors ils sont combinés :" -#: library/doctest.rst:813 +#: library/doctest.rst:808 #, fuzzy msgid "" "As the previous example shows, you can add ``...`` lines to your example " @@ -1101,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:824 +#: 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 " @@ -1119,18 +1124,19 @@ msgstr "" "désactiver une option par l'utilisation de ``-`` dans une instruction peut " "être utile." -#: library/doctest.rst:834 +#: library/doctest.rst:829 msgid "Warnings" msgstr "Avertissements" -#: library/doctest.rst:836 +#: 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 " @@ -1140,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:845 +#: library/doctest.rst:840 msgid "is vulnerable! One workaround is to do ::" msgstr "est vulnérable ! Une alternative est de faire ::" -#: library/doctest.rst:850 +#: library/doctest.rst:845 msgid "instead. Another is to do ::" msgstr "à la place. Une autre façon de faire est ::" -#: library/doctest.rst:856 +#: 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:858 +#: 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:868 +#: library/doctest.rst:863 #, fuzzy msgid "" "The :const:`ELLIPSIS` directive gives a nice approach for the last example:" @@ -1167,7 +1173,7 @@ msgstr "" "L'instruction :const:`ELLIPSIS` donne une approche sympathique pour le " "dernier exemple :" -#: library/doctest.rst:876 +#: library/doctest.rst:871 #, fuzzy msgid "" "Floating-point numbers are also subject to small output variations across " @@ -1180,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:887 +#: library/doctest.rst:882 #, fuzzy msgid "" "Numbers of the form ``I/2.**J`` are safe across all platforms, and I often " @@ -1190,7 +1196,7 @@ msgstr "" "plateformes, et je restreins souvent les exemples *doctest* à produire des " "nombres ayant cette forme ::" -#: library/doctest.rst:893 +#: library/doctest.rst:888 msgid "" "Simple fractions are also easier for people to understand, and that makes " "for better documentation." @@ -1198,11 +1204,11 @@ msgstr "" "Les fractions simples sont aussi plus faciles à comprendre, et cela fait une " "meilleure documentation." -#: library/doctest.rst:900 +#: library/doctest.rst:895 msgid "Basic API" msgstr "API de base" -#: library/doctest.rst:902 +#: 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 " @@ -1215,7 +1221,7 @@ msgstr "" "voir les sections :ref:`doctest-simple-testmod` et :ref:`doctest-simple-" "testfile`." -#: library/doctest.rst:910 +#: library/doctest.rst:905 msgid "" "All arguments except *filename* are optional, and should be specified in " "keyword form." @@ -1223,7 +1229,7 @@ msgstr "" "Tous les arguments sauf *filename* sont optionnels, et doivent être précisés " "sous forme lettrée." -#: library/doctest.rst:913 +#: library/doctest.rst:908 msgid "" "Test examples in the file named *filename*. Return ``(failure_count, " "test_count)``." @@ -1231,7 +1237,7 @@ msgstr "" "Teste les exemples dans le fichier nommé *filename*. Renvoie " "``(failure_count, test_count)``." -#: library/doctest.rst:916 +#: library/doctest.rst:911 msgid "" "Optional argument *module_relative* specifies how the filename should be " "interpreted:" @@ -1239,7 +1245,7 @@ msgstr "" "L'argument optionnel *module_relative* précise comment le nom de fichier " "doit être interprété :" -#: library/doctest.rst:919 +#: 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 " @@ -1257,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:926 +#: 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 " @@ -1267,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:930 +#: 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." @@ -1275,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:933 +#: 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-" @@ -1290,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:939 +#: 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 " @@ -1302,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:944 +#: 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 " @@ -1326,7 +1332,7 @@ msgstr "" "*dict* *extraglobs* reliant le nom générique à la sous-classe qui doit être " "testée." -#: library/doctest.rst:953 +#: library/doctest.rst:948 #, fuzzy msgid "" "Optional argument *verbose* prints lots of stuff if true, and prints only " @@ -1338,7 +1344,7 @@ msgstr "" "défaut, ou si ``None``, celle-ci est vraie si et seulement si ``-v`` est " "présent dans ``sys.argv``." -#: library/doctest.rst:957 +#: 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 " @@ -1348,7 +1354,7 @@ 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:961 +#: library/doctest.rst:956 #, fuzzy msgid "" "Optional argument *optionflags* (default value ``0``) takes " @@ -1359,7 +1365,7 @@ msgstr "" "valeur :ref:`bitwise OR ` des options de ligne de commande. Voir la " "section :ref:`doctest-options`." -#: library/doctest.rst:965 +#: 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. " @@ -1372,7 +1378,7 @@ msgstr "" "lors d'un post-mortem. Le comportement par défaut est de poursuivre " "l'exécution des exemples." -#: library/doctest.rst:1113 +#: 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 " @@ -1383,7 +1389,7 @@ msgstr "" "des fichiers. Par défaut, on utilise un analyseur normal (c'est-à-dire, " "``DocTestParser()``)." -#: library/doctest.rst:1117 +#: library/doctest.rst:1115 msgid "" "Optional argument *encoding* specifies an encoding that should be used to " "convert the file to unicode." @@ -1391,7 +1397,7 @@ msgstr "" "L'option *encoding* définit un encodage à utiliser pour convertir le fichier " "en format *unicode*." -#: library/doctest.rst:980 +#: library/doctest.rst:975 msgid "" "All arguments are optional, and all except for *m* should be specified in " "keyword form." @@ -1399,7 +1405,7 @@ msgstr "" "Toutes les options sont facultatives, et toutes sauf *m* doivent être " "définies en format lettré." -#: library/doctest.rst:983 +#: 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``), " @@ -1409,7 +1415,7 @@ 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:987 +#: library/doctest.rst:982 #, fuzzy msgid "" "Also test examples reachable from dict ``m.__test__``, if it exists. " @@ -1424,18 +1430,18 @@ msgstr "" "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:992 +#: 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:994 +#: library/doctest.rst:989 msgid "Return ``(failure_count, test_count)``." msgstr "Renvoie ``(failure_count, test_count)``." -#: library/doctest.rst:996 +#: library/doctest.rst:991 msgid "" "Optional argument *name* gives the name of the module; by default, or if " "``None``, ``m.__name__`` is used." @@ -1443,7 +1449,7 @@ msgstr "" "L'option *name* donne le nom du module ; par défaut, ou si ``None``, " "``m.__name__`` est utilisé." -#: library/doctest.rst:999 +#: library/doctest.rst:994 #, fuzzy msgid "" "Optional argument *exclude_empty* defaults to false. If true, objects for " @@ -1464,7 +1470,7 @@ msgstr "" "classe plus récente :class:`DocTestFinder` prend vrai comme valeur par " "défaut." -#: library/doctest.rst:1007 +#: library/doctest.rst:1002 msgid "" "Optional arguments *extraglobs*, *verbose*, *report*, *optionflags*, " "*raise_on_error*, and *globs* are the same as for function :func:`testfile` " @@ -1475,7 +1481,7 @@ msgstr "" "fonction :func:`testfile` ci-dessus, sauf pour *globs*, qui est " "``m.__dict__`` par défaut." -#: library/doctest.rst:1014 +#: 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." @@ -1483,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:1017 +#: library/doctest.rst:1012 msgid "" "A shallow copy of dictionary argument *globs* is used for the execution " "context." @@ -1491,7 +1497,7 @@ msgstr "" "Une copie superficielle de l'argument-dictionnaire *globs* est utilisée pour " "le contexte d'exécution." -#: library/doctest.rst:1019 +#: library/doctest.rst:1014 msgid "" "Optional argument *name* is used in failure messages, and defaults to " "``\"NoName\"``." @@ -1499,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:1022 +#: 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 " @@ -1509,7 +1515,7 @@ msgstr "" "aucun échec. Par défaut, la sortie est générée seulement si un exemple " "échoue." -#: library/doctest.rst:1025 +#: 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 " @@ -1521,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:1029 +#: 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." -#: library/doctest.rst:1035 +#: library/doctest.rst:1030 msgid "Unittest API" msgstr "API de tests unitaires" -#: library/doctest.rst:1037 +#: 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 " @@ -1551,7 +1557,7 @@ msgstr "" "par :mod:`unittest`, il suffit d'ajouter une fonction :func:`load_tests` " "dans votre module de test ::" -#: library/doctest.rst:1051 +#: library/doctest.rst:1046 msgid "" "There are two main functions for creating :class:`unittest.TestSuite` " "instances from text files and modules with doctests:" @@ -1560,7 +1566,7 @@ msgstr "" "classe :class:`unittest.TestSuite` à partir de fichiers textes et de modules " "ayant des *doctests* :" -#: library/doctest.rst:1057 +#: library/doctest.rst:1052 msgid "" "Convert doctest tests from one or more text files to " "a :class:`unittest.TestSuite`." @@ -1568,16 +1574,17 @@ msgstr "" "Convertit des tests *doctest* à partir d'un ou plusieurs fichiers vers une " "classe :class:`unittest.TestSuite`." -#: library/doctest.rst:1060 +#: 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:`~unittest.TestCase.failureException` exception is raised showing the " +"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." +"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 " @@ -1586,17 +1593,17 @@ msgstr "" "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:1067 +#: 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:1069 +#: 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:1071 +#: library/doctest.rst:1069 msgid "" "Optional argument *module_relative* specifies how the filenames in *paths* " "should be interpreted:" @@ -1604,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:1074 +#: 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 " @@ -1623,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:1082 +#: 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 " @@ -1633,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:1086 +#: 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-" @@ -1650,7 +1657,7 @@ msgstr "" "erreur que de spécifier *package* si *module_relative* a ``False`` comme " "valeur." -#: library/doctest.rst:1093 +#: library/doctest.rst:1091 #, fuzzy msgid "" "Optional argument *setUp* specifies a set-up function for the test suite. " @@ -1664,7 +1671,7 @@ msgstr "" "peut accéder aux valeurs globales du test par le biais de l'attribut *globs* " "du test passé." -#: library/doctest.rst:1098 +#: library/doctest.rst:1096 #, fuzzy msgid "" "Optional argument *tearDown* specifies a tear-down function for the test " @@ -1679,7 +1686,7 @@ msgstr "" "fonction *setUp* peut accéder aux valeurs globales du test par l'attribut " "*globs* du test passé." -#: library/doctest.rst:1104 +#: 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 " @@ -1689,7 +1696,7 @@ 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:1108 +#: 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 " @@ -1703,7 +1710,7 @@ msgstr "" "fonction :func:`set_unittest_reportflags` ci-dessous pour une meilleure " "façon de préciser des options de rapport." -#: library/doctest.rst:1120 +#: library/doctest.rst:1118 msgid "" "The global ``__file__`` is added to the globals provided to doctests loaded " "from a text file using :func:`DocFileSuite`." @@ -1712,22 +1719,27 @@ msgstr "" "les *doctests*, ceux-ci étant téléchargés d'un fichier texte utilisant la " "fonction :func:`DocFileSuite`." -#: library/doctest.rst:1126 +#: 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`." -#: library/doctest.rst:1128 +#: 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. Each docstring is run as a " -"separate unit test. If any of the doctests fail, then the synthesized unit " -"test fails, and a :exc:`unittest.TestCase.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" +"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. " @@ -1736,7 +1748,7 @@ msgstr "" "affichant le nom du fichier contenant le test et un numéro de ligne pouvant " "être approximatif." -#: library/doctest.rst:1136 +#: 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 " @@ -1746,7 +1758,7 @@ 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:1140 +#: library/doctest.rst:1143 #, fuzzy msgid "" "Optional argument *globs* is a dictionary containing the initial global " @@ -1757,7 +1769,7 @@ 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:1144 +#: 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." @@ -1766,7 +1778,7 @@ msgstr "" "globales, à fusionner avec *globs*. Par défaut, aucune variable globale " "supplémentaire est utilisée." -#: library/doctest.rst:1147 +#: 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." @@ -1775,7 +1787,7 @@ msgstr "" "remplacement *drop-in*) qui est utilisée pour extraire les *doctests* à " "partir du module." -#: library/doctest.rst:1150 +#: library/doctest.rst:1153 #, fuzzy msgid "" "Optional arguments *setUp*, *tearDown*, and *optionflags* are the same as " @@ -1785,12 +1797,12 @@ msgstr "" "Les options *setUp*, *tearDown* et *optionflags* sont les mêmes que pour la " "fonction :func:`DocFileSuite` ci-dessus." -#: library/doctest.rst:1153 +#: 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:1155 +#: library/doctest.rst:1158 msgid "" ":func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if " "*module* contains no docstrings instead of raising :exc:`ValueError`." @@ -1799,7 +1811,7 @@ msgstr "" "classe :class:`unittest.TestSuite` si *module* ne contient aucune " "*docstring*, et ce, au lieu de lever l'exception :exc:`ValueError`." -#: library/doctest.rst:1159 +#: library/doctest.rst:1165 #, fuzzy msgid "" "Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` " @@ -1816,7 +1828,7 @@ msgstr "" "répondre à des questions concernant les détails exacts de l'intégration du " "module :mod:`doctest`." -#: library/doctest.rst:1165 +#: library/doctest.rst:1171 #, fuzzy msgid "" "Similarly, :func:`DocFileSuite` creates a :class:`unittest.TestSuite` out " @@ -1828,12 +1840,12 @@ msgstr "" "instances :class:`doctest.DocFileCase`, où :class:`DocFileCase` est une sous-" "classe de :class:`DocTestCase`." -#: library/doctest.rst:1169 +#: 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` " +"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 " @@ -1855,22 +1867,23 @@ msgstr "" "l'attention des exécuteurs de test de :mod:`doctest` à partir " "de :mod:`unittest`." -#: library/doctest.rst:1179 +#: 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:1185 -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:1187 +#: 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." @@ -1879,7 +1892,7 @@ msgstr "" "arguments. Voir la section :ref:`doctest-options`. Ce sont uniquement les " "\"options de rapport\" qui peuvent être utilisées." -#: library/doctest.rst:1190 +#: library/doctest.rst:1196 #, fuzzy msgid "" "This is a module-global setting, and affects all future doctests run by " @@ -1907,7 +1920,7 @@ msgstr "" "de :class:`DocTestCase` a été construite, les options de rapport du " "module :mod:`unittest` de :mod:`doctest` sont ignorées." -#: library/doctest.rst:1201 +#: 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." @@ -1915,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:1208 +#: library/doctest.rst:1214 msgid "Advanced API" msgstr "API avancé" -#: library/doctest.rst:1210 +#: 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 " @@ -1927,13 +1940,13 @@ msgid "" "doctest's capabilities, then you should use the advanced API." msgstr "" -#: library/doctest.rst:1215 +#: 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:1218 +#: library/doctest.rst:1224 msgid "" ":class:`Example`: A single Python :term:`statement`, paired with its " "expected output." @@ -1941,7 +1954,7 @@ msgstr "" ":class:`Example` : Un unique :term:`statement` Python, pris conjointement " "avec sa sortie attendue." -#: library/doctest.rst:1221 +#: library/doctest.rst:1227 msgid "" ":class:`DocTest`: A collection of :class:`Example`\\ s, typically extracted " "from a single docstring or text file." @@ -1949,55 +1962,55 @@ msgstr "" ":class:`DocTest` : Une collection de :class:`Example`, habituellement " "extraits d'une seule *docstring* ou fichier texte." -#: library/doctest.rst:1224 +#: library/doctest.rst:1230 msgid "" "Additional processing classes are defined to find, parse, and run, and check " "doctest examples:" msgstr "" -#: library/doctest.rst:1227 +#: 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." msgstr "" -#: library/doctest.rst:1231 +#: 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:1234 +#: 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:1237 +#: 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:1240 +#: library/doctest.rst:1246 msgid "" "The relationships among these processing classes are summarized in the " "following diagram::" msgstr "" -#: library/doctest.rst:1256 +#: library/doctest.rst:1262 msgid "DocTest Objects" msgstr "Objets *doctest*" -#: library/doctest.rst:1261 +#: 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:1265 +#: library/doctest.rst:1271 msgid "" ":class:`DocTest` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." @@ -2005,13 +2018,13 @@ 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:1271 +#: 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:1277 +#: 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 " @@ -2019,57 +2032,57 @@ msgid "" "in :attr:`globs` after the test is run." msgstr "" -#: library/doctest.rst:1285 +#: 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:1291 +#: 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 " "extracted from a file." msgstr "" -#: library/doctest.rst:1298 +#: 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:1305 +#: 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:1312 +#: library/doctest.rst:1318 msgid "Example Objects" msgstr "Exemples d'objets" -#: library/doctest.rst:1317 +#: 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:1322 +#: 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:1328 +#: 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:1335 +#: 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 " @@ -2077,7 +2090,7 @@ msgid "" "The constructor adds a newline when necessary." msgstr "" -#: library/doctest.rst:1343 +#: 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 " @@ -2086,20 +2099,20 @@ msgid "" "newline unless it's ``None``. The constructor adds a newline if needed." msgstr "" -#: library/doctest.rst:1352 +#: 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:1359 +#: 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:1365 +#: 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 " @@ -2108,11 +2121,11 @@ msgid "" "default, no options are set." msgstr "" -#: library/doctest.rst:1375 +#: library/doctest.rst:1381 msgid "DocTestFinder objects" msgstr "Objets *DocTestFinder*" -#: library/doctest.rst:1380 +#: 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 " @@ -2120,49 +2133,49 @@ msgid "" "classes, functions, methods, staticmethods, classmethods, and properties." msgstr "" -#: library/doctest.rst:1385 +#: 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:1388 +#: 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:1391 +#: 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:1394 +#: 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." msgstr "" -#: library/doctest.rst:1398 +#: 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:1403 +#: 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:1406 +#: 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:1410 +#: 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 " @@ -2170,26 +2183,26 @@ msgid "" "module is used:" msgstr "" -#: library/doctest.rst:1414 +#: library/doctest.rst:1420 msgid "As a default namespace, if *globs* is not specified." msgstr "" -#: library/doctest.rst:1416 +#: 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:1420 +#: 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:1422 +#: library/doctest.rst:1428 msgid "To help find the line number of the object within its file." msgstr "" -#: library/doctest.rst:1424 +#: 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 " @@ -2198,7 +2211,7 @@ msgid "" "contained objects will (recursively) be searched for doctests." msgstr "" -#: library/doctest.rst:1430 +#: 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 " @@ -2208,21 +2221,21 @@ msgid "" "*extraglobs* is not specified, then it defaults to ``{}``." msgstr "" -#: library/doctest.rst:1441 +#: library/doctest.rst:1447 msgid "DocTestParser objects" msgstr "Objets *DocTestParser*" -#: library/doctest.rst:1446 +#: 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:1450 +#: 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:1455 +#: library/doctest.rst:1461 msgid "" "Extract all doctest examples from the given string, and collect them into " "a :class:`DocTest` object." @@ -2230,7 +2243,7 @@ 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:1458 +#: library/doctest.rst:1464 #, fuzzy msgid "" "*globs*, *name*, *filename*, and *lineno* are attributes for the " @@ -2241,7 +2254,7 @@ msgstr "" "nouvel objet :class:`DocTest`. Voir la documentation pour :class:`DocTest` " "pour plus d'information." -#: library/doctest.rst:1465 +#: 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 " @@ -2249,7 +2262,7 @@ msgid "" "error messages." msgstr "" -#: library/doctest.rst:1472 +#: 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 " @@ -2257,33 +2270,33 @@ msgid "" "name identifying this string, and is only used for error messages." msgstr "" -#: library/doctest.rst:1479 +#: library/doctest.rst:1485 msgid "TestResults objects" msgstr "Objets *TestResults*" -#: library/doctest.rst:1486 +#: library/doctest.rst:1492 msgid "Number of failed tests." msgstr "Nombre de tests échoués." -#: library/doctest.rst:1490 +#: library/doctest.rst:1496 msgid "Number of attempted tests." msgstr "Nombre de tests tentés." -#: library/doctest.rst:1494 +#: library/doctest.rst:1500 msgid "Number of skipped tests." msgstr "Nombre de tests sautés." -#: library/doctest.rst:1502 +#: library/doctest.rst:1508 msgid "DocTestRunner objects" msgstr "Objets *DocTestRunner*" -#: library/doctest.rst:1507 +#: library/doctest.rst:1513 msgid "" "A processing class used to execute and verify the interactive examples in " "a :class:`DocTest`." msgstr "" -#: library/doctest.rst:1510 +#: 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 " @@ -2293,7 +2306,7 @@ msgid "" "constructor." msgstr "" -#: library/doctest.rst:1516 +#: 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 " @@ -2301,18 +2314,18 @@ msgid "" "``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`, " +"methods :meth:`report_skip`, :meth:`report_start`, :meth:`report_success`, :meth:`report_unexpected_exception`, " "and :meth:`report_failure`." msgstr "" -#: library/doctest.rst:1524 +#: 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:1528 +#: library/doctest.rst:1534 msgid "" "The optional keyword argument *verbose* controls " "the :class:`DocTestRunner`'s verbosity. If *verbose* is ``True``, then " @@ -2322,14 +2335,14 @@ msgid "" "used." msgstr "" -#: library/doctest.rst:1534 +#: 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:1538 +#: library/doctest.rst:1544 msgid "" "The test runner accumulates statistics. The aggregated number of attempted, " "failed and skipped examples is also available via " @@ -2338,53 +2351,60 @@ msgid "" "instance." msgstr "" -#: library/doctest.rst:1543 +#: 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:1548 +#: 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:1552 +#: 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`." msgstr "" -#: library/doctest.rst:1559 +#: 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:1574 +#: 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:1570 +#: 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:1581 +#: 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:1585 +#: 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 " @@ -2392,14 +2412,14 @@ msgid "" "the output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1593 +#: 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:1597 +#: 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, " @@ -2407,54 +2427,54 @@ msgid "" "after the test completes, then use *clear_globs=False*." msgstr "" -#: library/doctest.rst:1602 +#: 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:1606 +#: 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." msgstr "" -#: library/doctest.rst:1613 +#: 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:1616 +#: 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:1620 +#: library/doctest.rst:1639 msgid ":class:`DocTestParser` has the following attributes:" msgstr ":class:`DocTestParser` définit les attributs suivants :" -#: library/doctest.rst:1624 +#: library/doctest.rst:1643 msgid "Number of attempted examples." msgstr "" -#: library/doctest.rst:1628 +#: library/doctest.rst:1647 msgid "Number of failed examples." msgstr "" -#: library/doctest.rst:1632 +#: library/doctest.rst:1651 msgid "Number of skipped examples." msgstr "" -#: library/doctest.rst:1640 +#: library/doctest.rst:1659 msgid "OutputChecker objects" msgstr "Objets *OutputChecker*" -#: library/doctest.rst:1645 +#: 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 " @@ -2463,11 +2483,11 @@ msgid "" "a string describing the differences between two outputs." msgstr "" -#: library/doctest.rst:1652 +#: 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:1656 +#: 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 " @@ -2476,23 +2496,23 @@ msgid "" "section :ref:`doctest-options` for more information about option flags." msgstr "" -#: library/doctest.rst:1665 +#: 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:1673 +#: library/doctest.rst:1692 msgid "Debugging" msgstr "Débogage" -#: library/doctest.rst:1675 +#: 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:1677 +#: library/doctest.rst:1696 msgid "" "Several functions convert doctests to executable Python programs, which can " "be run under the Python debugger, :mod:`pdb`." @@ -2500,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:1680 +#: 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 " @@ -2508,13 +2528,13 @@ msgid "" "debugging on the example." msgstr "" -#: library/doctest.rst:1685 +#: library/doctest.rst:1704 msgid "" "The :mod:`unittest` cases generated by :func:`DocTestSuite` support " "the :meth:`debug` method defined by :class:`unittest.TestCase`." msgstr "" -#: library/doctest.rst:1688 +#: 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 " @@ -2522,21 +2542,21 @@ msgid "" "suppose :file:`a.py` contains just this module docstring::" msgstr "" -#: library/doctest.rst:1703 +#: 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:1736 +#: 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:1742 +#: 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:1744 +#: 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 " @@ -2544,11 +2564,11 @@ msgid "" "generated script is returned as a string. For example, ::" msgstr "" -#: library/doctest.rst:1759 +#: library/doctest.rst:1778 msgid "displays::" msgstr "affiche::" -#: library/doctest.rst:1769 +#: 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 " @@ -2558,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:1776 +#: library/doctest.rst:1795 msgid "Convert the doctest for an object to a script." msgstr "Convertit en script l'objet *doctest*." -#: library/doctest.rst:1778 +#: 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 " @@ -2572,7 +2592,7 @@ msgid "" "module :file:`a.py` contains a top-level function :func:`!f`, then ::" msgstr "" -#: library/doctest.rst:1788 +#: library/doctest.rst:1807 #, fuzzy msgid "" "prints a script version of function :func:`!f`'s docstring, with doctests " @@ -2581,11 +2601,11 @@ 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:1794 +#: library/doctest.rst:1813 msgid "Debug the doctests for an object." msgstr "Débogue les *doctests* pour un objet." -#: library/doctest.rst:1796 +#: 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 " @@ -2593,7 +2613,7 @@ msgid "" "is run under the control of the Python debugger, :mod:`pdb`." msgstr "" -#: library/doctest.rst:1801 +#: library/doctest.rst:1820 msgid "" "A shallow copy of ``module.__dict__`` is used for both local and global " "execution context." @@ -2601,7 +2621,7 @@ msgstr "" "Une copie superficielle de ``module.__dict__`` est utilisée à la fois pour " "les contextes d'exécution locaux et globaux." -#: library/doctest.rst:1804 +#: 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 " @@ -2613,11 +2633,11 @@ msgid "" "to :func:`pdb.run`." msgstr "" -#: library/doctest.rst:1815 +#: 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:1817 +#: 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." @@ -2626,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:1820 +#: library/doctest.rst:1839 msgid "" "Optional argument *pm* has the same meaning as in function :func:`debug` " "above." @@ -2634,7 +2654,7 @@ msgstr "" "L'option *pm* a la même définition que dans la fonction :func:`debug` ci-" "haut." -#: library/doctest.rst:1822 +#: 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 " @@ -2645,7 +2665,7 @@ msgstr "" "dictionnaire vide est utilisé. Si définie, une copie superficielle du " "dictionnaire est utilisée." -#: library/doctest.rst:1827 +#: 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 " @@ -2653,7 +2673,7 @@ msgid "" "(which is a doctest!) for more details:" msgstr "" -#: library/doctest.rst:1835 +#: 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, " @@ -2663,7 +2683,7 @@ msgid "" "example, and the actual output." msgstr "" -#: library/doctest.rst:1842 +#: library/doctest.rst:1861 msgid "" "For information about the constructor parameters and methods, see the " "documentation for :class:`DocTestRunner` in section :ref:`doctest-advanced-" @@ -2673,7 +2693,7 @@ msgstr "" "la documentation pour la classe :class:`DocTestrunner` dans la " "section :reF:`doctest-advanced-api`." -#: library/doctest.rst:1845 +#: library/doctest.rst:1864 msgid "" "There are two exceptions that may be raised by :class:`DebugRunner` " "instances:" @@ -2681,7 +2701,7 @@ msgstr "" "Il y a deux exceptions qui peuvent être levées par des " "instances :class:`DebugRunner` :" -#: library/doctest.rst:1850 +#: 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 " @@ -2692,25 +2712,25 @@ msgstr "" "Les arguments du constructeur sont utilisés pour initialiser les attributs " "des mêmes noms." -#: library/doctest.rst:1854 +#: library/doctest.rst:1873 msgid ":exc:`DocTestFailure` defines the following attributes:" msgstr ":exc:`DocTestFailure` définit les attributs suivants :" -#: library/doctest.rst:1883 +#: 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:1888 +#: library/doctest.rst:1907 msgid "The :class:`Example` that failed." msgstr "L'exemple :class:`Example` qui a échoué." -#: library/doctest.rst:1869 +#: library/doctest.rst:1888 msgid "The example's actual output." msgstr "La sortie obtenue par l'exécution de l'exemple." -#: library/doctest.rst:1874 +#: 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 " @@ -2720,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:1878 +#: library/doctest.rst:1897 msgid ":exc:`UnexpectedException` defines the following attributes:" msgstr ":exc:`UnexpectedException` définit les attributs suivants :" -#: library/doctest.rst:1893 +#: library/doctest.rst:1912 msgid "" "A tuple containing information about the unexpected exception, as returned " "by :func:`sys.exc_info`." @@ -2732,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:1900 +#: library/doctest.rst:1919 msgid "Soapbox" msgstr "Éditorial" -#: library/doctest.rst:1902 +#: 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:1905 +#: library/doctest.rst:1924 msgid "Checking examples in docstrings." msgstr "Vérifier les exemples dans les *docstrings*." -#: library/doctest.rst:1907 +#: library/doctest.rst:1926 msgid "Regression testing." msgstr "Test de régression." -#: library/doctest.rst:1909 +#: library/doctest.rst:1928 msgid "Executable documentation / literate testing." msgstr "De la documentation exécutable / des tests littéraires." -#: library/doctest.rst:1911 +#: 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:1915 +#: 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. " @@ -2771,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:1923 +#: 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 " @@ -2796,13 +2817,13 @@ msgid "" "different results, blurring the distinction between testing and explaining." msgstr "" -#: library/doctest.rst:1941 +#: 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:1944 +#: 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, " @@ -2810,7 +2831,7 @@ msgid "" "doctest." msgstr "" -#: library/doctest.rst:1949 +#: 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 " @@ -2818,13 +2839,13 @@ msgid "" "test file." msgstr "" -#: library/doctest.rst:1953 +#: library/doctest.rst:1972 msgid "" "Define a :attr:`~module.__test__` dictionary mapping from regression test " "topics to docstrings containing test cases." msgstr "" -#: library/doctest.rst:1956 +#: 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-" @@ -2837,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:1978 +#: library/doctest.rst:1997 msgid "Footnotes" msgstr "Notes" -#: library/doctest.rst:1979 +#: 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 " diff --git a/library/email.charset.po b/library/email.charset.po index d115789b95..ed3bb34fc4 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: 2025-10-17 09:58+0200\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" @@ -56,7 +56,8 @@ msgstr "" "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 @@ -306,8 +307,9 @@ msgstr "" "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 " diff --git a/library/email.contentmanager.po b/library/email.contentmanager.po index e283bcb91e..88b1e20d37 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: 2025-10-17 09:58+0200\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), " @@ -100,7 +100,7 @@ msgstr "" "divers en-têtes MIME pour coder les informations nécessaires à " "l'interprétation des données stockées." -#: library/email.contentmanager.rst:54 +#: 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 " @@ -110,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__``)." 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 " @@ -145,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`)." @@ -153,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`." @@ -161,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 " @@ -171,11 +171,11 @@ 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 " @@ -189,7 +189,7 @@ msgstr "" "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 " @@ -212,7 +212,7 @@ 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`` " @@ -230,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." @@ -249,7 +249,7 @@ 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." @@ -257,7 +257,7 @@ 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." -#: 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 " @@ -270,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 " @@ -283,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 " @@ -300,7 +300,7 @@ 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. Prior to encoding, :meth:`str.splitlines` is used to " @@ -309,13 +309,13 @@ msgid "" "property (even if the original string did not end with one)." msgstr "" -#: library/email.contentmanager.rst:165 +#: 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 "" -#: library/email.contentmanager.rst:167 +#: 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* " @@ -331,7 +331,7 @@ msgstr "" "*sous-type*, la valeur par défaut de *cte* est ``7bit``." # suit un : -#: library/email.contentmanager.rst:174 +#: 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, " @@ -342,7 +342,7 @@ msgstr "" "mais :class:`~email.generator.BytesGenerator` ne le sérialise pas " "correctement." -#: library/email.contentmanager.rst:179 +#: 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 " @@ -357,7 +357,7 @@ msgstr "" "Les seules valeurs valides pour *disposition* sont ``attachment`` et " "``inline``." -#: library/email.contentmanager.rst:186 +#: 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." @@ -365,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:189 +#: library/email.contentmanager.rst:186 msgid "" "If *cid* is specified, add a :mailheader:`Content-ID` header with *cid* as " "its value." @@ -373,7 +373,7 @@ msgstr "" "Si *cid* est spécifié, ajoute un en-tête :mailheader:`Content-ID` avec cette " "valeur." -#: library/email.contentmanager.rst:192 +#: 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 " @@ -383,7 +383,7 @@ msgstr "" "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:196 +#: 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 " @@ -393,11 +393,11 @@ 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:203 +#: library/email.contentmanager.rst:200 msgid "Footnotes" msgstr "Notes" -#: library/email.contentmanager.rst:204 +#: library/email.contentmanager.rst:201 msgid "" "Originally added in 3.4 as a :term:`provisional module `" msgstr "" diff --git a/library/email.encoders.po b/library/email.encoders.po index c6f0133b67..67f150a8c8 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: 2025-10-17 09:58+0200\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" @@ -71,8 +71,8 @@ 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 :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 " diff --git a/library/email.errors.po b/library/email.errors.po index d45c828f54..93d2f6b9bf 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: 2025-10-17 09:58+0200\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,8 +25,9 @@ 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 " diff --git a/library/email.generator.po b/library/email.generator.po index 31b99217ee..576a6e3c5c 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: 2025-10-17 09:58+0200\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" @@ -384,8 +384,9 @@ msgstr "" "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 " +"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 " diff --git a/library/email.header.po b/library/email.header.po index 741dc87b2a..3854c8ca6c 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: 2025-10-17 09:58+0200\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" @@ -65,6 +65,7 @@ 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 " @@ -73,8 +74,8 @@ msgid "" "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." +"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 à " @@ -88,13 +89,14 @@ 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::" +"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` " @@ -366,8 +368,9 @@ msgstr "" "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 " diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index 5ae464a1a5..290ae739c8 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: 2025-10-17 09:58+0200\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,15 +20,15 @@ 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 " @@ -51,7 +51,7 @@ msgstr "" "d'extension permettant aux applications d'ajouter leurs propres types d'en-" "tête personnalisés." -#: library/email.headerregistry.rst:25 +#: library/email.headerregistry.rst:22 msgid "" "When using any of the policy objects derived " "from :data:`~email.policy.EmailPolicy`, all headers are produced " @@ -78,7 +78,7 @@ msgstr "" "pour modifier le comportement par défaut pour une utilisation par des " "applications plus complexes." -#: library/email.headerregistry.rst:36 +#: 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 " @@ -90,7 +90,7 @@ msgstr "" "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 " @@ -100,11 +100,11 @@ msgstr "" "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 " @@ -115,7 +115,7 @@ msgstr "" "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 " @@ -128,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 " @@ -140,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 " @@ -150,7 +150,7 @@ 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*. " @@ -167,7 +167,7 @@ msgstr "" "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 +#: 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 " @@ -181,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 " @@ -204,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`` " @@ -217,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 " @@ -227,7 +229,7 @@ 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. " @@ -239,7 +241,7 @@ msgstr "" "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 " @@ -263,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 " @@ -279,11 +281,11 @@ 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 " @@ -306,7 +308,7 @@ msgstr "" "utilise :class:`datetime.timezone` pour enregistrer le décalage lié au " "fuseau horaire." -#: library/email.headerregistry.rst:160 +#: 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::" @@ -315,7 +317,7 @@ 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 " @@ -325,7 +327,7 @@ msgstr "" "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 " @@ -337,7 +339,7 @@ msgstr "" "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." @@ -345,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." @@ -354,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 " @@ -366,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, " @@ -380,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 " @@ -394,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 " @@ -409,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 " @@ -428,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 " @@ -438,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 " @@ -452,20 +454,20 @@ msgstr "" "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 " @@ -478,12 +480,17 @@ 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." @@ -491,11 +498,11 @@ msgstr "" "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." @@ -503,17 +510,17 @@ msgstr "" "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." @@ -521,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. " @@ -545,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 :" @@ -553,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" @@ -561,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" @@ -569,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" @@ -581,7 +588,7 @@ msgstr "orig-date" msgid "sender" msgstr "sender" -#: library/email.headerregistry.rst:328 +#: library/email.headerregistry.rst:330 msgid "UniqueSingleAddressHeader" msgstr "UniqueSingleAddressHeader" @@ -589,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" @@ -597,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" @@ -607,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" @@ -644,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" @@ -652,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" @@ -660,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" @@ -668,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" @@ -676,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, " @@ -696,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 " @@ -715,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 " @@ -726,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::" @@ -734,11 +741,11 @@ 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`." @@ -746,7 +753,7 @@ 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 " @@ -763,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 " @@ -773,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." @@ -790,7 +797,7 @@ 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 " @@ -800,7 +807,7 @@ msgstr "" "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 " @@ -810,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::" @@ -818,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 " @@ -831,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 " @@ -841,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." @@ -849,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 " @@ -862,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 e42c1e0f5e..16e4a50385 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: 2025-10-17 09:58+0200\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,11 +25,12 @@ 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." +"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 " diff --git a/library/email.message.po b/library/email.message.po index b7e69be438..4c166aa3ca 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: 2025-10-17 09:58+0200\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,18 +20,19 @@ 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." @@ -43,7 +44,7 @@ msgstr "" "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 " @@ -66,7 +67,7 @@ msgstr "" "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,14 +119,15 @@ 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 :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 " @@ -135,7 +137,7 @@ msgstr "" "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* " @@ -162,7 +164,7 @@ msgstr "" "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 " @@ -173,7 +175,7 @@ msgstr "" "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 " @@ -192,7 +194,7 @@ msgstr "" "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 " @@ -202,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 " @@ -212,7 +214,7 @@ 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 " @@ -222,7 +224,7 @@ msgstr "" "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. " @@ -240,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 " @@ -253,7 +255,7 @@ msgstr "" "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 " @@ -262,7 +264,7 @@ 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``. " @@ -282,7 +284,7 @@ msgstr "" "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.)" @@ -291,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." @@ -299,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 " @@ -324,7 +326,7 @@ msgstr "" "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." @@ -332,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." @@ -340,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. " @@ -355,7 +357,7 @@ 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; " @@ -365,7 +367,7 @@ msgstr "" "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. " @@ -377,7 +379,7 @@ 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`." @@ -386,7 +388,7 @@ msgstr "" "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." @@ -394,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 " @@ -405,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 " @@ -423,7 +425,7 @@ msgstr "" "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 " @@ -433,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." @@ -449,7 +451,7 @@ 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 " @@ -460,11 +462,11 @@ msgstr "" "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 " @@ -474,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 " @@ -486,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 " @@ -500,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 " @@ -523,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 " @@ -546,7 +548,7 @@ 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-" @@ -560,7 +562,7 @@ msgstr "" "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` " @@ -578,7 +580,7 @@ msgstr "" "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`." @@ -587,7 +589,7 @@ msgstr "" "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`." @@ -596,7 +598,7 @@ msgstr "" "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 " @@ -608,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 " @@ -623,7 +625,7 @@ msgstr "" "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* " @@ -640,7 +642,7 @@ msgstr "" "*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* " @@ -656,7 +658,7 @@ msgstr "" "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 " @@ -666,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." @@ -674,7 +676,7 @@ 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 " @@ -687,11 +689,11 @@ msgstr "" "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 " @@ -702,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 " @@ -718,7 +720,7 @@ msgstr "" "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, " @@ -730,7 +732,7 @@ msgstr "" "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 " @@ -742,7 +744,7 @@ 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 " @@ -755,7 +757,7 @@ msgstr "" "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 " @@ -766,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 " @@ -777,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 " @@ -792,7 +794,7 @@ msgstr "" "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." @@ -800,7 +802,7 @@ 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`." @@ -808,7 +810,7 @@ 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 " @@ -820,7 +822,7 @@ msgstr "" "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." @@ -828,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-" @@ -841,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:" @@ -849,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'`` " @@ -861,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 " @@ -871,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." @@ -879,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 " @@ -889,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." @@ -897,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 " @@ -907,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 " @@ -920,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``." @@ -929,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``." @@ -937,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 " @@ -961,7 +963,7 @@ 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 " @@ -989,7 +991,7 @@ msgstr "" "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 +#: 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 " @@ -999,7 +1001,7 @@ msgstr "" "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 " @@ -1013,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 " @@ -1027,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) " @@ -1043,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 " @@ -1060,7 +1062,7 @@ 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 " @@ -1077,7 +1079,7 @@ msgstr "" "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, " @@ -1099,7 +1101,7 @@ msgstr "" "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, " @@ -1119,7 +1121,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: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, " @@ -1147,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 " @@ -1160,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, " @@ -1182,7 +1184,7 @@ 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 " @@ -1204,7 +1206,7 @@ msgstr "" "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``." @@ -1212,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 " @@ -1224,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 " @@ -1234,7 +1236,7 @@ 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 " @@ -1247,11 +1249,11 @@ msgstr "" "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`." @@ -1259,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.parser.po b/library/email.parser.po index 09c304ea75..637bef9fb8 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: 2025-10-17 09:58+0200\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" @@ -260,11 +260,12 @@ 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 " +"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 " @@ -306,10 +307,12 @@ 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." +"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 " diff --git a/library/email.po b/library/email.po index 9591cf66c8..86cb7a8b16 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: 2025-10-17 09:58+0200\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,20 +20,20 @@ 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 " +"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`." +"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 " @@ -43,7 +43,7 @@ msgstr "" "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 " @@ -75,7 +75,7 @@ msgstr "" "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 " @@ -97,7 +97,7 @@ msgstr "" "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`, " @@ -124,7 +124,7 @@ msgstr "" "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 " @@ -155,9 +155,10 @@ 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 " @@ -171,7 +172,7 @@ 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 " @@ -192,7 +193,7 @@ msgstr "" "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." @@ -200,7 +201,7 @@ 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 " @@ -224,7 +225,7 @@ msgstr "" "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` " @@ -233,43 +234,44 @@ msgstr "" "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 b96f1f6f37..236bf71643 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: 2025-10-17 09:58+0200\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,7 +60,7 @@ 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 " @@ -75,7 +75,7 @@ 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, " @@ -94,7 +94,7 @@ msgstr "" "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 +#: library/email.policy.rst:41 msgid "" "This default value for the *policy* keyword " "to :class:`~email.message.EmailMessage` is the :class:`EmailPolicy` policy, " @@ -104,7 +104,7 @@ msgstr "" "de :class:`~email.message.EmailMessage` est la " "politique :class:`EmailPolicy`, via son instance prédéfinie :data:`~default`." -#: library/email.policy.rst:48 +#: library/email.policy.rst:45 msgid "" "When a :class:`~email.message.Message` " "or :class:`~email.message.EmailMessage` object is created, it acquires a " @@ -126,7 +126,7 @@ msgstr "" "également passer une politique spécifique au générateur qui remplace celle " "stockée sur l'objet message." -#: library/email.policy.rst:57 +#: 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 " @@ -141,7 +141,7 @@ msgstr "" "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 " @@ -163,7 +163,7 @@ msgstr "" "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 " @@ -175,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 " @@ -185,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 " @@ -197,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 " @@ -213,7 +213,7 @@ msgstr "" "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 " @@ -224,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::" @@ -232,7 +232,7 @@ 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 " @@ -245,7 +245,7 @@ msgstr "" "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 " @@ -260,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:" @@ -269,7 +269,7 @@ 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`` " @@ -280,7 +280,7 @@ msgstr "" "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 " @@ -290,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:" @@ -298,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 " @@ -312,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` " @@ -329,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 " @@ -342,7 +342,7 @@ 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 " @@ -352,7 +352,7 @@ msgstr "" "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 " @@ -362,7 +362,7 @@ 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 " @@ -372,7 +372,7 @@ msgstr "" "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 " @@ -381,14 +381,14 @@ msgid "" "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." 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:" @@ -397,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 " @@ -407,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. " @@ -418,7 +418,7 @@ 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, " @@ -428,7 +428,7 @@ msgstr "" "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 " @@ -438,7 +438,7 @@ 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 " @@ -447,7 +447,7 @@ 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`, " @@ -464,11 +464,11 @@ msgstr "" "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 +#: 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 " @@ -482,7 +482,7 @@ msgstr "" "``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 " @@ -499,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 " @@ -520,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 " @@ -535,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`` " @@ -559,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 " @@ -570,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 " @@ -588,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." @@ -597,7 +597,7 @@ 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 " @@ -615,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." @@ -624,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." @@ -632,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." @@ -641,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 " @@ -651,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 " @@ -664,7 +664,7 @@ 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`." @@ -673,7 +673,7 @@ msgstr "" "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:" @@ -682,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 " @@ -699,7 +701,27 @@ 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 " @@ -712,21 +734,21 @@ msgstr "" "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" @@ -734,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 " @@ -766,7 +788,7 @@ 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` " @@ -787,7 +809,7 @@ msgstr "" "``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`:" @@ -795,7 +817,7 @@ 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 " @@ -805,7 +827,7 @@ msgstr "" "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 " @@ -818,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. " @@ -833,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, " @@ -847,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 " @@ -868,7 +890,7 @@ msgstr "" "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`` " @@ -885,7 +907,7 @@ msgstr "" "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." @@ -893,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 " @@ -907,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 " @@ -920,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 " @@ -930,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." @@ -939,7 +961,7 @@ 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 " @@ -954,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)." @@ -963,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 " @@ -973,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 " @@ -983,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." @@ -991,7 +1013,7 @@ 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." @@ -1000,7 +1022,7 @@ msgstr "" "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 " @@ -1011,7 +1033,7 @@ 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 " @@ -1028,7 +1050,7 @@ msgstr "" "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`." @@ -1036,14 +1058,14 @@ msgstr "" "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 " @@ -1052,7 +1074,7 @@ 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:" @@ -1060,15 +1082,15 @@ 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. " @@ -1078,7 +1100,7 @@ msgstr "" "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 " @@ -1091,7 +1113,7 @@ msgstr "" "``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 " @@ -1109,7 +1131,7 @@ msgstr "" "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." @@ -1117,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 659a5d7bd5..32b7458f3c 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: 2025-10-17 09:58+0200\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,8 +25,9 @@ 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 " diff --git a/library/ensurepip.po b/library/ensurepip.po index 22ceb6407e..ac110338c1 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: 2025-10-17 09:58+0200\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,20 +62,28 @@ 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" @@ -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:48 +#: 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:50 +#: library/ensurepip.rst:54 msgid "The simplest possible invocation is::" msgstr "L'invocation la plus simple est ::" -#: library/ensurepip.rst:54 +#: 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:61 +#: 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,7 +137,7 @@ 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:68 +#: library/ensurepip.rst:72 #, fuzzy msgid "" "Installs ``pip`` relative to the given root directory rather than the root " @@ -138,7 +148,7 @@ msgstr "" "*dossier* au lieu de la racine de l'environnement virtuel ou la racine par " "défaut de l'installation de Python." -#: library/ensurepip.rst:74 +#: library/ensurepip.rst:78 #, fuzzy msgid "" "Installs ``pip`` into the user site packages directory rather than globally " @@ -149,7 +159,7 @@ msgstr "" "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:78 +#: 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 " @@ -159,7 +169,7 @@ msgstr "" "version de Python avec laquelle ``ensurepip`` est utilisé). Cela se contrôle " "par deux options supplémentaires :" -#: library/ensurepip.rst:85 +#: library/ensurepip.rst:89 #, fuzzy msgid "" "If an alternate installation is requested, the ``pipX`` script will *not* be " @@ -168,7 +178,7 @@ 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:90 +#: library/ensurepip.rst:94 #, fuzzy msgid "" "If a \"default pip\" installation is requested, the ``pip`` script will be " @@ -177,22 +187,23 @@ 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:93 +#: 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:96 +#: library/ensurepip.rst:100 msgid "Module API" msgstr "API du module" -#: library/ensurepip.rst:98 -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:102 +#: library/ensurepip.rst:106 msgid "" "Returns a string specifying the available version of pip that will be " "installed when bootstrapping an environment." @@ -200,12 +211,12 @@ msgstr "" "Renvoie, sous forme de chaîne, la version de ``pip`` qui serait installée " "par ``ensurepip``." -#: library/ensurepip.rst:109 +#: 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:111 +#: 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 " @@ -215,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:115 +#: 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." @@ -224,7 +235,7 @@ msgstr "" "version plus ancienne de ``pip`` déjà installée vers la version embarquée " "dans ``ensurepip``." -#: library/ensurepip.rst:118 +#: library/ensurepip.rst:122 msgid "" "*user* indicates whether to use the user scheme rather than installing " "globally." @@ -233,7 +244,7 @@ msgstr "" "disponible pour cet utilisateur uniquement, et non pour tous les " "utilisateurs de l'installation de Python." -#: library/ensurepip.rst:121 +#: 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)." @@ -241,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:124 +#: 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:126 +#: library/ensurepip.rst:130 msgid "" "If *default_pip* is set, then ``pip`` will be installed in addition to the " "two regular scripts." @@ -253,14 +264,14 @@ msgstr "" "Si *default_pip* vaut vrai, la commande ``pip`` est créée en plus des deux " "autres." -#: library/ensurepip.rst:129 +#: 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`." -#: library/ensurepip.rst:132 +#: library/ensurepip.rst:136 msgid "" "*verbosity* controls the level of output to :data:`sys.stdout` from the " "bootstrapping operation." @@ -268,7 +279,7 @@ msgstr "" "*verbosity* règle le niveau de verbosité des messages émis " "sur :data:`sys.stdout` pendant l'amorçage." -#: library/ensurepip.rst:135 +#: library/ensurepip.rst:139 msgid "" "Raises an :ref:`auditing event ` ``ensurepip.bootstrap`` with " "argument ``root``." @@ -276,7 +287,7 @@ msgstr "" "Cette fonction lève un :ref:`événement d'audit ` " "``ensurepip.bootstrap`` avec l'argument ``root``." -#: library/ensurepip.rst:139 +#: 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 " @@ -286,7 +297,7 @@ msgstr "" "``os.environ``. Pour les éviter, on peut appeler l'interface en ligne de " "commande dans un sous-processus." -#: library/ensurepip.rst:145 +#: 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 6b8f85adbb..6a07c6595a 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: 2025-10-17 09:58+0200\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,7 +84,7 @@ 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? ` 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,31 +124,32 @@ 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`_)" @@ -152,11 +157,11 @@ 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`_)" @@ -164,11 +169,11 @@ 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." @@ -177,11 +182,11 @@ msgstr "" "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` " @@ -193,23 +198,23 @@ msgstr "" "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 " @@ -219,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 " @@ -233,20 +238,20 @@ 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:115 +#: library/enum.rst:110 msgid "A subclass of :class:`dict` for use when subclassing :class:`EnumType`." msgstr "" -#: library/enum.rst:117 +#: library/enum.rst:112 msgid ":class:`auto`" msgstr ":class:`auto`" -#: library/enum.rst:119 +#: 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 " @@ -257,11 +262,11 @@ msgstr "" "nom du membre, tandis que les autres énumérations utilisent 1 par défaut et " "puis augmentent." -#: library/enum.rst:123 +#: library/enum.rst:118 msgid ":func:`~enum.property`" msgstr ":func:`~enum.property`" -#: library/enum.rst:125 +#: library/enum.rst:120 #, fuzzy msgid "" "Allows :class:`Enum` members to have attributes without conflicting with " @@ -271,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:129 +#: library/enum.rst:124 msgid ":func:`unique`" msgstr ":func:`unique`" -#: library/enum.rst:131 +#: 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:133 +#: library/enum.rst:128 msgid ":func:`verify`" msgstr ":func:`verify`" -#: library/enum.rst:135 +#: library/enum.rst:130 msgid "" "Enum class decorator that checks user-selectable constraints on an " "enumeration." @@ -294,62 +299,75 @@ msgstr "" "Décorateur de classe qui vérifie des contraintes personnalisées pour une " "énumération." -#: library/enum.rst:138 +#: library/enum.rst:133 msgid ":func:`member`" msgstr ":func:`member`" -#: library/enum.rst:140 +#: 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:142 +#: library/enum.rst:137 msgid ":func:`nonmember`" msgstr ":func:`nonmember`" -#: library/enum.rst:144 +#: 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:146 +#: library/enum.rst:141 #, fuzzy msgid ":func:`global_enum`" msgstr ":func:`nonmember`" -#: library/enum.rst:148 +#: 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:152 +#: library/enum.rst:147 msgid ":func:`show_flag_values`" msgstr "" -#: library/enum.rst:154 +#: library/enum.rst:149 msgid "Return a list of all power-of-two integers contained in a flag." msgstr "" -#: library/enum.rst:157 +#: 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:158 +#: library/enum.rst:159 msgid "" "``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, " "``member``, ``nonmember``, ``global_enum``, ``show_flag_values``" msgstr "" -#: library/enum.rst:159 +#: library/enum.rst:160 msgid "``EnumDict``" msgstr "" -#: library/enum.rst:164 -msgid "Data Types" +#: library/enum.rst:165 +#, fuzzy +msgid "Data types" msgstr "Types de données" -#: library/enum.rst:169 +#: 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:173 +#: library/enum.rst:174 #, fuzzy msgid "" "``EnumType`` is responsible for setting the correct :meth:`!" @@ -373,17 +391,17 @@ msgstr "" "membres de l'énumération, de gérer correctement les doublons, de fournir une " "itération sur la classe *enum*, etc." -#: library/enum.rst:180 +#: library/enum.rst:181 msgid "" "Before 3.11 ``EnumType`` was called ``EnumMeta``, which is still available " "as an alias." msgstr "" -#: library/enum.rst:184 +#: 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:186 +#: library/enum.rst:187 msgid "to look up an existing member:" msgstr "pour chercher un membre existant :" @@ -391,7 +409,7 @@ msgstr "pour chercher un membre existant :" msgid "cls" msgstr "cls" -#: library/enum.rst:194 +#: library/enum.rst:195 msgid "The enum class being called." msgstr "Classe de l'énumération concernée." @@ -399,11 +417,11 @@ msgstr "Classe de l'énumération concernée." msgid "value" msgstr "value" -#: library/enum.rst:189 +#: library/enum.rst:190 msgid "The value to lookup." msgstr "Valeur à chercher." -#: library/enum.rst:191 +#: library/enum.rst:192 #, fuzzy msgid "" "to use the ``cls`` enum to create a new enum (only if the existing enum does " @@ -411,7 +429,7 @@ msgid "" msgstr "" "pour utiliser l'énumération ``cls`` afin de créer une nouvelle énumération :" -#: library/enum.rst:195 +#: library/enum.rst:196 msgid "The name of the new Enum to create." msgstr "Nom de la nouvelle énumération à créer." @@ -419,7 +437,7 @@ msgstr "Nom de la nouvelle énumération à créer." msgid "names" msgstr "names" -#: library/enum.rst:196 +#: 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." @@ -427,7 +445,7 @@ msgstr "Couples nom-valeur des membres de la nouvelle énumération." msgid "module" msgstr "module" -#: library/enum.rst:197 +#: 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." @@ -435,7 +453,7 @@ msgstr "Nom du module dans lequel la classe *Enum* se trouve." msgid "qualname" msgstr "qualname" -#: library/enum.rst:198 +#: 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." @@ -443,7 +461,7 @@ msgstr "Position dans le module où la classe *Enum* se trouve." msgid "type" msgstr "type" -#: library/enum.rst:199 +#: library/enum.rst:200 msgid "A mix-in type for the new Enum." msgstr "Type à mélanger pour la nouvelle énumération." @@ -451,7 +469,7 @@ msgstr "Type à mélanger pour la nouvelle énumération." msgid "start" msgstr "start" -#: library/enum.rst:200 +#: 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`)" @@ -460,7 +478,7 @@ msgstr "Première valeur entière de l'énumération (utilisé par :class:`auto msgid "boundary" msgstr "boundary" -#: library/enum.rst:201 +#: library/enum.rst:202 #, fuzzy msgid "" "How to handle out-of-range values from bit operations (:class:`Flag` only)." @@ -468,11 +486,11 @@ msgstr "" "Définit la gestion les valeurs hors plage des opérations bit-à-bit " "(:class:`Flag` uniquement)" -#: library/enum.rst:205 +#: library/enum.rst:206 msgid "Returns ``True`` if member belongs to the ``cls``::" msgstr "Renvoie ``True`` si le membre appartient à ``cls`` ::" -#: library/enum.rst:215 +#: library/enum.rst:216 #, fuzzy msgid "" "Before Python 3.12, a ``TypeError`` is raised if a non-Enum-member is used " @@ -482,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:220 +#: library/enum.rst:221 msgid "" "Returns ``['__class__', '__doc__', '__members__', '__module__']`` and the " "names of the members in *cls*::" @@ -490,7 +508,7 @@ msgstr "" "Renvoie ``['__class__', '__doc__', '__members__', '__module__']`` et les " "noms des membres de *cls* ::" -#: library/enum.rst:228 +#: library/enum.rst:229 #, fuzzy msgid "" "Returns the Enum member in *cls* matching *name*, or raises " @@ -499,46 +517,47 @@ msgstr "" "Renvoie le membre de l'énumération *cls* correspondant à *name* ou lève " "une :exc:`KeyError` ::" -#: library/enum.rst:235 +#: 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:242 -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:249 +#: library/enum.rst:250 msgid "Returns a mapping of every enum name to its member, including aliases" msgstr "" -#: library/enum.rst:253 +#: 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:261 +#: 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:265 +#: 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:272 +#: 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:297 +#: 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:279 +#: library/enum.rst:280 msgid "Enum member values" msgstr "Valeurs des membres d'une *Enum*" -#: library/enum.rst:281 +#: library/enum.rst:282 #, fuzzy msgid "" "Member values can be anything: :class:`int`, :class:`str`, etc. If the " @@ -551,7 +570,7 @@ msgstr "" "appropriée sera choisie pour vous. Soyez vigilant si vous " "mélangez :class:`auto` avec d'autres valeurs." -#: library/enum.rst:286 +#: 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 " @@ -559,12 +578,12 @@ msgid "" "mutable/unhashable values in the enum." msgstr "" -#: library/enum.rst:293 +#: library/enum.rst:294 #, fuzzy msgid "Name of the member." msgstr "``_name_`` — nom du membre" -#: library/enum.rst:301 +#: library/enum.rst:302 #, fuzzy msgid "" "No longer used, kept for backward compatibility. (class attribute, removed " @@ -574,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:306 +#: 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." @@ -582,7 +621,7 @@ 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:309 +#: 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. " @@ -592,7 +631,7 @@ msgstr "" "seront également supprimés de l'énumération terminée. Voir :ref:`Intervalle " "de temps ` pour un exemple." -#: library/enum.rst:315 +#: library/enum.rst:340 msgid "" "Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and any " "public methods defined on *self.__class__*::" @@ -604,11 +643,11 @@ msgstr "" msgid "name" msgstr "name" -#: library/enum.rst:337 +#: 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:338 +#: 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." @@ -616,7 +655,7 @@ msgstr "Valeur de départ pour l'énumération ; 1 par défaut." msgid "count" msgstr "count" -#: library/enum.rst:339 +#: 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." @@ -625,31 +664,59 @@ msgstr "" msgid "last_values" msgstr "last_values" -#: library/enum.rst:340 +#: library/enum.rst:365 msgid "A list of the previous values." msgstr "Liste des valeurs précédentes." -#: library/enum.rst:342 +#: library/enum.rst:367 +#, fuzzy msgid "" "A *staticmethod* that is used to determine the next value returned " -"by :class:`auto`::" +"by :class:`auto`." msgstr "" "Méthode statique utilisée pour déterminer la prochaine valeur à renvoyer " "par :class:`auto` ::" -#: library/enum.rst:358 +#: 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:365 +#: library/enum.rst:403 msgid "" "``Weekday.__init__()`` would be called as ``Weekday.__init__(self, 1, " "'Mon')``" msgstr "" -#: library/enum.rst:369 +#: library/enum.rst:407 msgid "" "A *classmethod* that is used to further configure subsequent subclasses. By " "default, does nothing." @@ -657,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:374 +#: 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::" @@ -666,25 +733,25 @@ msgstr "" "rien par défaut mais peut être surchargée pour implémenter un comportement " "personnalisé de recherche ::" -#: library/enum.rst:396 +#: 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:404 +#: library/enum.rst:444 msgid "" "results in the call ``int('1a', 16)`` and a value of ``26`` for the member." msgstr "" -#: library/enum.rst:408 +#: library/enum.rst:448 msgid "" "When writing a custom ``__new__``, do not use ``super().__new__`` -- call " "the appropriate ``__new__`` instead." msgstr "" -#: library/enum.rst:413 +#: 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::" @@ -693,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:430 +#: 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::" @@ -701,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:446 +#: library/enum.rst:486 #, fuzzy msgid "" "Returns the string used for *format()* and *f-string* calls. By default, " @@ -711,7 +778,7 @@ msgstr "" "défaut, renvoie la valeur renvoyée par :meth:`__str__`, mais peut être " "remplacé ::" -#: library/enum.rst:462 +#: library/enum.rst:502 msgid "" "Using :class:`auto` with :class:`Enum` results in integers of increasing " "value, starting with ``1``." @@ -719,31 +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:465 -msgid "Added :ref:`enum-dataclass-support`" +#: library/enum.rst:505 +msgid "Added :ref:`enum-dataclass-support`." msgstr "" -#: library/enum.rst:469 +#: library/enum.rst:509 msgid "Adds a new name as an alias to an existing member::" msgstr "" -#: library/enum.rst:475 +#: library/enum.rst:515 msgid "" "Raises a :exc:`NameError` if the name is already assigned to a different " "member." msgstr "" -#: library/enum.rst:481 +#: library/enum.rst:521 msgid "Adds a new value as an alias to an existing member::" msgstr "" -#: library/enum.rst:487 +#: library/enum.rst:527 msgid "" "Raises a :exc:`ValueError` if the value is already linked with a different " "member." msgstr "" -#: library/enum.rst:494 +#: 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 " @@ -756,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:515 +#: library/enum.rst:556 msgid "" "Using :class:`auto` with :class:`IntEnum` results in integers of increasing " "value, starting with ``1``." @@ -764,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:518 +#: library/enum.rst:559 #, fuzzy msgid "" ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " @@ -776,7 +847,7 @@ msgstr "" "existantes*. :meth:`__format__` était déjà :func:`int.__format__` pour la " "même raison." -#: library/enum.rst:525 +#: library/enum.rst:566 #, fuzzy msgid "" "*StrEnum* is the same as :class:`Enum`, but its members are also strings and " @@ -789,7 +860,7 @@ msgstr "" "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:546 +#: library/enum.rst:587 #, fuzzy msgid "" "There are places in the stdlib that check for an exact :class:`str` instead " @@ -803,7 +874,7 @@ msgstr "" "``isinstance(str, unknown)``) et, dans ce cas, vous devez utiliser " "``str(StrEnum.member)``." -#: library/enum.rst:553 +#: library/enum.rst:594 msgid "" "Using :class:`auto` with :class:`StrEnum` results in the lower-cased member " "name as the value." @@ -811,7 +882,7 @@ msgstr "" "L'utilisation de :class:`auto` avec :class:`StrEnum` donne le nom du membre " "en minuscule comme valeur." -#: library/enum.rst:558 +#: library/enum.rst:599 #, fuzzy msgid "" ":meth:`~object.__str__` is :meth:`!str.__str__` to better support the " @@ -822,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:566 +#: library/enum.rst:607 #, fuzzy msgid "" "``Flag`` is the same as :class:`Enum`, but its members support the bitwise " @@ -833,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:572 +#: library/enum.rst:613 msgid "Returns *True* if value is in self::" msgstr "Renvoie *True* si la valeur est dans *self* ::" -#: library/enum.rst:593 +#: library/enum.rst:634 #, fuzzy msgid "Returns all contained non-alias members::" msgstr "Renvoie tous les membres ::" -#: library/enum.rst:604 +#: library/enum.rst:645 msgid "Returns number of members in flag::" msgstr "Renvoie le nombre de membres de *Flag* ::" -#: library/enum.rst:615 +#: 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:627 +#: 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:634 +#: 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:643 +#: 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:652 +#: 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:663 +#: 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`." @@ -879,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:668 +#: library/enum.rst:709 msgid "" "Using :class:`auto` with :class:`Flag` results in integers that are powers " "of two, starting with ``1``." @@ -887,12 +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:671 +#: 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:679 +#: library/enum.rst:720 #, fuzzy msgid "" "``IntFlag`` is the same as :class:`Flag`, but its members are also integers " @@ -901,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:693 +#: library/enum.rst:734 msgid "" "If any integer operation is performed with an *IntFlag* member, the result " "is not an *IntFlag*::" @@ -909,16 +980,16 @@ 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:699 +#: 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:701 +#: 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:702 +#: library/enum.rst:743 #, fuzzy msgid "" "the result is not a valid *IntFlag*: the result depends on " @@ -927,14 +998,14 @@ msgstr "" "le résultat n'est pas un *IntFlag* valide : le résultat dépend du paramètre " "*FlagBoundary*." -#: library/enum.rst:704 +#: library/enum.rst:745 #, fuzzy 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:711 +#: library/enum.rst:752 msgid "" "Using :class:`auto` with :class:`IntFlag` results in integers that are " "powers of two, starting with ``1``." @@ -942,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:716 +#: library/enum.rst:757 #, fuzzy msgid "" ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " @@ -954,37 +1025,37 @@ msgstr "" "existantes*. :meth:`__format__` était déjà :func:`int.__format__` pour la " "même raison." -#: library/enum.rst:720 +#: 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:726 +#: 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:729 +#: 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:730 +#: library/enum.rst:771 msgid ":meth:`!str.__str__` for :class:`StrEnum`" msgstr "" -#: library/enum.rst:732 +#: 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() `." msgstr "" -#: library/enum.rst:741 +#: 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`." @@ -993,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:746 +#: 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:762 +#: library/enum.rst:803 msgid "" "Ensure that there are no missing values between the lowest-valued member and " "the highest-valued member::" @@ -1005,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:777 +#: library/enum.rst:818 #, fuzzy msgid "" "Ensure that any flag groups/masks contain only named flags -- useful when " @@ -1015,14 +1086,14 @@ 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:794 +#: 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:800 +#: library/enum.rst:841 #, fuzzy msgid "" "``FlagBoundary`` controls how out-of-range values are handled " @@ -1031,7 +1102,7 @@ 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:805 +#: library/enum.rst:846 #, fuzzy msgid "" "Out-of-range values cause a :exc:`ValueError` to be raised. This is the " @@ -1040,7 +1111,7 @@ 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:823 +#: library/enum.rst:864 #, fuzzy msgid "" "Out-of-range values have invalid values removed, leaving a " @@ -1049,7 +1120,7 @@ msgstr "" "Les valeurs hors plage, invalides, sont supprimées laissant une valeur " "*Flag* valide ::" -#: library/enum.rst:837 +#: library/enum.rst:878 #, fuzzy msgid "" "Out-of-range values lose their :class:`Flag` membership and revert " @@ -1058,7 +1129,7 @@ msgstr "" "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:850 +#: library/enum.rst:891 #, fuzzy msgid "" "Out-of-range values are kept, and the :class:`Flag` membership is kept. This " @@ -1067,7 +1138,7 @@ 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:866 +#: 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 " @@ -1077,7 +1148,7 @@ msgid "" "correctly." msgstr "" -#: library/enum.rst:873 +#: 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 " @@ -1085,16 +1156,16 @@ msgid "" "like :meth:`|= `." msgstr "" -#: library/enum.rst:880 +#: library/enum.rst:921 #, fuzzy msgid "A list of member names." msgstr "Liste des valeurs précédentes." -#: library/enum.rst:887 +#: library/enum.rst:930 msgid "Supported ``__dunder__`` names" msgstr "Noms de la forme ``__dunder__`` disponibles" -#: library/enum.rst:889 +#: library/enum.rst:932 #, fuzzy msgid "" ":attr:`~EnumType.__members__` is a read-only ordered mapping of " @@ -1103,35 +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:892 +#: 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:898 +#: library/enum.rst:941 msgid "Supported ``_sunder_`` names" msgstr "Noms de la forme ``_sunder_`` disponibles" -#: library/enum.rst:900 +#: library/enum.rst:943 #, fuzzy msgid ":attr:`~Enum._name_` -- name of the member" msgstr "``_name_`` — nom du membre" -#: library/enum.rst:901 +#: 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:902 +#: library/enum.rst:945 #, fuzzy msgid "" ":meth:`~Enum._missing_` -- a lookup function used when a value is not found; " @@ -1140,7 +1212,7 @@ msgstr "" "``_missing_`` — fonction de recherche appelée quand la valeur n'est pas " "trouvée ; elle peut être redéfinie" -#: library/enum.rst:904 +#: library/enum.rst:947 #, fuzzy msgid "" ":attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or " @@ -1151,7 +1223,7 @@ msgstr "" "d'une :func:`str`, qui ne sont pas convertis en membres et sont supprimés de " "la classe résultante" -#: library/enum.rst:907 +#: library/enum.rst:950 #, fuzzy msgid "" ":attr:`~Enum._order_` -- no longer used, kept for backward compatibility " @@ -1161,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:909 +#: library/enum.rst:953 #, fuzzy msgid "" ":meth:`~Enum._generate_next_value_` -- used to get an appropriate value for " @@ -1170,73 +1242,56 @@ 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:914 -#, 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:917 -#, 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:920 +#: library/enum.rst:956 msgid "" ":meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing " "member." msgstr "" -#: library/enum.rst:922 +#: library/enum.rst:958 msgid "" ":meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an " "existing member." msgstr "" -#: library/enum.rst:925 +#: 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:928 +#: library/enum.rst:964 msgid "" "``_repr_*`` (e.g. ``_repr_html_``), as used in `IPython's rich display`_" msgstr "" -#: library/enum.rst:930 +#: library/enum.rst:966 msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" msgstr "``_missing_``, ``_order_``, ``_generate_next_value_``" -#: library/enum.rst:931 +#: library/enum.rst:967 msgid "``_ignore_``" msgstr "``_ignore_``" -#: library/enum.rst:932 +#: library/enum.rst:968 msgid "``_add_alias_``, ``_add_value_alias_``, ``_repr_*``" msgstr "" -#: library/enum.rst:938 -msgid "Utilities and Decorators" +#: library/enum.rst:974 +#, fuzzy +msgid "Utilities and decorators" msgstr "Utilitaires et décorateurs" -#: library/enum.rst:942 +#: 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` " +"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; for :class:`StrEnum` it will be the lower-cased version of " -"the member's name. Care must be taken if mixing *auto()* with manually " +"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 " @@ -1246,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:950 +#: 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:952 +#: library/enum.rst:989 msgid "``FIRST = auto()`` will work (auto() is replaced with ``1``);" msgstr "" -#: library/enum.rst:953 +#: 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:955 +#: 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:960 +#: 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:963 +#: library/enum.rst:1000 msgid "" "``_generate_next_value_`` can be overridden to customize the values used by " "*auto*." @@ -1281,14 +1337,14 @@ msgstr "" "``_generate_next_value_`` peut être surchargée pour personnaliser les " "valeurs produites par *auto*." -#: library/enum.rst:966 +#: 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:972 +#: 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 " @@ -1298,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:976 +#: 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``." @@ -1310,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:985 +#: library/enum.rst:1022 #, fuzzy msgid "" "A :keyword:`class` decorator specifically for enumerations. It searches an " @@ -1322,7 +1379,7 @@ msgstr "" "synonymes ; s'il en trouve, l'exception :exc:`ValueError` est levée avec des " "détails ::" -#: library/enum.rst:1003 +#: library/enum.rst:1040 msgid "" "A :keyword:`class` decorator specifically for enumerations. Members " "from :class:`EnumCheck` are used to specify which constraints should be " @@ -1332,18 +1389,18 @@ msgstr "" "pour spécifier quelles contraintes doivent être vérifiées par les membres de " "l':class:`EnumCheck` décorée." -#: library/enum.rst:1011 +#: 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:1017 +#: 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:1023 +#: 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 " @@ -1351,19 +1408,19 @@ msgid "" "namespace (see :class:`re.RegexFlag` for an example)." msgstr "" -#: library/enum.rst:1033 +#: library/enum.rst:1070 msgid "Return a list of all power-of-two integers contained in a flag *value*." msgstr "" -#: library/enum.rst:1040 +#: library/enum.rst:1091 msgid "Notes" msgstr "Notes" -#: library/enum.rst:1042 +#: library/enum.rst:1093 msgid ":class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag`" msgstr ":class:`IntEnum`, :class:`StrEnum` et :class:`IntFlag`" -#: library/enum.rst:1044 +#: 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:" @@ -1372,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:1047 +#: 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:1049 +#: library/enum.rst:1100 msgid "" "``__format__``, because it uses ``__str__``, will also use the value of the " "enum member instead of its name" @@ -1384,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:1052 +#: 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::" @@ -1392,7 +1449,7 @@ 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:1059 +#: 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 " @@ -2323,23 +2380,6 @@ msgstr "" #~ 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" diff --git a/library/exceptions.po b/library/exceptions.po index af8f5a4b66..ccf08dc892 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: 2025-10-17 09:58+0200\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" @@ -362,7 +362,7 @@ msgstr "Ajout des attributs :attr:`name` et :attr:`obj`." #, fuzzy msgid "" "Raised when the :func:`input` function hits an end-of-file condition (EOF) " -"without reading any data. (Note: the :meth:`!io.IOBase.read` " +"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 "" @@ -426,7 +426,13 @@ msgstr "" "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:272 +#: 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 " @@ -436,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:281 +#: library/exceptions.rst:287 msgid "" "Raised when a mapping (dictionary) key is not found in the set of existing " "keys." @@ -444,7 +450,7 @@ msgstr "" "Levée lorsqu'une clef (de dictionnaire) n'est pas trouvée dans l'ensemble " "des clefs existantes." -#: library/exceptions.rst:288 +#: 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 " @@ -459,7 +465,7 @@ msgstr "" "du code qui intercepte :exc:`Exception` et ainsi empêcher l'interpréteur de " "quitter." -#: library/exceptions.rst:296 +#: 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, " @@ -475,7 +481,7 @@ msgstr "" "possible ou d'éviter catégoriquement de la lever (voir :ref:`handlers-and-" "exceptions`)." -#: library/exceptions.rst:306 +#: 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 " @@ -495,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:317 +#: 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 " @@ -505,20 +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:321 +#: library/exceptions.rst:327 msgid "The optional *name* keyword-only argument sets the attribute:" msgstr "" -#: library/exceptions.rst:325 +#: 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:327 +#: library/exceptions.rst:333 msgid "Added the :attr:`name` attribute." msgstr "Ajout de l'attribut :attr:`name`." -#: library/exceptions.rst:333 +#: 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 " @@ -531,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:340 +#: 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 " @@ -542,7 +548,7 @@ 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:346 +#: library/exceptions.rst:352 #, fuzzy msgid "" ":exc:`!NotImplementedError` and :data:`!NotImplemented` are not " @@ -554,7 +560,7 @@ msgstr "" "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:357 +#: 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\" " @@ -565,7 +571,7 @@ msgstr "" "non trouvé\" ou \"disque plein\" (pas pour les types d'arguments illégaux ou " "d'autres erreurs accidentelles)." -#: library/exceptions.rst:361 +#: 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. " @@ -579,7 +585,7 @@ msgstr "" "l'attribut :attr:`~BaseException.args` contient seulement une paire avec les " "valeurs des deux premiers arguments du constructeur." -#: library/exceptions.rst:367 +#: 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 " @@ -593,11 +599,11 @@ 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:375 +#: 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:379 +#: 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 " @@ -607,7 +613,7 @@ msgstr "" "L'attribut :attr:`.errno` est alors une traduction approximative, en termes " "POSIX, de ce code d'erreur natif." -#: library/exceptions.rst:383 +#: 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 " @@ -619,7 +625,7 @@ msgstr "" "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:391 +#: library/exceptions.rst:397 #, fuzzy msgid "" "The corresponding error message, as provided by the operating system. It is " @@ -630,7 +636,7 @@ msgstr "" "d'exploitation. Il est formaté par les fonctions C :c:func:`perror` sous " "POSIX, et :c:func:`FormatMessage` sous Windows." -#: library/exceptions.rst:399 +#: 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 " @@ -645,7 +651,7 @@ msgstr "" "(comme :func:`os.rename`), :attr:`filename2` correspond au deuxième nom de " "fichier passé à la fonction." -#: library/exceptions.rst:406 +#: library/exceptions.rst:412 #, fuzzy msgid "" ":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket.error`, :exc:`select.error` " @@ -656,7 +662,7 @@ msgstr "" "et :exc:`mmap.error` ont fusionnées en :exc:`OSError`, et le constructeur " "peut renvoyer une sous-classe." -#: library/exceptions.rst:412 +#: 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 " @@ -669,7 +675,7 @@ msgstr "" "`. De plus, l'argument du " "constructeur et attribut *filename2* a été ajouté." -#: library/exceptions.rst:421 +#: library/exceptions.rst:427 #, fuzzy msgid "" "Raised when the result of an arithmetic operation is too large to be " @@ -687,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:431 +#: library/exceptions.rst:437 #, fuzzy msgid "" "This exception is derived from :exc:`RuntimeError`. It is raised when an " @@ -698,37 +704,49 @@ msgstr "" "l'interpréteur détecte que la profondeur de récursivité maximale " "(voir :func:`sys.getrecursionlimit`) est dépassée." -#: library/exceptions.rst:435 +#: library/exceptions.rst:441 msgid "" "Examples of operations which can be blocked with " "a :exc:`PythonFinalizationError` during the Python finalization:" msgstr "" -#: library/exceptions.rst:438 +#: library/exceptions.rst:444 msgid "Creating a new Python thread." msgstr "" -#: library/exceptions.rst:439 +#: library/exceptions.rst:445 msgid ":meth:`Joining ` a running daemon thread." msgstr "" -#: library/exceptions.rst:440 -msgid ":func:`os.fork`." +#: library/exceptions.rst:446 +msgid ":func:`os.fork`," +msgstr "" + +#: 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:442 +#: library/exceptions.rst:450 msgid "See also the :func:`sys.is_finalizing` function." msgstr "" -#: library/exceptions.rst:457 +#: library/exceptions.rst:470 msgid "Previously, a plain :exc:`RuntimeError` was raised." msgstr "Auparavant, une simple :exc:`RuntimeError` était levée." -#: library/exceptions.rst:449 +#: library/exceptions.rst:457 msgid ":meth:`threading.Thread.join` can now raise this exception." msgstr "" -#: library/exceptions.rst:453 +#: 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 " @@ -738,7 +756,7 @@ msgstr "" "l'interpréteur détecte que la profondeur de récursivité maximale " "(voir :func:`sys.getrecursionlimit`) est dépassée." -#: library/exceptions.rst:463 +#: 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 " @@ -751,7 +769,7 @@ msgstr "" "Pour plus d'informations sur les pointeurs faibles, voir le " "module :mod:`weakref`." -#: library/exceptions.rst:471 +#: 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 " @@ -761,7 +779,7 @@ 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:478 +#: library/exceptions.rst:491 msgid "" "Raised by built-in function :func:`next` and " "an :term:`iterator`\\'s :meth:`~iterator.__next__` method to signal that " @@ -771,7 +789,7 @@ msgstr "" "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:484 +#: library/exceptions.rst:497 #, fuzzy msgid "" "The exception object has a single attribute :attr:`!value`, which is given " @@ -782,7 +800,7 @@ msgstr "" "argument lors de la construction de l'exception, et vaut :const:`None` par " "défaut." -#: library/exceptions.rst:488 +#: 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 " @@ -794,7 +812,7 @@ msgstr "" "valeur retournée par la fonction est passée au paramètre :attr:`value` du " "constructeur de l'exception." -#: library/exceptions.rst:493 +#: 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` " @@ -804,7 +822,7 @@ msgstr "" "une :exc:`StopIteration`, elle est convertie en :exc:`RuntimeError` (en " "conservant :exc:`StopIteration` comme cause de la nouvelle exception)." -#: library/exceptions.rst:497 +#: library/exceptions.rst:510 msgid "" "Added ``value`` attribute and the ability for generator functions to use it " "to return a value." @@ -812,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:501 +#: library/exceptions.rst:514 msgid "" "Introduced the RuntimeError transformation via ``from __future__ import " "generator_stop``, see :pep:`479`." @@ -820,7 +838,7 @@ msgstr "" "Introduit la transformation des erreurs ``RuntimeError`` via ``from " "__future__ import generator_stop``, cf. :pep:`479`." -#: library/exceptions.rst:505 +#: 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`." @@ -829,7 +847,7 @@ msgstr "" "erreur :exc:`StopIteration` est levée dans un générateur elle est " "transformée en une :exc:`RuntimeError`." -#: library/exceptions.rst:511 +#: library/exceptions.rst:524 #, fuzzy msgid "" "Must be raised by :meth:`~object.__anext__` method of an :term:`asynchronous " @@ -838,7 +856,7 @@ msgstr "" "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:518 +#: 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 " @@ -851,7 +869,7 @@ msgstr "" "la lecture du script initial ou de l'entrée standard (également de manière " "interactive)." -#: library/exceptions.rst:524 +#: 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." @@ -860,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:529 +#: 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:533 +#: 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." @@ -872,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:538 +#: 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." @@ -880,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:543 +#: 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:547 +#: 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." @@ -892,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:552 +#: 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." @@ -901,7 +919,7 @@ msgstr "" "L'indiçage commence à 1 : ``offset`` vaut 1 pour le premier caractère de la " "ligne." -#: library/exceptions.rst:555 +#: 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 " @@ -914,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:560 +#: 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:565 +#: library/exceptions.rst:578 msgid "" "Base class for syntax errors related to incorrect indentation. This is a " "subclass of :exc:`SyntaxError`." @@ -926,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:571 +#: library/exceptions.rst:584 msgid "" "Raised when indentation contains an inconsistent use of tabs and spaces. " "This is a subclass of :exc:`IndentationError`." @@ -934,7 +952,7 @@ 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:577 +#: library/exceptions.rst:590 #, fuzzy msgid "" "Raised when the interpreter finds an internal error, but the situation does " @@ -948,7 +966,7 @@ msgstr "" "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:583 +#: library/exceptions.rst:596 #, fuzzy msgid "" "If you're confident that this exception wasn't your fault, or the fault of a " @@ -965,7 +983,7 @@ msgstr "" "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:594 +#: library/exceptions.rst:607 #, fuzzy msgid "" "This exception is raised by the :func:`sys.exit` function. It inherits " @@ -991,7 +1009,7 @@ msgstr "" "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:605 +#: 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 " @@ -1008,7 +1026,7 @@ msgstr "" "de sortir immédiatement (par exemple, dans le processus enfant après un " "appel à :func:`os.fork`)." -#: library/exceptions.rst:614 +#: library/exceptions.rst:627 msgid "" "The exit status or error message that is passed to the constructor. " "(Defaults to ``None``.)" @@ -1016,7 +1034,7 @@ msgstr "" "L'état de sortie ou le message d'erreur passé au constructeur. (``None`` par " "défaut.)" -#: library/exceptions.rst:620 +#: 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 " @@ -1026,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:623 +#: 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 " @@ -1039,7 +1057,7 @@ msgstr "" "donnée mais n'a pas encore fourni une implémentation, " "lever :exc:`NotImplementedError` est plus approprié." -#: library/exceptions.rst:628 +#: 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 " @@ -1051,7 +1069,7 @@ msgstr "" "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:635 +#: 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 " @@ -1061,7 +1079,7 @@ msgstr "" "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:642 +#: library/exceptions.rst:655 msgid "" "Raised when a Unicode-related encoding or decoding error occurs. It is a " "subclass of :exc:`ValueError`." @@ -1069,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:645 +#: 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 " @@ -1079,33 +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:651 +#: 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:655 +#: 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:659 +#: 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:663 +#: 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:672 +#: 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:670 +#: 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:678 +#: library/exceptions.rst:691 msgid "" "Raised when a Unicode-related error occurs during encoding. It is a " "subclass of :exc:`UnicodeError`." @@ -1113,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:684 +#: library/exceptions.rst:697 msgid "" "Raised when a Unicode-related error occurs during decoding. It is a " "subclass of :exc:`UnicodeError`." @@ -1121,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:690 +#: library/exceptions.rst:703 msgid "" "Raised when a Unicode-related error occurs during translating. It is a " "subclass of :exc:`UnicodeError`." @@ -1129,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:696 +#: 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 " @@ -1139,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:703 +#: 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 " @@ -1149,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:708 +#: 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`." @@ -1157,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:717 +#: library/exceptions.rst:730 msgid "Only available on Windows." msgstr "Seulement disponible sous Windows." -#: library/exceptions.rst:721 +#: library/exceptions.rst:734 msgid "OS exceptions" msgstr "Exceptions système" -#: library/exceptions.rst:723 +#: library/exceptions.rst:736 msgid "" "The following exceptions are subclasses of :exc:`OSError`, they get raised " "depending on the system error code." @@ -1173,7 +1191,7 @@ 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:728 +#: library/exceptions.rst:741 #, fuzzy msgid "" "Raised when an operation would block on an object (e.g. socket) set for non-" @@ -1186,7 +1204,7 @@ msgstr "" "à :c:data:`errno` :py:data:`~errno.EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno.EWOULDBLOCK` " "et :py:data:`~errno.EINPROGRESS`." -#: library/exceptions.rst:733 +#: library/exceptions.rst:746 msgid "" "In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can have one " "more attribute:" @@ -1194,17 +1212,18 @@ msgstr "" "En plus de ceux de :exc:`OSError`, :exc:`BlockingIOError` peut avoir un " "attribut de plus :" -#: library/exceptions.rst:738 +#: 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:744 +#: library/exceptions.rst:757 #, fuzzy msgid "" "Raised when an operation on a child process failed. Corresponds " @@ -1213,11 +1232,11 @@ msgstr "" "Levée lorsqu'une opération sur un processus enfant a échoué. Correspond " "à :c:data:`errno` :py:data:`~errno.ECHILD`." -#: library/exceptions.rst:749 +#: 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:751 +#: library/exceptions.rst:764 msgid "" "Subclasses " "are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:`ConnectionRefusedError` " @@ -1227,7 +1246,7 @@ msgstr "" "sont :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:`ConnectionRefusedError` " "et :exc:`ConnectionResetError`." -#: library/exceptions.rst:756 +#: library/exceptions.rst:769 #, fuzzy msgid "" "A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " @@ -1241,7 +1260,7 @@ msgstr "" "Correspond à :c:data:`errno` :py:data:`~errno.EPIPE` " "et :py:data:`~errno.ESHUTDOWN`." -#: library/exceptions.rst:763 +#: library/exceptions.rst:776 #, fuzzy msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " @@ -1252,7 +1271,7 @@ msgstr "" "connexion est interrompue par le pair. Correspond " "à :c:data:`errno` :py:data:`~errno.ECONNABORTED`." -#: library/exceptions.rst:769 +#: library/exceptions.rst:782 #, fuzzy msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " @@ -1263,7 +1282,7 @@ msgstr "" "connexion est refusée par le pair. Correspond " "à :c:data:`errno` :py:data:`~errno.ECONNREFUSED`." -#: library/exceptions.rst:775 +#: library/exceptions.rst:788 #, fuzzy msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " @@ -1273,7 +1292,7 @@ msgstr "" "réinitialisée par le pair. Correspond " "à :c:data:`errno` :py:data:`~errno.ECONNRESET`." -#: library/exceptions.rst:781 +#: library/exceptions.rst:794 #, fuzzy msgid "" "Raised when trying to create a file or directory which already exists. " @@ -1282,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:786 +#: library/exceptions.rst:799 #, fuzzy msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " @@ -1291,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:791 +#: library/exceptions.rst:804 #, fuzzy msgid "" "Raised when a system call is interrupted by an incoming signal. Corresponds " @@ -1300,7 +1319,7 @@ 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:794 +#: 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 " @@ -1310,7 +1329,7 @@ msgstr "" "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:801 +#: library/exceptions.rst:814 #, fuzzy msgid "" "Raised when a file operation (such as :func:`os.remove`) is requested on a " @@ -1320,7 +1339,7 @@ msgstr "" "demandée sur un répertoire. Correspond " "à :c:data:`errno` :py:data:`~errno.EISDIR`." -#: library/exceptions.rst:807 +#: library/exceptions.rst:820 #, fuzzy msgid "" "Raised when a directory operation (such as :func:`os.listdir`) is requested " @@ -1335,7 +1354,7 @@ 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:815 +#: library/exceptions.rst:828 #, fuzzy msgid "" "Raised when trying to run an operation without the adequate access rights - " @@ -1347,13 +1366,13 @@ msgstr "" "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:820 +#: library/exceptions.rst:833 msgid "" "WASI's :py:const:`~errno.ENOTCAPABLE` is now mapped " "to :exc:`PermissionError`." msgstr "" -#: library/exceptions.rst:826 +#: library/exceptions.rst:839 #, fuzzy msgid "" "Raised when a given process doesn't exist. Corresponds " @@ -1362,7 +1381,7 @@ msgstr "" "Levée lorsqu'un processus donné n'existe pas. Correspond " "à :c:data:`errno` :py:data:`~errno.ESRCH`." -#: library/exceptions.rst:831 +#: library/exceptions.rst:844 #, fuzzy msgid "" "Raised when a system function timed out at the system level. Corresponds " @@ -1371,19 +1390,19 @@ msgstr "" "Levée lorsqu'une fonction système a expiré au niveau système. Correspond " "à :c:data:`errno` :py:data:`~errno.ETIMEDOUT`." -#: library/exceptions.rst:834 +#: 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:840 +#: 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:846 +#: library/exceptions.rst:859 msgid "Warnings" msgstr "Avertissements" -#: library/exceptions.rst:848 +#: library/exceptions.rst:861 msgid "" "The following exceptions are used as warning categories; see " "the :ref:`warning-categories` documentation for more details." @@ -1391,15 +1410,15 @@ msgstr "" "Les exceptions suivantes sont utilisées comme catégories d'avertissement ; " "voir :mod:`warning-categories` pour plus d'informations." -#: library/exceptions.rst:853 +#: library/exceptions.rst:866 msgid "Base class for warning categories." msgstr "Classe mère pour les catégories d'avertissement." -#: library/exceptions.rst:858 +#: 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:863 +#: library/exceptions.rst:876 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for other Python developers." @@ -1407,7 +1426,7 @@ 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:866 +#: 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 " @@ -1417,11 +1436,11 @@ msgstr "" "``__main__`` (:pep:`565`). Activer le :ref:`mode de développement de Python " "` affiche cet avertissement." -#: library/exceptions.rst:886 +#: 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:875 +#: 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." @@ -1430,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:879 +#: 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 " @@ -1440,7 +1459,7 @@ msgstr "" "d’une obsolescence à venir est inhabituel, et :exc:`DeprecationWarning` est " "préféré pour les obsolescences actuelles." -#: library/exceptions.rst:912 library/exceptions.rst:939 +#: library/exceptions.rst:925 library/exceptions.rst:952 msgid "" "Ignored by the default warning filters. Enabling the :ref:`Python " "Development Mode ` shows this warning." @@ -1448,23 +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:891 +#: 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:893 +#: 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:899 +#: 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:904 +#: 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." @@ -1473,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:910 +#: 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:918 +#: 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:923 +#: 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:925 +#: 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:932 +#: 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`." -#: library/exceptions.rst:937 +#: 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:948 +#: library/exceptions.rst:961 #, fuzzy msgid "Exception groups" msgstr "Hiérarchie des exceptions" -#: library/exceptions.rst:950 +#: 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 " @@ -1517,7 +1536,7 @@ msgid "" "based on the types of the contained exceptions." msgstr "" -#: library/exceptions.rst:959 +#: 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 " @@ -1528,7 +1547,7 @@ msgid "" "an :exc:`ExceptionGroup` but not :exc:`BaseExceptionGroup`." msgstr "" -#: library/exceptions.rst:967 +#: library/exceptions.rst:980 msgid "" "The :exc:`BaseExceptionGroup` constructor returns an :exc:`ExceptionGroup` " "rather than a :exc:`BaseExceptionGroup` if all contained exceptions " @@ -1538,23 +1557,36 @@ msgid "" "subclass." msgstr "" -#: library/exceptions.rst:976 +#: 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:998 msgid "The ``msg`` argument to the constructor. This is a read-only attribute." msgstr "" -#: library/exceptions.rst:980 +#: 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:985 +#: 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:988 +#: 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 " @@ -1563,7 +1595,7 @@ msgid "" "true for the exceptions that should be in the subgroup." msgstr "" -#: library/exceptions.rst:994 +#: library/exceptions.rst:1016 msgid "" "The nesting structure of the current exception is preserved in the result, " "as are the values of " @@ -1572,31 +1604,31 @@ msgid "" "from the result." msgstr "" -#: library/exceptions.rst:1001 +#: 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:1005 +#: library/exceptions.rst:1027 msgid "``condition`` can be any callable which is not a type object." msgstr "" -#: library/exceptions.rst:1010 +#: 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:1016 +#: 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:1019 +#: 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 " @@ -1604,7 +1636,7 @@ msgid "" "instances of the subclass rather than :exc:`ExceptionGroup`." msgstr "" -#: library/exceptions.rst:1025 +#: library/exceptions.rst:1047 msgid "" ":meth:`subgroup` and :meth:`split` copy " "the :attr:`~BaseException.__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException.__context__` " @@ -1613,7 +1645,7 @@ msgid "" "be updated by :meth:`derive`." msgstr "" -#: library/exceptions.rst:1058 +#: 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 " @@ -1622,18 +1654,18 @@ msgid "" "group's message from it. ::" msgstr "" -#: library/exceptions.rst:1073 +#: 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`." msgstr "" -#: library/exceptions.rst:1081 +#: library/exceptions.rst:1103 msgid "Exception hierarchy" msgstr "Hiérarchie des exceptions" -#: library/exceptions.rst:1083 +#: 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 :" diff --git a/library/faulthandler.po b/library/faulthandler.po index 25f663ad0e..0347fe0c8b 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: 2025-10-17 09:58+0200\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" @@ -62,96 +62,103 @@ 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." 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:119 library/faulthandler.rst:190 +#: 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:76 +#: library/faulthandler.rst:81 msgid "Dump the C stack trace of the current thread into *file*." msgstr "" -#: library/faulthandler.rst:78 +#: 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:85 +#: library/faulthandler.rst:90 msgid "C Stack Compatibility" msgstr "" -#: library/faulthandler.rst:87 +#: 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:91 +#: 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 " @@ -159,17 +166,17 @@ msgid "" "stacks." msgstr "" -#: library/faulthandler.rst:97 +#: 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:101 +#: library/faulthandler.rst:106 msgid "Fault handler state" msgstr "" -#: library/faulthandler.rst:105 +#: 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` " @@ -178,54 +185,59 @@ msgid "" "Otherwise, dump only the current thread." msgstr "" -#: library/faulthandler.rst:112 +#: library/faulthandler.rst:117 msgid "" "The *file* must be kept open until the fault handler is disabled: " "see :ref:`issue with file descriptors `." msgstr "" -#: library/faulthandler.rst:115 +#: 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:122 +#: 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:125 +#: 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:129 +#: library/faulthandler.rst:136 msgid "" "Only the current thread is dumped if the :term:`GIL` is disabled to prevent " "the risk of data races." msgstr "" -#: library/faulthandler.rst:133 +#: library/faulthandler.rst:140 msgid "The dump now displays the C stack trace if *c_stack* is true." msgstr "" -#: library/faulthandler.rst:138 +#: library/faulthandler.rst:148 msgid "" "Disable the fault handler: uninstall the signal handlers installed " "by :func:`enable`." msgstr "" -#: library/faulthandler.rst:143 +#: library/faulthandler.rst:153 msgid "Check if the fault handler is enabled." msgstr "" -#: library/faulthandler.rst:147 +#: library/faulthandler.rst:157 msgid "Dumping the tracebacks after a timeout" msgstr "" -#: library/faulthandler.rst:151 +#: 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``, " @@ -233,62 +245,63 @@ msgid "" "(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." +"has a sub-second resolution. *max_threads* caps the number of threads dumped." msgstr "" -#: library/faulthandler.rst:159 +#: 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 " "descriptors `." msgstr "" -#: library/faulthandler.rst:163 +#: library/faulthandler.rst:173 msgid "This function is implemented using a watchdog thread." msgstr "" -#: library/faulthandler.rst:168 +#: library/faulthandler.rst:178 msgid "This function is now always available." msgstr "" -#: library/faulthandler.rst:173 +#: library/faulthandler.rst:186 msgid "Cancel the last call to :func:`dump_traceback_later`." msgstr "" -#: library/faulthandler.rst:177 +#: library/faulthandler.rst:190 msgid "Dumping the traceback on a user signal" msgstr "" -#: library/faulthandler.rst:181 +#: 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:185 +#: 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 `." msgstr "" -#: library/faulthandler.rst:199 +#: library/faulthandler.rst:216 msgid "Not available on Windows." msgstr "" -#: library/faulthandler.rst:195 +#: 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:205 +#: library/faulthandler.rst:222 msgid "Issue with file descriptors" msgstr "" -#: library/faulthandler.rst:207 +#: 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 " @@ -297,11 +310,11 @@ msgid "" "Call these functions again each time that the file is replaced." msgstr "" -#: library/faulthandler.rst:215 +#: library/faulthandler.rst:232 msgid "Example" msgstr "Exemple" -#: library/faulthandler.rst:217 +#: 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 52d457cdda..bcacdbb3c8 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: 2025-10-17 09:58+0200\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,7 +19,7 @@ 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 " @@ -27,11 +27,11 @@ msgid "" "details." msgstr "" -#: library/fcntl.rst:21 +#: library/fcntl.rst:18 msgid "Availability" 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 " @@ -40,20 +40,20 @@ msgid "" "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), " @@ -62,29 +62,29 @@ msgid "" "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,35 +105,35 @@ 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:86 +#: library/fcntl.rst:83 msgid "The module defines the following functions:" msgstr "Le module définit les fonctions suivantes :" -#: library/fcntl.rst:91 +#: 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 " +"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:100 +#: 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:103 +#: 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 " @@ -141,34 +141,38 @@ msgid "" "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." +"the *arg* argument." msgstr "" -#: library/fcntl.rst:112 +#: library/fcntl.rst:109 msgid "If the :c:func:`fcntl` call fails, an :exc:`OSError` is raised." msgstr "" -#: library/fcntl.rst:115 +#: library/fcntl.rst:161 msgid "" -"If the type or the size of *arg* does not match the type or size of the " -"argument of the operation (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 1024 bytes), this is most likely to result " -"in a segmentation violation or a more subtle data corruption." +"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:122 +#: library/fcntl.rst:119 msgid "" "Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments " "``fd``, ``cmd``, ``arg``." msgstr "" -#: library/fcntl.rst:124 +#: library/fcntl.rst:121 msgid "" "Add support of arbitrary :term:`bytes-like objects `, not " "only :class:`bytes`." msgstr "" +#: library/fcntl.rst:125 +msgid "The size of bytes-like objects is no longer limited to 1024 bytes." +msgstr "" + #: library/fcntl.rst:131 msgid "" "This function is identical to the :func:`~fcntl.fcntl` function, except that " @@ -213,33 +217,29 @@ msgid "" "If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised." msgstr "" -#: 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 1024 bytes, or the size of the mutable bytes-like object is " -"too small), this is most likely to result in a segmentation violation or a " -"more subtle data corruption." -msgstr "" - -#: library/fcntl.rst:169 +#: library/fcntl.rst:168 msgid "An example::" msgstr "Un exemple ::" -#: library/fcntl.rst:182 +#: library/fcntl.rst:181 msgid "" "Raises an :ref:`auditing event ` ``fcntl.ioctl`` with arguments " "``fd``, ``request``, ``arg``." msgstr "" -#: library/fcntl.rst:184 +#: 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:190 +#: 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 " @@ -247,18 +247,18 @@ msgid "" "function is emulated using :c:func:`fcntl`.)" msgstr "" -#: library/fcntl.rst:195 +#: library/fcntl.rst:198 msgid "" "If the :c:func:`flock` call fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:197 +#: library/fcntl.rst:200 msgid "" "Raises an :ref:`auditing event ` ``fcntl.flock`` with arguments " "``fd``, ``operation``." msgstr "" -#: library/fcntl.rst:202 +#: 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 " @@ -266,25 +266,25 @@ msgid "" "or unlock, and *cmd* is one of the following values:" msgstr "" -#: library/fcntl.rst:209 +#: library/fcntl.rst:212 msgid "Release an existing lock." msgstr "" -#: library/fcntl.rst:213 +#: library/fcntl.rst:216 msgid "Acquire a shared lock." msgstr "" -#: library/fcntl.rst:217 +#: library/fcntl.rst:220 msgid "Acquire an exclusive lock." msgstr "" -#: library/fcntl.rst:221 +#: 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:224 +#: 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* " @@ -294,43 +294,43 @@ msgid "" "descriptor refers to a file opened for writing." msgstr "" -#: library/fcntl.rst:231 +#: 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:" msgstr "" -#: library/fcntl.rst:235 +#: library/fcntl.rst:238 msgid "``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)" msgstr "" -#: library/fcntl.rst:236 +#: library/fcntl.rst:239 msgid "``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)" msgstr "" -#: library/fcntl.rst:237 +#: library/fcntl.rst:240 msgid "``2`` -- relative to the end of the file (:const:`os.SEEK_END`)" msgstr "" -#: library/fcntl.rst:239 +#: 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:243 +#: library/fcntl.rst:246 msgid "" "Raises an :ref:`auditing event ` ``fcntl.lockf`` with arguments " "``fd``, ``cmd``, ``len``, ``start``, ``whence``." msgstr "" -#: library/fcntl.rst:245 +#: library/fcntl.rst:248 msgid "Examples (all on a SVR4 compliant system)::" msgstr "" -#: library/fcntl.rst:255 +#: 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. " @@ -338,11 +338,11 @@ msgid "" "therefore using the :func:`flock` call may be better." msgstr "" -#: library/fcntl.rst:263 +#: library/fcntl.rst:266 msgid "Module :mod:`os`" msgstr "Module :mod:`os`" -#: library/fcntl.rst:264 +#: 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 6197eccd31..3ff73c9e8d 100644 --- a/library/filecmp.po +++ b/library/filecmp.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+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" @@ -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,7 +73,7 @@ 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 " @@ -82,7 +84,7 @@ msgstr "" "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,7 +109,7 @@ 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`." @@ -115,7 +117,7 @@ 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,11 +137,11 @@ 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* " @@ -152,7 +154,7 @@ msgstr "" "à :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 6053f9f98a..43673b47ff 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: 2025-10-17 09:58+0200\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,7 +54,7 @@ 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` " @@ -67,13 +67,13 @@ msgstr "" "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`." -#: 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 " @@ -139,7 +139,7 @@ msgstr "" "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 " @@ -150,21 +150,21 @@ msgstr "" "*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` " @@ -174,7 +174,7 @@ msgstr "" "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``." @@ -182,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``." @@ -191,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 " @@ -202,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, " @@ -212,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``." @@ -220,7 +220,7 @@ 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``." @@ -228,7 +228,7 @@ msgstr "" "``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 " @@ -246,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:" @@ -260,7 +260,7 @@ 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 " @@ -280,7 +280,7 @@ msgstr "" "é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 +#: library/fileinput.rst:151 #, fuzzy msgid "" "With *mode* you can specify which file mode will be passed to :func:`open`. " @@ -290,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. " @@ -301,13 +301,13 @@ 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 " @@ -317,18 +317,18 @@ msgstr "" "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, " @@ -353,13 +353,13 @@ msgstr "" "sauvegarde, il est écrasé. Le filtrage sur place ne fait rien pour l'entrée " "standard." -#: library/fileinput.rst:196 +#: 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` " @@ -372,13 +372,13 @@ msgstr "" "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 = " @@ -387,7 +387,7 @@ msgstr "" "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,7 +396,7 @@ 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\", " @@ -406,11 +406,11 @@ msgstr "" "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." diff --git a/library/filesys.po b/library/filesys.po index ec13874873..20298fa9ca 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 e744881160..6fffa03e59 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: 2025-10-17 09:58+0200\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" @@ -175,20 +175,21 @@ msgstr "" #, fuzzy msgid "" "Return the shell-style pattern *pat* converted to a regular expression for " -"using with :func:`re.match`. The pattern is expected to be a :class:`str`." +"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:108 +#: library/fnmatch.rst:109 msgid "Example:" msgstr "Exemple :" -#: library/fnmatch.rst:122 +#: library/fnmatch.rst:123 msgid "Module :mod:`glob`" msgstr "Module :mod:`glob`" -#: library/fnmatch.rst:123 +#: 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 aa51940e82..ce20f120f4 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: 2025-10-17 09:58+0200\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,18 +21,19 @@ 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 rational numbers, from " @@ -41,7 +42,7 @@ 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 +#: 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 " @@ -49,7 +50,7 @@ msgid "" "it raises a :exc:`ZeroDivisionError`." msgstr "" -#: library/fractions.rst:31 +#: library/fractions.rst:28 #, fuzzy msgid "" "The second version requires that *number* is an instance " @@ -79,13 +80,13 @@ msgstr "" "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:48 +#: library/fractions.rst:45 #, fuzzy msgid "" "where the optional ``sign`` may be either '+' or '-' and ``numerator`` and " @@ -103,7 +104,7 @@ msgstr "" "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:83 +#: library/fractions.rst:80 #, fuzzy msgid "" "The :class:`Fraction` class inherits from the abstract base " @@ -118,7 +119,7 @@ msgstr "" "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:89 +#: library/fractions.rst:86 msgid "" "The :class:`Fraction` constructor now accepts :class:`float` " "and :class:`decimal.Decimal` instances." @@ -126,7 +127,7 @@ msgstr "" "Le constructeur de :class:`Fraction` accepte maintenant des instances " "de :class:`float` et :class:`decimal.Decimal`." -#: library/fractions.rst:93 +#: library/fractions.rst:90 #, fuzzy msgid "" "The :func:`math.gcd` function is now used to normalize the *numerator* and " @@ -138,37 +139,37 @@ msgstr "" "type :class:`int`. Auparavant, le type du PGCD dépendait du *numerator* et " "du *denominator*." -#: library/fractions.rst:98 +#: 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:102 +#: library/fractions.rst:99 msgid "" ":class:`Fraction` implements ``__int__`` now to satisfy " "``typing.SupportsInt`` instance checks." msgstr "" -#: library/fractions.rst:106 +#: library/fractions.rst:103 msgid "" "Space is allowed around the slash for string inputs: ``Fraction('2 / 3')``." msgstr "" -#: library/fractions.rst:109 +#: 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:114 +#: 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:118 +#: library/fractions.rst:115 #, fuzzy msgid "" "The :class:`Fraction` constructor now accepts any objects with the :meth:`!" @@ -177,16 +178,16 @@ msgstr "" "Le constructeur de :class:`Fraction` accepte maintenant des instances " "de :class:`float` et :class:`decimal.Decimal`." -#: library/fractions.rst:124 +#: library/fractions.rst:121 msgid "Numerator of the Fraction in lowest term." msgstr "Numérateur de la fraction irréductible." -#: library/fractions.rst:128 +#: 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:134 +#: library/fractions.rst:131 #, fuzzy msgid "" "Return a tuple of two integers, whose ratio is equal to the original " @@ -195,11 +196,11 @@ 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:142 +#: library/fractions.rst:139 msgid "Return ``True`` if the Fraction is an integer." msgstr "" -#: library/fractions.rst:148 +#: 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 " @@ -210,7 +211,7 @@ msgstr "" "de :class:`numbers.Integral`. Attention, ``Fraction.from_float(0.3)`` est " "différent de ``Fraction(3, 10)``." -#: library/fractions.rst:154 +#: library/fractions.rst:151 msgid "" "From Python 3.2 onwards, you can also construct a :class:`Fraction` instance " "directly from a :class:`float`." @@ -218,7 +219,7 @@ msgstr "" "Depuis Python 3.2, vous pouvez aussi construire une instance " "de :class:`Fraction` directement depuis un :class:`float`." -#: library/fractions.rst:160 +#: library/fractions.rst:157 msgid "" "Alternative constructor which only accepts instances " "of :class:`decimal.Decimal` or :class:`numbers.Integral`." @@ -226,7 +227,7 @@ msgstr "" "Ce constructeur alternatif accepte (uniquement) les instances " "de :class:`decimal.Decimal` ou :class:`numbers.Integral`." -#: library/fractions.rst:165 +#: 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." @@ -235,7 +236,7 @@ msgstr "" "de :class:`Fraction` directement depuis une instance " "de :class:`decimal.Decimal`." -#: library/fractions.rst:172 +#: library/fractions.rst:169 msgid "" "Alternative constructor which only accepts instances " "of :class:`numbers.Integral`, :class:`numbers.Rational`, :class:`float` " @@ -243,7 +244,7 @@ msgid "" "method, but not strings." msgstr "" -#: library/fractions.rst:182 +#: 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 " @@ -253,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:190 +#: 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:203 +#: library/fractions.rst:200 msgid "" "Returns the greatest :class:`int` ``<= self``. This method can also be " "accessed through the :func:`math.floor` function:" @@ -265,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:213 +#: library/fractions.rst:210 msgid "" "Returns the least :class:`int` ``>= self``. This method can also be " "accessed through the :func:`math.ceil` function." @@ -273,7 +274,7 @@ 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:220 +#: 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 " @@ -288,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:228 +#: 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 `." msgstr "" -#: library/fractions.rst:232 +#: 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'`` " @@ -307,7 +308,7 @@ msgid "" "exact integer. The zero-fill flag ``'0'`` is not supported." msgstr "" -#: library/fractions.rst:242 +#: 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 " @@ -315,15 +316,15 @@ msgid "" "type in the :ref:`formatspec` section." msgstr "" -#: library/fractions.rst:247 +#: library/fractions.rst:244 msgid "Here are some examples::" msgstr "Voici quelques exemples ::" -#: library/fractions.rst:271 +#: library/fractions.rst:268 msgid "Module :mod:`numbers`" msgstr "Module :mod:`numbers`" -#: library/fractions.rst:272 +#: 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." diff --git a/library/ftplib.po b/library/ftplib.po index 482c04202e..29de1a5b3d 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: 2025-10-17 09:58+0200\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" @@ -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 @@ -512,46 +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`)." 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." @@ -559,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." @@ -567,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 " @@ -577,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 " @@ -585,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 cedd3a0849..3cae274143 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: 2025-10-17 09:58+0200\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,371 +28,381 @@ 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 " @@ -403,7 +413,7 @@ msgstr "" "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__()``." @@ -412,13 +422,13 @@ msgstr "" "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,7 +436,7 @@ 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." @@ -435,14 +445,14 @@ msgstr "" "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 " @@ -454,7 +464,7 @@ msgstr "" "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,7 +472,7 @@ 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 " @@ -475,7 +485,7 @@ 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 " @@ -488,7 +498,7 @@ msgstr "" "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." @@ -496,11 +506,16 @@ msgstr "" "Vous pouvez contrôler l'affichage du préfixe ``\"0b\"`` à l'aide d'un des " "moyens suivants." -#: library/functions.rst:948 library/functions.rst:1332 +#: 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 " @@ -517,11 +532,11 @@ msgstr "" "(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:813 +#: 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 " @@ -545,7 +560,7 @@ msgstr "" "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. " @@ -555,7 +570,7 @@ msgstr "" "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." @@ -563,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``." @@ -571,7 +586,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``builtins.breakpoint`` avec " "l'argument ``breakpointhook``." -#: library/functions.rst:189 +#: 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 " @@ -584,7 +599,7 @@ msgstr "" "dans :ref:`typesseq-mutable`, ainsi que la plupart des méthodes de la " "classe :class:`bytes`, voir :ref:`bytes-methods`." -#: library/functions.rst:194 +#: library/functions.rst:198 msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" @@ -593,7 +608,7 @@ msgstr "" "tableau de plusieurs façons :" # énumération -#: library/functions.rst:197 +#: 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 " @@ -604,7 +619,7 @@ msgstr "" "convertit ensuite la chaîne en octets *via* la méthode :meth:`str.encode` ;" # énumération -#: library/functions.rst:201 +#: library/functions.rst:205 msgid "" "If it is an *integer*, the array will have that size and will be initialized " "with null bytes." @@ -613,7 +628,7 @@ msgstr "" "*null* ;" # énumération -#: library/functions.rst:204 +#: 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 " @@ -623,7 +638,7 @@ msgstr "" "tampon en lecture seule de l'objet est utilisé pour initialiser le tableau ;" # énumération -#: library/functions.rst:207 +#: 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." @@ -632,15 +647,15 @@ msgstr "" "l'intervalle ``0 <= x < 256``, qui sont utilisés pour initialiser le contenu " "du tableau." -#: library/functions.rst:210 +#: 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:212 +#: library/functions.rst:216 msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "Voir :ref:`binaryseq` et :ref:`typebytearray`." -#: library/functions.rst:220 +#: 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 " @@ -652,25 +667,25 @@ 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:225 +#: 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`." -#: library/functions.rst:227 +#: 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`." -#: library/functions.rst:229 +#: 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:234 +#: 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 " @@ -688,7 +703,7 @@ msgstr "" "méthode :meth:`~object.__call__`." # suit un : -#: library/functions.rst:240 +#: library/functions.rst:244 msgid "" "This function was first removed in Python 3.0 and then brought back in " "Python 3.2." @@ -696,7 +711,7 @@ 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:247 +#: library/functions.rst:251 #, fuzzy msgid "" "Return the string representing a character with the specified Unicode code " @@ -708,7 +723,7 @@ msgstr "" "de caractères ``'a'``, tandis que ``chr(8364)`` renvoie ``'€'``. Il s'agit " "de la réciproque de :func:`ord`." -#: library/functions.rst:251 +#: library/functions.rst:255 #, fuzzy msgid "" "The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " @@ -718,11 +733,11 @@ msgstr "" "(``0x10FFFF`` en base 16). Une exception :exc:`ValueError` est levée si *i* " "est en dehors de l'intervalle." -#: library/functions.rst:257 +#: 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:259 +#: 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 " @@ -732,7 +747,7 @@ msgstr "" "tout comme une méthode d'instance reçoit l'instance. Voici comment déclarer " "une méthode de classe ::" -#: library/functions.rst:267 +#: library/functions.rst:271 msgid "" "The ``@classmethod`` form is a function :term:`decorator` -- " "see :ref:`function` for details." @@ -740,7 +755,7 @@ msgstr "" "La forme ``@classmethod`` est un :term:`décorateur ` de fonction " "— consultez :ref:`function` pour plus de détails." -#: library/functions.rst:270 +#: 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 " @@ -752,7 +767,7 @@ 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:275 +#: 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 " @@ -763,7 +778,7 @@ msgstr "" "de :func:`staticmethod` dans cette section. Voir aussi :ref:`types`." # suit un : -#: library/functions.rst:279 +#: library/functions.rst:283 msgid "" "Class methods can now wrap other :term:`descriptors ` such " "as :func:`property`." @@ -772,7 +787,7 @@ msgstr "" "` comme :func:`property`." # suit un : -#: library/functions.rst:283 +#: library/functions.rst:287 msgid "" "Class methods now inherit the method attributes " "(:attr:`~function.__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__doc__` " @@ -785,7 +800,7 @@ msgstr "" "``__wrapped__``." # suit un : -#: library/functions.rst:290 +#: library/functions.rst:294 msgid "" "Class methods can no longer wrap other :term:`descriptors ` such " "as :func:`property`." @@ -793,7 +808,7 @@ msgstr "" "les méthodes de classe ne peuvent plus encapsuler " "d'autres :term:`descripteurs ` comme :func:`property`." -#: library/functions.rst:297 +#: 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 " @@ -805,7 +820,7 @@ msgstr "" "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:302 +#: 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 (``''`` " @@ -815,7 +830,7 @@ msgstr "" "lu. Donnez quelque chose de reconnaissable lorsqu'il n'a pas été lu depuis " "un fichier (typiquement ``\"\"``)." -#: library/functions.rst:306 +#: 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 " @@ -829,7 +844,7 @@ msgstr "" "(dans ce dernier cas, les résultats d'expressions donnant autre chose que " "``None`` sont affichés)." -#: library/functions.rst:312 +#: library/functions.rst:318 msgid "" "The optional arguments *flags* and *dont_inherit* control " "which :ref:`compiler options ` should be activated and " @@ -854,7 +869,7 @@ msgstr "" "— les *flags* (instructions futures et options de compilation) valables pour " "le code encadrant *compile* sont ignorés." -#: library/functions.rst:323 +#: 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 " @@ -872,7 +887,7 @@ msgstr "" "Les :ref:`options du compilateur ` se trouvent dans le " "module :mod:`ast`, avec le préfixe ``PyCF_``." -#: library/functions.rst:331 +#: 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 " @@ -887,15 +902,22 @@ msgstr "" "``1`` (les ``assert`` sont supprimés, ``__debug__`` est ``False``) ou ``2`` " "(les chaines de documentation sont également supprimées)." -#: library/functions.rst:337 +#: library/functions.rst:343 msgid "" -"This function raises :exc:`SyntaxError` if the compiled source is invalid, " -"and :exc:`ValueError` if the source contains null bytes." +"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` 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:340 +#: library/functions.rst:350 msgid "" "If you want to parse Python code into its AST representation, " "see :func:`ast.parse`." @@ -903,7 +925,7 @@ msgstr "" "Si vous voulez transformer du code Python en sa représentation AST, " "voyez :func:`ast.parse`." -#: library/functions.rst:345 +#: library/functions.rst:355 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source`` and ``filename``. This event may also be raised by implicit " @@ -914,7 +936,7 @@ msgstr "" "compilation implicite." # suit un : -#: library/functions.rst:351 +#: 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 " @@ -927,7 +949,7 @@ msgstr "" "les instructions complètes et incomplètes dans le module :mod:`code`." # suit un : -#: library/functions.rst:358 +#: 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 " @@ -938,7 +960,7 @@ msgstr "" "Ceci est dû à limitation de la profondeur de la pile d'appels." # suit un : -#: library/functions.rst:362 +#: 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." @@ -948,7 +970,7 @@ msgstr "" "ligne. Ajout du paramètre *optimize*." # suit un : -#: library/functions.rst:366 +#: library/functions.rst:376 msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." @@ -956,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:370 +#: 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``." @@ -965,17 +987,23 @@ msgstr "" "pour permettre une gestion haut niveau de ``await``, ``async for`` et " "``async with``." -#: library/functions.rst:379 +# 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:756 library/functions.rst:1004 +#: library/functions.rst:779 library/functions.rst:1042 msgid "Examples:" msgstr "Exemples :" -#: library/functions.rst:403 +#: 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 " @@ -990,7 +1018,7 @@ msgid "" "after parentheses and leading and trailing whitespace characters are removed:" msgstr "" -#: library/functions.rst:422 +#: 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``, " @@ -1005,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:431 +#: 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 " @@ -1016,29 +1044,29 @@ msgid "" "number, only its real component is used in the above expressions." msgstr "" -#: library/functions.rst:441 +#: library/functions.rst:454 msgid "" "See also :meth:`complex.from_number` which only accepts a single numeric " "argument." msgstr "" -#: library/functions.rst:443 +#: 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:810 library/functions.rst:1052 +#: 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." @@ -1046,13 +1074,13 @@ msgstr "" "délègue à :meth:`~object.__index__` si :meth:`~object.__complex__` " "et :meth:`~object.__float__` ne sont pas définies." -#: library/functions.rst:454 +#: library/functions.rst:467 msgid "" "Passing a complex number as the *real* or *imag* argument is now deprecated; " "it should only be passed as a single positional argument." msgstr "" -#: library/functions.rst:461 +#: 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 " @@ -1066,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:474 +#: 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." @@ -1075,16 +1103,18 @@ msgstr "" "dictionnaire. Voir :class:`dict` et :ref:`typesmapping` pour vous documenter " "sur cette classe." -#: library/functions.rst:477 +#: 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:484 +#: 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 " @@ -1094,7 +1124,7 @@ msgstr "" "Avec un argument, elle essaye de donner une liste d'attributs valides pour " "cet objet." -#: library/functions.rst:487 +#: 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 " @@ -1107,7 +1137,7 @@ msgstr "" "implémentant :func:`~object.__getattr__` ou :func:`~object.__getattribute__` " "de personnaliser ce que renvoie :func:`dir`." -#: library/functions.rst:494 +#: 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__` " @@ -1121,7 +1151,7 @@ msgstr "" "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:500 +#: 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 " @@ -1132,7 +1162,7 @@ msgstr "" "pertinente plutôt qu'exhaustive :" # énumération -#: library/functions.rst:504 +#: library/functions.rst:517 msgid "" "If the object is a module object, the list contains the names of the " "module's attributes." @@ -1141,7 +1171,7 @@ msgstr "" "module ;" # énumération -#: library/functions.rst:507 +#: 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." @@ -1150,7 +1180,7 @@ msgstr "" "attributs et, récursivement, des attributs de ses parents ;" # énumération -#: library/functions.rst:510 +#: 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 " @@ -1160,12 +1190,12 @@ msgstr "" "attributs de la classe, et récursivement des attributs des parents de la " "classe." -#: library/functions.rst:514 +#: 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:534 +#: 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 " @@ -1179,7 +1209,7 @@ 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:544 +#: 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. " @@ -1200,7 +1230,7 @@ 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:556 +#: library/functions.rst:569 msgid "" "Return an enumerate object. *iterable* must be a sequence, " "an :term:`iterator`, or some other object which supports iteration. " @@ -1214,7 +1244,7 @@ msgstr "" "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:568 +#: library/functions.rst:581 msgid "Equivalent to::" msgstr "Équivalent à ::" @@ -1222,15 +1252,15 @@ msgstr "Équivalent à ::" msgid "Parameters" msgstr "Paramètres" -#: library/functions.rst:580 +#: library/functions.rst:593 msgid "A Python expression." msgstr "" -#: library/functions.rst:584 +#: library/functions.rst:597 msgid "The global namespace (default: ``None``)." msgstr "" -#: library/functions.rst:588 +#: library/functions.rst:601 msgid "The local namespace (default: ``None``)." msgstr "" @@ -1238,7 +1268,7 @@ msgstr "" msgid "Returns" msgstr "Renvoie" -#: library/functions.rst:592 +#: library/functions.rst:605 msgid "The result of the evaluated expression." msgstr "" @@ -1246,34 +1276,34 @@ msgstr "" msgid "raises" msgstr "" -#: library/functions.rst:593 +#: library/functions.rst:606 msgid "Syntax errors are reported as exceptions." msgstr "" -#: library/functions.rst:658 +#: 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:600 +#: 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. 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)." +"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)." msgstr "" "L'argument *expression* est analysé et évalué comme une expression Python " "(techniquement, une *condition list*) en utilisant les dictionnaires " @@ -1290,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:616 +#: library/functions.rst:630 #, fuzzy msgid "Example:" msgstr "Exemple ::" -#: library/functions.rst:622 +#: 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 " @@ -1307,7 +1337,7 @@ 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:627 +#: 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 " @@ -1319,7 +1349,7 @@ msgstr "" "renvoient respectivement les dictionnaires globaux et locaux, qui peuvent " "être utiles lors de l'usage de :func:`eval` et :func:`exec`." -#: library/functions.rst:632 +#: library/functions.rst:646 msgid "" "If the given source is a string, then leading and trailing spaces and tabs " "are stripped." @@ -1327,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:635 +#: 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:640 library/functions.rst:702 +#: 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." @@ -1345,17 +1376,21 @@ msgstr "" "comme argument. Les événements de compilation de code peuvent également être " "levés." -#: library/functions.rst:722 +#: library/functions.rst:741 msgid "The *globals* and *locals* arguments can now be passed as keywords." msgstr "" -#: library/functions.rst:726 +#: 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:661 +#: 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 " @@ -1380,7 +1415,7 @@ msgstr "" "pas être utilisés en dehors d'une fonction, même dans du code passé " "à :func:`exec`. La fonction renvoie ``None``." -#: library/functions.rst:672 +#: library/functions.rst:690 #, fuzzy msgid "" "In all cases, if the optional parts are omitted, the code is executed in the " @@ -1401,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:682 +#: 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 " @@ -1410,13 +1445,15 @@ msgid "" "are treated as class variables in a class definition)." msgstr "" -#: library/functions.rst:688 +#: 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`." +"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 " @@ -1424,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:694 +#: library/functions.rst:713 #, fuzzy msgid "" "The *closure* argument specifies a closure--a tuple of cellvars. It's only " @@ -1439,7 +1476,7 @@ msgstr "" "l'objet code." # suit un : -#: library/functions.rst:707 +#: library/functions.rst:726 #, fuzzy msgid "" "The built-in functions :func:`globals` and :func:`locals` return the current " @@ -1451,7 +1488,7 @@ msgstr "" "en deuxième et troisième argument de :func:`exec`." # suit un : -#: library/functions.rst:713 +#: library/functions.rst:732 #, fuzzy msgid "" "The default *locals* act as described for function :func:`locals` below. " @@ -1465,11 +1502,11 @@ msgstr "" "que :func:`exec` soit terminée." # suit un : -#: library/functions.rst:717 +#: library/functions.rst:736 msgid "Added the *closure* parameter." msgstr "ajout du paramètre *closure*." -#: library/functions.rst:732 +#: 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 " @@ -1482,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:738 +#: 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 " @@ -1494,7 +1531,7 @@ msgstr "" "``None``, et de ``(item for item in iterable if item)`` si *function* est " "``None``." -#: library/functions.rst:743 +#: library/functions.rst:766 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* is false." @@ -1502,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:754 +#: 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:771 +#: library/functions.rst:794 #, fuzzy msgid "" "If the argument is a string, it should contain a decimal number, optionally " @@ -1528,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:792 +#: library/functions.rst:815 #, fuzzy msgid "" "Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " @@ -1539,7 +1576,7 @@ msgstr "" "exemple, ``\"inf\"``, ``\"Inf\"``, ``\"INFINITY\"`` et ``\"iNfiNity\"`` sont " "toutes des orthographes valides pour un infini positif." -#: library/functions.rst:795 +#: library/functions.rst:818 #, fuzzy msgid "" "Otherwise, if the argument is an integer or a floating-point number, a " @@ -1553,7 +1590,7 @@ msgstr "" "dehors de l'intervalle d'un nombre a virgule flottante pour " "Python, :exc:`OverflowError` est levée." -#: library/functions.rst:800 +#: 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 " @@ -1563,21 +1600,21 @@ msgstr "" "``x.__float__()``. Si :meth:`~object.__float__` n'est pas défini alors il " "est délégué à :meth:`~object.__index__`." -#: library/functions.rst:804 +#: library/functions.rst:827 msgid "" "See also :meth:`float.from_number` which only accepts a numeric argument." msgstr "" -#: library/functions.rst:806 +#: library/functions.rst:829 msgid "If no argument is given, ``0.0`` is returned." msgstr "Sans argument, ``0.0`` est renvoyé." -#: library/functions.rst:808 +#: 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:816 +#: library/functions.rst:839 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " "defined." @@ -1585,7 +1622,7 @@ msgstr "" "délègue à :meth:`~object.__index__` si :meth:`~object.__float__` n'est pas " "définie." -#: library/functions.rst:826 +#: 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 " @@ -1597,7 +1634,7 @@ msgstr "" "valeur. Cependant, il existe une syntaxe standard utilisée par la plupart " "des types natifs : :ref:`formatspec`." -#: library/functions.rst:831 +#: library/functions.rst:854 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." @@ -1605,7 +1642,7 @@ 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:834 +#: library/functions.rst:857 #, fuzzy msgid "" "A call to ``format(value, format_spec)`` is translated to " @@ -1623,7 +1660,7 @@ msgstr "" "vide, ou si *format_spec* ou le résultat ne sont pas des chaînes de " "caractères." -#: library/functions.rst:841 +#: library/functions.rst:864 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." @@ -1631,7 +1668,29 @@ msgstr "" "``object().__format__(format_spec)`` lève :exc:`TypeError` si *format_spec* " "n'est pas une chaîne vide." -#: library/functions.rst:850 +#: 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` " @@ -1642,7 +1701,7 @@ msgstr "" "Voir :class:`frozenset` et :ref:`types-set` pour la documentation sur cette " "classe." -#: library/functions.rst:854 +#: library/functions.rst:892 msgid "" "For other containers see the built-" "in :class:`set`, :class:`list`, :class:`tuple`, and :class:`dict` classes, " @@ -1652,7 +1711,7 @@ msgstr "" "natives :class:`set`, :class:`list`, :class:`tuple`, et :class:`dict`, ainsi " "que le module :mod:`collections`." -#: library/functions.rst:862 +#: 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 " @@ -1670,7 +1729,7 @@ msgstr "" "identifiant Python (voir :func:`setattr`)." # suit un : -#: library/functions.rst:871 +#: library/functions.rst:909 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1682,7 +1741,7 @@ msgstr "" "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:879 +#: 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 " @@ -1692,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:886 +#: 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. " @@ -1704,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:894 +#: 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 " @@ -1718,7 +1777,7 @@ msgstr "" "pour ``1`` et ``1.0``)." # suit un : -#: library/functions.rst:901 +#: library/functions.rst:939 #, fuzzy msgid "" "For objects with custom :meth:`~object.__hash__` methods, note " @@ -1730,7 +1789,7 @@ msgstr "" "la machine hôte. Voir :meth:`__hash__ ` pour plus " "d'information." -#: library/functions.rst:908 +#: 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 " @@ -1747,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:915 +#: 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 " @@ -1760,7 +1819,7 @@ msgstr "" "plus d'informations, voir :ref:`La FAQ sur les arguments positionnels `." -#: library/functions.rst:920 +#: library/functions.rst:958 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" @@ -1768,7 +1827,7 @@ msgstr "" "module :mod:`site`." # suit un : -#: library/functions.rst:922 +#: 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." @@ -1776,7 +1835,7 @@ msgstr "" "les changements aux modules :mod:`pydoc` et :mod:`inspect` rendent les " "signatures des appelables plus compréhensibles et cohérentes." -#: library/functions.rst:929 +#: library/functions.rst:967 #, fuzzy msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " @@ -1787,7 +1846,7 @@ msgstr "" "pas un :class:`int`, il doit définir une méthode :meth:`~object.__index__` " "qui renvoie un entier. Quelques exemples :" -#: library/functions.rst:938 +#: 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 " @@ -1797,7 +1856,7 @@ msgstr "" "majuscule ou non, préfixée ou non, vous pouvez utiliser l'une des méthodes " "suivantes :" -#: library/functions.rst:950 +#: library/functions.rst:988 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." @@ -1806,7 +1865,7 @@ msgstr "" "(en affectant 16 à l'argument *base*)." # suit un : -#: library/functions.rst:955 +#: library/functions.rst:993 msgid "" "To obtain a hexadecimal string representation for a float, use " "the :meth:`float.hex` method." @@ -1814,7 +1873,7 @@ 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:961 +#: 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. " @@ -1826,11 +1885,11 @@ msgstr "" "de vie ne se chevauchent pas peuvent partager le même :func:`id`." # suit un : -#: library/functions.rst:966 +#: 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:968 +#: library/functions.rst:1006 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." @@ -1838,7 +1897,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``builtins.id`` avec l'argument " "``id``." -#: library/functions.rst:974 +#: 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, " @@ -1850,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:984 +#: 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." @@ -1858,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:989 +#: library/functions.rst:1027 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1866,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:994 +#: library/functions.rst:1032 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "the result after successfully reading input." @@ -1874,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:1001 +#: library/functions.rst:1039 #, fuzzy msgid "" "Return an integer object constructed from a number or a string, or return " @@ -1882,7 +1941,7 @@ msgid "" msgstr "" "Renvoie un nombre a virgule flottante depuis un nombre ou une chaîne *x*." -#: library/functions.rst:1021 +#: library/functions.rst:1059 #, fuzzy msgid "" "If the argument defines :meth:`~object.__int__`, ``int(x)`` returns " @@ -1897,7 +1956,7 @@ msgstr "" "*x* définit :meth:`~object.__trunc__`, ``int(x)`` renvoie ``x.__trunc__()``. " "Les nombres à virgule flottante sont tronqués vers zéro." -#: library/functions.rst:1026 +#: library/functions.rst:1064 #, fuzzy msgid "" "If the argument is not a number or if *base* is given, then it must be a " @@ -1913,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:1032 +#: 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 " @@ -1939,12 +1998,12 @@ msgstr "" "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:1043 +#: 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:1045 +#: 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 " @@ -1957,11 +2016,11 @@ msgstr "" "utilisaient :meth:`base.__int__ ` au lieu " "de :meth:`base.__index__ `." -#: library/functions.rst:1055 +#: library/functions.rst:1093 msgid "The first parameter is now positional-only." msgstr "" -#: library/functions.rst:1058 +#: library/functions.rst:1096 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " "defined." @@ -1969,7 +2028,7 @@ msgstr "" "Revient à :meth:`~object.__index__` si :meth:`~object.__int__` n'est pas " "définie." -#: library/functions.rst:1061 +#: library/functions.rst:1099 #, fuzzy msgid "" ":class:`int` string inputs and string representations can be limited to help " @@ -1988,13 +2047,13 @@ msgstr "" "entiers `." # suit un : -#: library/functions.rst:1069 +#: 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:1074 +#: 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 `." -#: library/functions.rst:1091 +#: 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 " @@ -2038,7 +2098,7 @@ msgstr "" "classe d'une partie de *classinfo*. Dans tous les autres cas, " "une :exc:`TypeError` est levée." -#: library/functions.rst:1106 +#: library/functions.rst:1144 #, fuzzy msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " @@ -2067,11 +2127,11 @@ msgstr "" "reçue est égale à *sentinel*, une :exc:`StopIteration` est levée, sinon la " "valeur est renvoyée." -#: library/functions.rst:1120 +#: library/functions.rst:1158 msgid "See also :ref:`typeiter`." msgstr "Voir aussi :ref:`typeiter`." -#: library/functions.rst:1122 +#: 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 " @@ -2081,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:1134 +#: 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 " @@ -2092,7 +2152,7 @@ msgstr "" "liste ou un intervalle) ou une collection (telle qu'un dictionnaire, un " "ensemble ou un ensemble figé)." -#: library/functions.rst:1140 +#: library/functions.rst:1178 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger " "than :data:`sys.maxsize`, such as :class:`range(2 ** 100) `." @@ -2100,7 +2160,7 @@ msgstr "" "``len`` lève une :exc:`OverflowError` sur des longueurs supérieures " "à :data:`sys.maxsize`, par exemple pour :class:`range(2 ** 100) `." -#: library/functions.rst:1148 +#: 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`." @@ -2109,33 +2169,33 @@ msgstr "" "type séquentiel mutable, comme décrit dans :ref:`typesseq-list` " "et :ref:`typesseq`." -#: library/functions.rst:1154 +#: 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:1158 +#: 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`." msgstr "" -#: library/functions.rst:1162 +#: library/functions.rst:1200 msgid "" "At class scope, it returns the namespace that will be passed to the " "metaclass constructor." msgstr "" -#: library/functions.rst:1165 +#: 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:1168 +#: 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 " @@ -2145,7 +2205,7 @@ msgid "" "returned mapping object." msgstr "" -#: library/functions.rst:1175 +#: library/functions.rst:1213 msgid "" "In an :term:`optimized scope` (including functions, generators, and " "coroutines), each call to ``locals()`` instead returns a fresh dictionary " @@ -2157,7 +2217,7 @@ msgid "" "previously returned dictionaries." msgstr "" -#: library/functions.rst:1184 +#: 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 " @@ -2166,19 +2226,19 @@ msgid "" "function." msgstr "" -#: library/functions.rst:1190 +#: 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:1193 +#: library/functions.rst:1231 msgid "" "The behaviour of ``locals()`` in a comprehension has been updated as " "described in :pep:`709`." msgstr "" -#: library/functions.rst:1197 +#: 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 " @@ -2187,7 +2247,7 @@ msgid "" "from previous versions." msgstr "" -#: library/functions.rst:1207 +#: library/functions.rst:1245 #, fuzzy msgid "" "Return an iterator that applies *function* to every item of *iterable*, " @@ -2208,12 +2268,12 @@ msgstr "" "voir :func:`itertools.starmap`." # suit un : -#: library/functions.rst:1216 +#: library/functions.rst:1254 #, fuzzy msgid "Added the *strict* parameter." msgstr "ajout du paramètre *closure*." -#: library/functions.rst:1224 +#: library/functions.rst:1262 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." @@ -2221,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:1227 +#: 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 " @@ -2232,7 +2292,7 @@ msgstr "" "deux arguments positionnels sont fournis, l'argument le plus grand sera " "renvoyé." -#: library/functions.rst:1270 +#: 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 " @@ -2246,7 +2306,7 @@ msgstr "" "fourni est vide. Si l'itérable est vide et que *default* n'est pas " "fourni, :exc:`ValueError` est levée." -#: library/functions.rst:1238 +#: 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 " @@ -2259,17 +2319,17 @@ msgstr "" "[0]`` et ``heapq.nlargest(1, iterable, key=keyfunc)``." # suit un : -#: library/functions.rst:1281 +#: 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:1284 +#: library/functions.rst:1322 msgid "The *key* can be ``None``." msgstr "l'argument *key* peut être ``None``." -#: library/functions.rst:1254 +#: library/functions.rst:1292 msgid "" "Return a \"memory view\" object created from the given argument. " "See :ref:`typememoryview` for more information." @@ -2277,7 +2337,7 @@ msgstr "" "Renvoie une « vue mémoire » (*memory view*) créée depuis l'argument. " "Voir :ref:`typememoryview` pour plus d'informations." -#: library/functions.rst:1262 +#: library/functions.rst:1300 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." @@ -2285,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:1265 +#: 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 " @@ -2295,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:1276 +#: 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 " @@ -2307,7 +2367,7 @@ msgstr "" "du tri, tels que ``sorted(iterable, key=keyfunc)[0]`` et " "``heapq.nsmallest(1, iterable, key=keyfunc)``." -#: library/functions.rst:1291 +#: 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 " @@ -2318,7 +2378,7 @@ msgstr "" "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:1298 +#: library/functions.rst:1336 #, fuzzy msgid "" "This is the ultimate base class of all other classes. It has methods that " @@ -2330,7 +2390,7 @@ 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:1305 +#: library/functions.rst:1343 #, fuzzy msgid "" ":class:`object` instances do *not* have :attr:`~object.__dict__` attributes, " @@ -2340,7 +2400,7 @@ msgstr "" "pouvez donc pas assigner d'attributs arbitraires à une instance " "d':class:`object`." -#: library/functions.rst:1312 +#: library/functions.rst:1350 #, fuzzy msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " @@ -2353,7 +2413,7 @@ msgstr "" "objet :class:`int`, il doit définir une méthode :meth:`~object.__index__` " "qui donne un entier, par exemple :" -#: library/functions.rst:1322 +#: 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." @@ -2361,7 +2421,7 @@ 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:1339 +#: 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 " @@ -2371,7 +2431,7 @@ msgstr "" "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:1343 +#: 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 " @@ -2385,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:1349 +#: library/functions.rst:1387 #, fuzzy msgid "" "*mode* is an optional string that specifies the mode in which the file is " @@ -2412,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:1366 +#: library/functions.rst:1404 msgid "Character" msgstr "Caractère" -#: library/functions.rst:1366 +#: library/functions.rst:1404 msgid "Meaning" msgstr "Signification" -#: library/functions.rst:1368 +#: library/functions.rst:1406 msgid "``'r'``" msgstr "``'r'``" -#: library/functions.rst:1368 +#: library/functions.rst:1406 msgid "open for reading (default)" msgstr "ouvre en lecture (par défaut)" -#: library/functions.rst:1369 +#: library/functions.rst:1407 msgid "``'w'``" msgstr "``'w'``" -#: library/functions.rst:1369 +#: 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:1370 +#: library/functions.rst:1408 msgid "``'x'``" msgstr "``'x'``" -#: library/functions.rst:1370 +#: 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:1371 +#: library/functions.rst:1409 msgid "``'a'``" msgstr "``'a'``" -#: library/functions.rst:1371 +#: 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:1372 +#: library/functions.rst:1410 msgid "``'b'``" msgstr "``'b'``" -#: library/functions.rst:1372 +#: library/functions.rst:1410 msgid "binary mode" msgstr "mode binaire" -#: library/functions.rst:1373 +#: library/functions.rst:1411 msgid "``'t'``" msgstr "``'t'``" -#: library/functions.rst:1373 +#: library/functions.rst:1411 msgid "text mode (default)" msgstr "mode texte (par défaut)" -#: library/functions.rst:1374 +#: library/functions.rst:1412 msgid "``'+'``" msgstr "``'+'``" -#: library/functions.rst:1374 +#: library/functions.rst:1412 msgid "open for updating (reading and writing)" msgstr "ouvre en modification (lecture et écriture)" -#: library/functions.rst:1377 +#: 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 " @@ -2486,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:1381 +#: 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* " @@ -2504,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:1391 +#: 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 " @@ -2514,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:1395 +#: library/functions.rst:1433 #, fuzzy msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " @@ -2540,7 +2600,7 @@ msgstr "" "comportements par défaut sont les suivants :" # énumération -#: library/functions.rst:1405 +#: library/functions.rst:1443 #, fuzzy msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " @@ -2555,7 +2615,7 @@ msgstr "" "est de 4096 ou 8192 octets ;" # fin d'énumération -#: library/functions.rst:1410 +#: 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 " @@ -2566,7 +2626,7 @@ msgstr "" "ligne par ligne. Les autres fichiers textes sont traités comme les fichiers " "binaires." -#: library/functions.rst:1414 +#: 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 " @@ -2581,14 +2641,14 @@ msgstr "" "Python peut être utilisé. Voir :mod:`codecs` pour une liste des encodages " "pris en charge." -#: library/functions.rst:1420 +#: 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 " @@ -2597,73 +2657,7 @@ msgstr "" "d'erreur enregistré avec :func:`codecs.register_error` est aussi un argument " "valide. Les noms standards sont :" -#: library/functions.rst:1428 -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:1432 -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:1435 -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:1438 -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:1445 -#, 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:1449 -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:1452 -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:1460 +#: 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 " @@ -2673,7 +2667,7 @@ msgstr "" "``None``, ``''``, ``'\\n'``, ``'\\r'``, et ``'\\r\\n'``. Il fonctionne comme " "suit :" -#: library/functions.rst:1464 +#: 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'``, " @@ -2691,7 +2685,7 @@ msgstr "" "valeur autorisée, les lignes sont seulement terminées par la chaîne donnée, " "qui est rendue telle quelle." -#: library/functions.rst:1472 +#: 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 " @@ -2705,7 +2699,7 @@ msgstr "" "*newline* est un autre caractère valide, chaque ``'\\n'`` sera remplacé par " "la chaîne donnée." -#: library/functions.rst:1478 +#: 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 " @@ -2717,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:1483 +#: 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 " @@ -2731,13 +2725,13 @@ msgstr "" "descripteur de fichier ouvert (fournir :mod:`os.open` en tant qu'*opener* " "aura le même effet que donner ``None``)." -#: library/functions.rst:1489 +#: 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:1491 +#: 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::" @@ -2745,7 +2739,7 @@ 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:1504 +#: 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 " @@ -2772,7 +2766,7 @@ msgstr "" "flux brut, une classe fille de :class:`io.RawIOBase`, :class:`io.FileIO` est " "renvoyée." -#: library/functions.rst:1525 +#: library/functions.rst:1535 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is " @@ -2782,7 +2776,7 @@ msgstr "" "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:1529 +#: library/functions.rst:1539 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " @@ -2791,7 +2785,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``open`` avec les arguments " "``file``, ``mode`` et ``flags``." -#: library/functions.rst:1531 +#: library/functions.rst:1541 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." @@ -2800,22 +2794,22 @@ msgstr "" "l'appel original." # suit un : -#: library/functions.rst:1536 +#: library/functions.rst:1546 msgid "The *opener* parameter was added." msgstr "ajout du paramètre *opener*." # suit un : -#: library/functions.rst:1537 +#: library/functions.rst:1547 msgid "The ``'x'`` mode was added." msgstr "ajout du mode ``'x'``." -#: library/functions.rst:1538 +#: 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`." -#: library/functions.rst:1539 +#: library/functions.rst:1549 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2823,11 +2817,11 @@ msgstr "" ":exc:`FileExistsError` est maintenant levée si le fichier ouvert en mode " "création exclusive (``'x'``) existe déjà." -#: library/functions.rst:1544 +#: 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:1548 +#: 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 " @@ -2838,16 +2832,16 @@ msgstr "" "une :exc:`InterruptedError` (voir la :pep:`475` pour la justification)." # suit un : -#: library/functions.rst:1551 +#: library/functions.rst:1561 msgid "The ``'namereplace'`` error handler was added." msgstr "ajout du gestionnaire d'erreurs ``'namereplace'``." # suit un : -#: library/functions.rst:1555 +#: 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:1556 +#: library/functions.rst:1566 msgid "" "On Windows, opening a console buffer may return a subclass " "of :class:`io.RawIOBase` other than :class:`io.FileIO`." @@ -2856,15 +2850,15 @@ msgstr "" "de :class:`io.RawIOBase` autre que :class:`io.FileIO`." # suit un : -#: library/functions.rst:1559 +#: library/functions.rst:1569 msgid "The ``'U'`` mode has been removed." msgstr "le mode ``'U``` a été enlevé." -#: library/functions.rst:1564 +#: library/functions.rst:1574 msgid "Return the ordinal value of a character." msgstr "" -#: library/functions.rst:1566 +#: library/functions.rst:1576 #, fuzzy msgid "" "If the argument is a one-character string, return the Unicode code point of " @@ -2877,14 +2871,14 @@ msgstr "" "entier ``97`` et ``ord('€')`` (symbole euro) renvoie ``8364``. Il s'agit de " "la réciproque de :func:`chr`." -#: library/functions.rst:1571 +#: 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:1578 +#: 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) % " @@ -2896,7 +2890,7 @@ msgstr "" "``pow(base, exp) % mod``). La forme à deux arguments ``pow(base, exp)`` est " "équivalente à l'opérateur puissance : ``base**exp``." -#: library/functions.rst:1583 +#: library/functions.rst:1593 #, fuzzy msgid "" "When arguments are builtin numeric types with mixed operand types, the " @@ -2922,7 +2916,7 @@ msgstr "" "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:1595 +#: 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 " @@ -2936,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:1601 +#: 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:1608 +#: 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." @@ -2951,14 +2945,14 @@ msgstr "" "des inverses modulaires." # suit un : -#: library/functions.rst:1613 +#: 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:1620 +#: 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 " @@ -2968,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:1624 +#: 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* " @@ -2982,7 +2976,7 @@ msgstr "" "prendre les valeurs par défaut. Si aucun *objects* n'est donné :func:`print` " "écrit seulement *end*." -#: library/functions.rst:1630 +#: 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 " @@ -2995,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:1635 +#: library/functions.rst:1645 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." @@ -3004,15 +2998,15 @@ msgstr "" "Cependant, si l'argument *flush* est vrai, le tampon du flux est vidé " "explicitement." -#: library/functions.rst:1639 +#: library/functions.rst:1649 msgid "Added the *flush* keyword argument." msgstr "ajout de l'argument nommé *flush*." -#: library/functions.rst:1645 +#: library/functions.rst:1655 msgid "Return a property attribute." msgstr "Renvoie un attribut propriété." -#: library/functions.rst:1647 +#: 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 " @@ -3023,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:1651 +#: 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:1668 +#: 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." @@ -3036,7 +3030,7 @@ msgstr "" "anglais), ``c.x = value`` invoque le mutateur (*setter*), et ``del x`` le " "destructeur (*deleter*)." -#: library/functions.rst:1671 +#: 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 " @@ -3048,7 +3042,7 @@ msgstr "" "possible la création de propriétés en lecture seule en utilisant " "simplement :func:`property` comme :term:`décorateur ` ::" -#: library/functions.rst:1684 +#: library/functions.rst:1694 #, fuzzy msgid "" "The ``@property`` decorator turns the :meth:`!voltage` method into a " @@ -3059,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:1692 +#: library/functions.rst:1702 #, fuzzy msgid "" "A property object has ``getter``, ``setter``, and ``deleter`` methods usable " @@ -3073,7 +3067,7 @@ msgstr "" "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:1716 +#: 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 " @@ -3083,7 +3077,7 @@ msgstr "" "donner aux fonctions additionnelles le même nom que la propriété (``x`` dans " "ce cas)." -#: library/functions.rst:1720 +#: library/functions.rst:1730 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." @@ -3092,19 +3086,19 @@ msgstr "" "``fdel`` correspondants aux arguments du constructeur." # suit un : -#: library/functions.rst:1723 +#: 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:1728 +#: 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:1739 +#: 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`." @@ -3113,7 +3107,7 @@ msgstr "" "type de séquence immuable, comme décrit dans :ref:`typesseq-range` " "et :ref:`typesseq`." -#: library/functions.rst:1745 +#: library/functions.rst:1755 #, fuzzy msgid "" "Return a string containing a printable representation of an object. For " @@ -3136,11 +3130,11 @@ msgstr "" "méthode :meth:`__repr__`. Si :func:`sys.displayhook` n'est pas accessible, " "cette fonction lève une :exc:`RuntimeError`." -#: library/functions.rst:1756 +#: library/functions.rst:1766 msgid "This class has a custom representation that can be evaluated::" msgstr "" -#: library/functions.rst:1769 +#: library/functions.rst:1779 #, fuzzy msgid "" "Return a reverse :term:`iterator`. The argument must be an object which has " @@ -3153,7 +3147,7 @@ msgstr "" "séquence (la méthode :meth:`__len__` et la méthode :meth:`__getitem__` avec " "des arguments entiers commençant à zéro)." -#: library/functions.rst:1777 +#: 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 " @@ -3163,7 +3157,7 @@ msgstr "" "virgule. Si *ndigits* est omis (ou est ``None``), l'entier le plus proche " "est renvoyé." -#: library/functions.rst:1781 +#: 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 " @@ -3181,7 +3175,7 @@ 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:1790 +#: library/functions.rst:1800 msgid "" "For a general Python object ``number``, ``round`` delegates to " "``number.__round__``." @@ -3190,7 +3184,7 @@ msgstr "" "``number.__round__``." # suit un : -#: library/functions.rst:1795 +#: 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 " @@ -3204,7 +3198,7 @@ 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:1806 +#: 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-" @@ -3214,7 +3208,7 @@ msgstr "" "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:1810 +#: library/functions.rst:1820 msgid "" "For other containers see the built-" "in :class:`frozenset`, :class:`list`, :class:`tuple`, and :class:`dict` " @@ -3224,7 +3218,7 @@ msgstr "" "comme : :class:`frozenset`, :class:`list`, :class:`tuple`, et :class:`dict`, " "ainsi que le module :mod:`collections`." -#: library/functions.rst:1817 +#: 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 " @@ -3238,7 +3232,7 @@ msgstr "" "l'attribut, si l'objet l'autorise. Par exemple, ``setattr(x, 'foobar', " "123)`` équivaut à ``x.foobar = 123``." -#: library/functions.rst:1823 +#: 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 " @@ -3254,7 +3248,7 @@ msgstr "" "est accessible *via* :func:`getattr` etc." # suit un : -#: library/functions.rst:1831 +#: library/functions.rst:1841 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -3265,48 +3259,116 @@ 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:1840 +#: 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:1844 +#: 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:1853 +#: library/functions.rst:1920 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`." msgstr "" -#: library/functions.rst:1858 +#: library/functions.rst:1927 +msgid "" +"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:1931 msgid "" "Slice objects are now :term:`hashable` " "(provided :attr:`~slice.start`, :attr:`~slice.stop`, and :attr:`~slice.step` " "are hashable)." msgstr "" -#: library/functions.rst:1864 +#: 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:1866 +#: 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:1868 +#: 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, " @@ -3318,7 +3380,7 @@ msgstr "" "``key=str.lower``). La valeur par défaut est ``None`` (compare les éléments " "directement)." -#: library/functions.rst:1872 +#: 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." @@ -3326,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:1875 +#: library/functions.rst:1948 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." @@ -3334,7 +3396,7 @@ msgstr "" "Utilisez :func:`functools.cmp_to_key` pour convertir l'ancienne notation " "*cmp* en une fonction *key*." -#: library/functions.rst:1878 +#: 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 " @@ -3346,7 +3408,8 @@ msgstr "" "eux. C'est utile pour trier en plusieurs passes (par exemple par direction " "puis par salaire)." -#: library/functions.rst:1883 +#: 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` " @@ -3354,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 " @@ -3367,17 +3430,17 @@ msgstr "" "confusion lors de comparaisons de types mixtes qui peuvent appeler la " "méthode :meth:`~object.__gt__`." -#: library/functions.rst:1892 +#: 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:1896 +#: library/functions.rst:1969 msgid "Transform a method into a static method." msgstr "Transforme une méthode en méthode statique." -#: library/functions.rst:1898 +#: library/functions.rst:1971 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" @@ -3385,7 +3448,7 @@ msgstr "" "Une méthode statique ne reçoit pas de premier argument implicitement. Voici " "comment déclarer une méthode statique ::" -#: library/functions.rst:1905 +#: library/functions.rst:1978 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- " "see :ref:`function` for details." @@ -3393,7 +3456,7 @@ msgstr "" "La forme ``@staticmethod`` est un :term:`décorateur ` de " "fonction. Consultez :ref:`function` pour plus de détails." -#: library/functions.rst:1908 +#: library/functions.rst:1981 #, fuzzy msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " @@ -3405,7 +3468,7 @@ msgstr "" "``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:1913 +#: 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 " @@ -3415,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:1917 +#: 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 " @@ -3429,13 +3492,13 @@ 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:1929 +#: 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:1931 +#: library/functions.rst:2004 #, fuzzy msgid "" "Static methods now inherit the method attributes " @@ -3448,14 +3511,14 @@ msgstr "" "``__annotations__``), ont un nouvel attribut ``__wrapped__`` et sont " "maintenant appelables comme les fonctions habituelles." -#: library/functions.rst:1949 +#: 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:1951 +#: library/functions.rst:2024 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." @@ -3463,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:1957 +#: 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 " @@ -3473,7 +3536,7 @@ 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:1961 +#: library/functions.rst:2034 #, fuzzy msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " @@ -3489,23 +3552,23 @@ msgstr "" "d'itérables, utilisez plutôt :func:`itertools.chain`." # suit un : -#: library/functions.rst:1967 +#: 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:1970 +#: 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:1973 +#: library/functions.rst:2046 msgid "" "Added specialization for summation of complexes, using same algorithm as for " "summation of floats." msgstr "" -#: library/functions.rst:1981 +#: 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 " @@ -3515,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:1985 +#: 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*." @@ -3524,7 +3587,7 @@ msgstr "" "` est utilisé pour la recherche. La recherche " "commence à partir de la classe qui suit immédiatement le *type*." -#: library/functions.rst:1989 +#: library/functions.rst:2062 #, fuzzy msgid "" "For example, if :attr:`~type.__mro__` of *object_or_type* is ``D -> B -> C " @@ -3535,7 +3598,7 @@ msgstr "" "-> A -> object`` et la valeur de *type* est ``B``, alors :func:`super` " "recherche ``C -> A -> object``." -#: library/functions.rst:1993 +#: library/functions.rst:2066 #, fuzzy msgid "" "The :attr:`~type.__mro__` attribute of the class corresponding to " @@ -3548,7 +3611,7 @@ msgstr "" "et :func:`super`. L'attribut est dynamique et peut changer lorsque la " "hiérarchie d'héritage est modifiée." -#: library/functions.rst:1998 +#: 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. " @@ -3560,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:2003 +#: 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 " @@ -3570,7 +3633,7 @@ msgid "" "including generator expressions, which implicitly create nested functions.)" msgstr "" -#: library/functions.rst:2010 +#: 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 " @@ -3583,7 +3646,7 @@ msgstr "" "maintenable. Cet usage se rapproche de l'usage de *super* dans d'autres " "langages de programmation." -#: library/functions.rst:2015 +#: 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 " @@ -3606,12 +3669,12 @@ 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:2025 +#: 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:2032 +#: 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 " @@ -3621,7 +3684,7 @@ msgstr "" "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:2036 +#: library/functions.rst:2109 #, fuzzy msgid "" "Note that :func:`super` is implemented as part of the binding process for " @@ -3639,7 +3702,7 @@ msgstr "" "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:2044 +#: 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 " @@ -3656,7 +3719,7 @@ 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:2051 +#: library/functions.rst:2124 msgid "" "For practical suggestions on how to design cooperative classes " "using :func:`super`, see `guide to using super() `_." -#: library/functions.rst:2055 +#: library/functions.rst:2128 msgid "" ":class:`super` objects are now :mod:`pickleable ` " "and :mod:`copyable `." msgstr "" -#: library/functions.rst:2064 +#: 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`." @@ -3680,7 +3743,7 @@ 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:2073 +#: library/functions.rst:2146 #, fuzzy msgid "" "With one argument, return the type of an *object*. The return value is a " @@ -3691,7 +3754,7 @@ msgstr "" "objet type et généralement la même que la valeur de " "l'attribut :attr:`object.__class__ `." -#: library/functions.rst:2077 +#: 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." @@ -3699,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:2080 +#: library/functions.rst:2153 #, fuzzy msgid "" "With three arguments, return a new type object. This is essentially a " @@ -3723,22 +3786,22 @@ msgstr "" "devenir l'attribut :attr:`~object.__dict__`. Par exemple, les deux " "instructions suivantes créent deux instances identiques de :class:`type` :" -#: library/functions.rst:2095 +#: library/functions.rst:2168 msgid "See also:" msgstr "" -#: library/functions.rst:2097 +#: library/functions.rst:2170 msgid "" ":ref:`Documentation on attributes and methods on classes `." msgstr "" -#: library/functions.rst:2098 +#: library/functions.rst:2171 #, fuzzy msgid ":ref:`bltin-type-objects`" msgstr "Voir aussi :ref:`bltin-type-objects`." -#: library/functions.rst:2100 +#: 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__`) " @@ -3750,12 +3813,12 @@ msgstr "" "(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:2105 +#: library/functions.rst:2178 msgid "See also :ref:`class-customization`." msgstr "Voir aussi :ref:`class-customization`." # suit un : -#: library/functions.rst:2107 +#: library/functions.rst:2180 #, fuzzy msgid "" "Subclasses of :class:`!type` which don't override ``type.__new__`` may no " @@ -3765,7 +3828,11 @@ msgstr "" "ne doivent plus utiliser la forme à un argument pour récupérer le type d'un " "objet." -#: library/functions.rst:2114 +#: 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, " @@ -3775,7 +3842,7 @@ msgstr "" "instance ou de n'importe quel objet avec un " "attribut :attr:`~object.__dict__`." -#: library/functions.rst:2117 +#: library/functions.rst:2194 #, fuzzy msgid "" "Objects such as modules and instances have an " @@ -3791,11 +3858,11 @@ msgstr "" "un :class:`types.MappingProxyType` pour éviter les modifications directes du " "dictionnaire)." -#: library/functions.rst:2122 +#: library/functions.rst:2199 msgid "Without an argument, :func:`vars` acts like :func:`locals`." msgstr "" -#: library/functions.rst:2124 +#: 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 " @@ -3805,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:2130 +#: 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:2136 +#: library/functions.rst:2213 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." @@ -3819,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:2139 +#: library/functions.rst:2216 msgid "Example::" msgstr "Exemple ::" -#: library/functions.rst:2148 +#: 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." @@ -3832,7 +3899,7 @@ 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:2151 +#: 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 `_." -#: library/functions.rst:2155 +#: 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 " @@ -3852,7 +3919,7 @@ msgstr "" "l'on itère, par exemple avec une boucle :keyword:`!for` ou en les plaçant " "dans une :class:`liste `." -#: library/functions.rst:2159 +#: 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 " @@ -3865,7 +3932,7 @@ msgstr "" "différentes pour traiter ce problème :" # énumération -#: library/functions.rst:2164 +#: 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 " @@ -3875,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:2171 +#: 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`` " @@ -3885,7 +3952,7 @@ 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:2178 +#: library/functions.rst:2255 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" @@ -3893,7 +3960,7 @@ msgstr "" "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:2196 +#: 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 " @@ -3904,7 +3971,7 @@ msgstr "" "comme un bogue difficile à trouver dans une autre partie du programme." # énumération. -#: library/functions.rst:2200 +#: 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 " @@ -3914,7 +3981,7 @@ msgstr "" "pour que tous les itérables aient la même longueur. C'est le cas " "pour :func:`itertools.zip_longest`." -#: library/functions.rst:2204 +#: 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." @@ -3922,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:2207 +#: library/functions.rst:2284 msgid "Tips and tricks:" msgstr "Trucs et astuces :" # suit un : -#: library/functions.rst:2209 +#: 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 " @@ -3942,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:2215 +#: library/functions.rst:2292 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" @@ -3951,12 +4018,12 @@ msgstr "" "dézipper une liste ::" # suit un : -#: library/functions.rst:2226 +#: library/functions.rst:2303 msgid "Added the ``strict`` argument." msgstr "ajout de l'argument ``strict``." # suit un : -#: library/functions.rst:2238 +#: library/functions.rst:2315 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." @@ -3964,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:2241 +#: 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 " @@ -3985,7 +4052,7 @@ msgstr "" "de :func:`__import__` est aussi déconseillé en faveur " "de :func:`importlib.import_module`." -#: library/functions.rst:2250 +#: 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 " @@ -4001,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:2257 +#: 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* " @@ -4014,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:2263 +#: 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 " @@ -4026,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:2268 +#: library/functions.rst:2345 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" @@ -4034,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:2273 +#: library/functions.rst:2350 msgid "The statement ``import spam.ham`` results in this call::" msgstr "L'instruction ``import spam.ham`` appelle ::" -#: library/functions.rst:2277 +#: 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." @@ -4046,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:2280 +#: library/functions.rst:2357 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" @@ -4054,7 +4121,7 @@ msgstr "" "En revanche, l'instruction ``from spam.ham import eggs, sausage as saus`` " "donne ::" -#: library/functions.rst:2287 +#: 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 " @@ -4063,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:2291 +#: library/functions.rst:2368 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." @@ -4072,7 +4139,7 @@ msgstr "" "paquet) par son nom, utilisez :func:`importlib.import_module`." # suit un : -#: library/functions.rst:2294 +#: library/functions.rst:2371 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." @@ -4080,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:2298 +#: 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." @@ -4088,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:2303 +#: library/functions.rst:2380 msgid "Footnotes" msgstr "Notes" -#: library/functions.rst:2304 +#: 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 " @@ -4102,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" diff --git a/library/functools.po b/library/functools.po index a7004d63d7..4a22b7c3c4 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: 2025-10-17 09:58+0200\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:297 +#: 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:438 +#: 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." 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,7 +154,7 @@ 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 " @@ -154,7 +163,7 @@ msgid "" "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,7 +172,7 @@ 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 " @@ -177,7 +186,7 @@ msgstr "" "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 " @@ -191,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 " @@ -208,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 " @@ -217,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 " @@ -230,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 " @@ -240,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." @@ -248,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 " @@ -260,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` " @@ -282,7 +291,7 @@ msgstr "" "valeurs de *maxsize* et de *typed*. Cela ne sert qu'au débogage, changer ces " "valeurs n'a pas d'incidence." -#: library/functools.rst:205 +#: library/functools.rst:202 #, fuzzy msgid "" "To help measure the effectiveness of the cache and tune the *maxsize* " @@ -296,7 +305,7 @@ msgstr "" "*hits*, *misses*, *maxsize* et *currsize*. Dans un environnement " "*multithread*, les succès et échecs d'appel du cache sont approximatifs." -#: library/functools.rst:213 +#: library/functools.rst:210 #, fuzzy msgid "" "The decorator also provides a :func:`!cache_clear` function for clearing or " @@ -305,7 +314,7 @@ msgstr "" "Le décorateur fournit également une fonction :func:`cache_clear` pour vider " "ou invalider le cache." -#: library/functools.rst:216 +#: library/functools.rst:213 msgid "" "The original underlying function is accessible through " "the :attr:`__wrapped__` attribute. This is useful for introspection, for " @@ -316,19 +325,19 @@ msgstr "" "outrepasser le cache, ou pour ré-englober la fonction avec un cache " "différent." -#: library/functools.rst:220 +#: 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:223 +#: 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:226 +#: library/functools.rst:223 #, fuzzy msgid "" "An `LRU (least recently used) cache `_ using a cache to implement a " @@ -377,20 +386,20 @@ msgstr "" "implémenter la technique de `programmation dynamique `_ ::" -#: library/functools.rst:278 +#: library/functools.rst:275 msgid "Added the *typed* option." msgstr "L'option *typed* a été ajoutée." -#: library/functools.rst:281 +#: library/functools.rst:278 msgid "Added the *user_function* option." msgstr "Ajout de l'option *user_function*." -#: library/functools.rst:284 +#: library/functools.rst:281 #, fuzzy msgid "Added the function :func:`!cache_parameters`" msgstr "Ajout de la fonction :func:`cache_parameters`" -#: library/functools.rst:289 +#: 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 " @@ -400,7 +409,7 @@ 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:293 +#: library/functools.rst:290 #, fuzzy msgid "" "The class must define one " @@ -412,7 +421,7 @@ msgstr "" "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:317 +#: 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 " @@ -427,7 +436,7 @@ msgstr "" "méthodes de comparaison riches résoudra normalement vos problèmes de " "rapidité." -#: library/functools.rst:326 +#: 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 " @@ -435,7 +444,7 @@ msgid "" "the original method is abstract." msgstr "" -#: library/functools.rst:333 +#: library/functools.rst:330 #, fuzzy msgid "" "Returning ``NotImplemented`` from the underlying comparison function for " @@ -444,13 +453,13 @@ msgstr "" "Retourner NotImplemented dans les fonction de comparaison sous-jacentes pour " "les types non reconnus est maintenant supporté." -#: library/functools.rst:339 +#: 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:347 +#: 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 " @@ -464,7 +473,7 @@ 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:362 +#: library/functools.rst:359 #, fuzzy msgid "" "The :func:`!partial` function is used for partial function application which " @@ -479,7 +488,7 @@ msgstr "" "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:375 +#: library/functools.rst:372 msgid "" "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 " @@ -488,20 +497,20 @@ msgid "" "pre-filled." msgstr "" -#: library/functools.rst:380 +#: library/functools.rst:377 msgid "" "If any :data:`!Placeholder` sentinels are present, all must be filled at " "call time:" msgstr "" -#: library/functools.rst:388 +#: 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:392 +#: 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 " @@ -510,17 +519,17 @@ msgid "" "Placeholder`:" msgstr "" -#: library/functools.rst:412 +#: library/functools.rst:409 msgid "" ":data:`!Placeholder` cannot be passed to :func:`!partial` as a keyword " "argument." msgstr "" -#: library/functools.rst:414 +#: library/functools.rst:411 msgid "Added support for :data:`Placeholder` in positional arguments." msgstr "" -#: library/functools.rst:419 +#: 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 " @@ -530,7 +539,7 @@ msgstr "" "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:423 +#: 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)." @@ -538,7 +547,7 @@ 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:426 +#: library/functools.rst:423 #, fuzzy msgid "" "When *func* is a descriptor (such as a normal Python " @@ -553,7 +562,7 @@ msgstr "" "sont délégués au descripteur sous-jacent, et un :ref:`objet partiel ` approprié est renvoyé comme résultat." -#: library/functools.rst:432 +#: 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 " @@ -567,7 +576,7 @@ msgstr "" "premier argument positionnel, avant les *args* et *keywords* fournis au " "constructeur :class:`partialmethod`." -#: library/functools.rst:463 +#: library/functools.rst:460 #, fuzzy msgid "" "Apply *function* of two arguments cumulatively to the items of *iterable*, " @@ -590,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:472 +#: library/functools.rst:469 msgid "Roughly equivalent to::" msgstr "À peu près équivalent à ::" -#: library/functools.rst:486 +#: library/functools.rst:483 msgid "" "See :func:`itertools.accumulate` for an iterator that yields all " "intermediate values." @@ -602,11 +611,11 @@ msgstr "" "Voir :func:`itertools.accumulate` pour un itérateur qui génère toutes les " "valeurs intermédiaires." -#: library/functools.rst:489 +#: library/functools.rst:486 msgid "*initial* is now supported as a keyword argument." msgstr "" -#: library/functools.rst:494 +#: library/functools.rst:491 msgid "" "Transform a function into a :term:`single-dispatch ` :term:`generic function`." @@ -614,7 +623,7 @@ msgstr "" "Transforme une fonction en une :term:`fonction générique ` :term:`single-dispatch `." -#: library/functools.rst:497 +#: library/functools.rst:494 #, fuzzy msgid "" "To define a generic function, decorate it with the ``@singledispatch`` " @@ -625,7 +634,7 @@ 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:511 +#: library/functools.rst:508 #, fuzzy msgid "" "To add overloaded implementations to the function, use the :func:`!register` " @@ -638,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:529 +#: library/functools.rst:526 msgid ":class:`typing.Union` can also be used::" msgstr "" -#: library/functools.rst:546 +#: 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::" @@ -650,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:556 +#: 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 " @@ -658,7 +667,7 @@ msgid "" "going into the function definition::" msgstr "" -#: library/functools.rst:570 +#: 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 " @@ -666,7 +675,7 @@ msgid "" "example is for static type checkers only and has no runtime impact." msgstr "" -#: library/functools.rst:576 +#: library/functools.rst:573 #, fuzzy msgid "" "To enable registering :term:`lambdas` and pre-existing functions, " @@ -676,7 +685,7 @@ 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:584 +#: library/functools.rst:581 #, fuzzy msgid "" "The :func:`~singledispatch.register` attribute returns the undecorated " @@ -687,7 +696,7 @@ msgstr "" "d'empiler les décorateurs, la sérialisation, et la création de tests " "unitaires pour chaque variante indépendamment ::" -#: library/functools.rst:598 +#: library/functools.rst:595 msgid "" "When called, the generic function dispatches on the type of the first " "argument::" @@ -695,7 +704,7 @@ msgstr "" "Quand elle est appelée, la fonction générique distribue sur le type du " "premier argument ::" -#: library/functools.rst:618 +#: library/functools.rst:615 #, fuzzy msgid "" "Where there is no registered implementation for a specific type, its method " @@ -710,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:624 +#: 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:639 +#: library/functools.rst:636 #, fuzzy msgid "" "To check which implementation the generic function will choose for a given " @@ -726,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:647 +#: library/functools.rst:644 msgid "" "To access all registered implementations, use the read-only ``registry`` " "attribute::" @@ -734,7 +743,7 @@ msgstr "" "Pour accéder à toutes les implémentations enregistrées, utiliser l'attribut " "en lecture seule ``registry`` ::" -#: library/functools.rst:661 +#: library/functools.rst:658 #, fuzzy msgid "" "The :func:`~singledispatch.register` attribute now supports using type " @@ -742,7 +751,7 @@ msgid "" msgstr "" "L’attribut :func:`register` gère l’utilisation des indications de type." -#: library/functools.rst:664 +#: library/functools.rst:661 #, fuzzy msgid "" "The :func:`~singledispatch.register` attribute now " @@ -750,7 +759,7 @@ msgid "" msgstr "" "L’attribut :func:`register` gère l’utilisation des indications de type." -#: library/functools.rst:671 +#: library/functools.rst:668 msgid "" "Transform a method into a :term:`single-dispatch ` :term:`generic function`." @@ -758,12 +767,12 @@ msgstr "" "Transforme une méthode en une :term:`fonction générique ` :term:`single-dispatch `." -#: library/functools.rst:674 +#: 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 " @@ -771,7 +780,7 @@ msgstr "" "type du premier argument non *self* ni *cls*, donc la fonction doit être " "conçue en conséquence ::" -#: library/functools.rst:692 +#: library/functools.rst:689 msgid "" "``@singledispatchmethod`` supports nesting with other decorators such " "as :deco:`classmethod`. Note that to allow for ``dispatcher.register``, " @@ -780,12 +789,16 @@ msgid "" "an instance of the class::" msgstr "" -#: library/functools.rst:714 +#: library/functools.rst:711 msgid "" "The same pattern can be used for other similar " "decorators: :deco:`staticmethod`, :deco:`~abc.abstractmethod`, and others." msgstr "" +#: library/functools.rst:716 +msgid "Added support of non-:term:`descriptor` callables." +msgstr "" + #: library/functools.rst:722 #, fuzzy msgid "" diff --git a/library/gc.po b/library/gc.po index 17cd7154ef..bdcc09094b 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: 2025-10-17 09:58+0200\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,30 +45,31 @@ 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 "" -"Perform a collection. The optional argument *generation* may be an integer " -"specifying which generation to collect (from 0 to 2). A :exc:`ValueError` " -"is raised if the generation number is invalid. The sum of collected objects " -"and uncollectable objects is returned." +"With no arguments, run a full collection. The optional argument " +"*generation* may be an integer specifying which generation to collect (from " +"0 to 2). A :exc:`ValueError` is raised if the generation number is invalid. " +"The sum of collected objects and uncollectable objects is returned." msgstr "" "Déclenche un passage du ramasse-miettes. En l'absence d'argument, un passage " "complet est effectué. Le paramètre *generation* permet de le limiter à une " @@ -76,24 +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 -msgid "" -"Calling ``gc.collect(0)`` will perform a GC collection on the young " -"generation." -msgstr "" - -#: library/gc.rst:50 -msgid "" -"Calling ``gc.collect(1)`` will perform a GC collection on the young " -"generation and an increment of the old generation." -msgstr "" - -#: library/gc.rst:53 -msgid "" -"Calling ``gc.collect(2)`` or ``gc.collect()`` performs a full collection" -msgstr "" - -#: library/gc.rst:55 +#: 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 " @@ -101,17 +85,21 @@ msgid "" "implementation, in particular :class:`float`." msgstr "" -#: library/gc.rst:60 +#: 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:63 +#: library/gc.rst:53 msgid "``generation=1`` performs an increment of collection." msgstr "" -#: library/gc.rst:69 +#: 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 " @@ -121,42 +109,34 @@ 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:76 +#: library/gc.rst:69 msgid "Return the debugging flags currently set." msgstr "Renvoie les options de débogage actives." -#: library/gc.rst:82 +#: library/gc.rst:74 #, fuzzy msgid "" "Returns a list of all objects tracked by the collector, excluding the list " -"returned. If *generation* is not ``None``, return only the objects as " -"follows:" +"returned. If *generation* is not ``None``, return only the objects tracked " +"by the collector that are in that generation." msgstr "" "Renvoie la liste des objets suivis par le ramasse-miettes, à l'exclusion de " "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:85 -msgid "0: All objects in the young generation" -msgstr "" - -#: library/gc.rst:86 -msgid "1: No objects, as there is no generation 1 (as of Python 3.14)" -msgstr "" - -#: library/gc.rst:87 -msgid "2: All objects in the old generation" -msgstr "" - -#: library/gc.rst:89 +#: library/gc.rst:78 msgid "New *generation* parameter." msgstr "ajout du paramètre *generation*." -#: library/gc.rst:92 +#: library/gc.rst:81 msgid "Generation 1 is removed" msgstr "" -#: library/gc.rst:95 +#: 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``." @@ -164,7 +144,7 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``gc.get_objects`` avec " "l'argument ``generation``." -#: library/gc.rst:99 +#: 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 " @@ -175,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:104 +#: 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:106 +#: library/gc.rst:98 msgid "" "``collected`` is the total number of objects collected inside this " "generation;" @@ -189,79 +169,106 @@ msgstr "" "``collected``, le nombre total d'objets qui ont été détruits alors qu'ils " "étaient dans cette génération ;" -#: library/gc.rst:109 +#: 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:118 +#: library/gc.rst:105 +#, fuzzy msgid "" -"Set the garbage collection thresholds (the collection frequency). Setting " -"*threshold0* to zero disables collection." +"``candidates`` is the total number of objects in this generation which were " +"considered for collection and traversed;" msgstr "" -"Règle les seuils de déclenchement du ramasse-miettes, qui déterminent sa " -"fréquence de passage. Si *threshold0* est mis à zéro, le ramasse-miettes ne " -"passe jamais." +"``collections``, le nombre de fois où cette génération a été examinée par le " +"ramasse-miettes ;" -#: library/gc.rst:121 +#: library/gc.rst:108 +#, fuzzy msgid "" -"The GC classifies objects into two generations depending on whether they " -"have survived a collection. New objects are placed in the young generation. " -"If an object survives a collection it is moved into the old generation." +"``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:125 -msgid "" -"In order to decide when to run, the collector keeps track of the number of " -"object allocations and deallocations since the last collection. When the " -"number of allocations minus the number of deallocations exceeds " -"*threshold0*, collection starts. For each collection, all the objects in the " -"young generation and some fraction of the old generation is collected." +#: library/gc.rst:113 +msgid "Add ``duration`` and ``candidates``." msgstr "" -#: library/gc.rst:131 +#: library/gc.rst:119 msgid "" -"In the free-threaded build, the increase in process memory usage is also " -"checked before running the collector. If the memory usage has not increased " -"by 10% since the last collection and the net number of object allocations " -"has not exceeded 40 times *threshold0*, the collection is not run." +"Set the garbage collection thresholds (the collection frequency). Setting " +"*threshold0* to zero disables collection." msgstr "" +"Règle les seuils de déclenchement du ramasse-miettes, qui déterminent sa " +"fréquence de passage. Si *threshold0* est mis à zéro, le ramasse-miettes ne " +"passe jamais." -#: library/gc.rst:136 +#: library/gc.rst:122 +#, fuzzy msgid "" -"The fraction of the old generation that is collected is **inversely** " -"proportional to *threshold1*. The larger *threshold1* is, the slower objects " -"in the old generation are collected. For the default value of 10, 1% of the " -"old generation is scanned during each collection." -msgstr "" - -#: library/gc.rst:141 -msgid "*threshold2* is ignored." -msgstr "" +"The GC classifies objects into three generations depending on how many " +"collection sweeps they have survived. New objects are placed in the " +"youngest generation (generation ``0``). If an object survives a collection " +"it is moved into the next older generation. Since generation ``2`` is the " +"oldest generation, objects in that generation remain there after a " +"collection. In order to decide when to run, the collector keeps track of " +"the number object allocations and deallocations since the last collection. " +"When the number of allocations minus the number of deallocations exceeds " +"*threshold0*, collection starts. Initially only generation ``0`` is " +"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 " +"information." +msgstr "" +"Les objets sont répartis en trois générations en fonction du nombre de " +"passages du ramasse-miettes qui les ont laissés intacts. Les objets " +"fraîchement créés sont placés dans la génération la plus jeune, numéro 0. À " +"chaque fois qu'un objet persiste à la suite d'un passage du ramasse-miettes, " +"il monte d'une génération, ceci jusqu'à la génération 2, la plus âgée. Le " +"ramasse-miettes se déclenche en fonction du nombre d'allocations et de " +"destructions depuis le passage précédent : lorsque les allocations moins les " +"destructions font plus que *threshold0*, un passage est initié. Lors des " +"premiers passages, seule la génération 0 est inspectée. La génération 1 est " +"examinée périodiquement, lorsque le nombre de passages sur la génération 0 " +"depuis le dernier passage ayant aussi examiné la génération 1 vient à " +"excéder *threshold1*. Les règles pour la génération 2 sont plus complexes. " +"Pour avoir des détails, voir `Collecting the oldest generation `_ " +"(dans le guide du développeur, en anglais)." -#: library/gc.rst:143 +#: library/gc.rst:136 msgid "" -"See `Garbage collector design `_ for more information." msgstr "" -#: library/gc.rst:145 +#: library/gc.rst:138 msgid "*threshold2* is ignored" msgstr "" -#: library/gc.rst:151 +#: 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:157 +#: library/gc.rst:153 msgid "" "Return the current collection thresholds as a tuple of ``(threshold0, " "threshold1, threshold2)``." @@ -269,7 +276,7 @@ msgstr "" "Renvoie les seuils de passage sous la forme du triplet ``(threshold0, " "threshold1, threshold2)``." -#: library/gc.rst:163 +#: 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; " @@ -282,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:168 +#: 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 " @@ -293,7 +300,7 @@ msgstr "" "mémoire à cause d'un cycle. Pour les exclure, appelez :func:`collect` juste " "avant :func:`get_referrers`." -#: library/gc.rst:174 +#: 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 " @@ -305,7 +312,7 @@ msgstr "" "temporairement instable. Mieux vaut réserver :func:`get_referrers` au " "débogage." -#: library/gc.rst:179 +#: library/gc.rst:175 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referrers`` with " "argument ``objs``." @@ -313,7 +320,7 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``gc.get_referrers`` avec " "l'argument ``objs``." -#: library/gc.rst:184 +#: 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-" @@ -337,7 +344,7 @@ msgstr "" "arguments contient un entier, ce dernier objet peut être présent ou non dans " "la liste." -#: library/gc.rst:192 +#: library/gc.rst:188 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referents`` with " "argument ``objs``." @@ -345,7 +352,7 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``gc.get_referents`` avec " "l'argument ``objs``." -#: library/gc.rst:196 +#: 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 " @@ -362,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:219 +#: library/gc.rst:215 msgid "" "Returns ``True`` if the given object has been finalized by the garbage " "collector, ``False`` otherwise. ::" @@ -370,13 +377,13 @@ msgstr "" "Renvoie ``True`` ou ``False`` selon que l'argument a été finalisé par le " "ramasse-miettes. ::" -#: library/gc.rst:240 +#: 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:243 +#: 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 " @@ -388,17 +395,17 @@ msgid "" "``gc.enable()`` early in child processes." msgstr "" -#: library/gc.rst:257 +#: library/gc.rst:253 msgid "" "Unfreeze the objects in the permanent generation, put them back into the " "oldest generation." msgstr "" -#: library/gc.rst:265 +#: library/gc.rst:261 msgid "Return the number of objects in the permanent generation." msgstr "" -#: library/gc.rst:270 +#: library/gc.rst:266 msgid "" "The following variables are provided for read-only access (you can mutate " "the values but should not rebind them):" @@ -406,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:275 +#: 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 " @@ -419,7 +426,7 @@ msgstr "" "types d'extension définis en C avec un champ ``tp_del`` différent de " "``NULL``." -#: library/gc.rst:280 +#: library/gc.rst:276 msgid "" "If :const:`DEBUG_SAVEALL` is set, then all unreachable objects will be added " "to this list rather than freed." @@ -427,7 +434,7 @@ 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:283 +#: 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. " @@ -440,7 +447,7 @@ msgstr "" "si :const:`DEBUG_UNCOLLECTABLE` est actif, tous les objets indestructibles " "sont affichés." -#: library/gc.rst:289 +#: library/gc.rst:285 #, fuzzy msgid "" "Following :pep:`442`, objects with a :meth:`~object.__del__` method don't " @@ -449,7 +456,7 @@ msgstr "" "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:295 +#: 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* " @@ -458,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:299 +#: library/gc.rst:295 msgid "*phase* can be one of two values:" msgstr "*phase* peut prendre deux valeurs :" -#: library/gc.rst:301 +#: 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:303 +#: 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:305 +#: library/gc.rst:301 msgid "" "*info* is a dict providing more information for the callback. The following " "keys are currently defined:" @@ -479,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:308 +#: 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:310 +#: library/gc.rst:306 msgid "" "\"collected\": When *phase* is \"stop\", the number of objects successfully " "collected." @@ -491,7 +498,7 @@ msgstr "" "``\"collected\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " "détruits avec succès ;" -#: library/gc.rst:313 +#: 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`." @@ -499,7 +506,25 @@ msgstr "" "``\"uncollectable\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " "indestructibles ajoutés à :data:`garbage`." -#: library/gc.rst:316 +#: 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:" @@ -507,7 +532,7 @@ msgstr "" "Toute application peut ajouter ses propres fonctions de rappel à cette " "liste. Voici les principales applications :" -#: library/gc.rst:319 +#: library/gc.rst:321 msgid "" "Gathering statistics about garbage collection, such as how often various " "generations are collected, and how long the collection takes." @@ -516,7 +541,7 @@ msgstr "" "fréquence à laquelle chaque génération est examinée, ou bien le temps d'un " "passage ;" -#: library/gc.rst:323 +#: library/gc.rst:325 msgid "" "Allowing applications to identify and clear their own uncollectable types " "when they appear in :data:`garbage`." @@ -524,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:329 +#: 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:334 +#: library/gc.rst:339 msgid "" "Print statistics during collection. This information can be useful when " "tuning the collection frequency." @@ -538,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:340 +#: library/gc.rst:345 msgid "Print information on collectable objects found." msgstr "Affiche des informations sur les objets détruits." -#: library/gc.rst:345 +#: 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 " @@ -552,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:349 +#: library/gc.rst:354 msgid "" "Also print the contents of the :data:`garbage` list at :term:`interpreter " "shutdown`, if it isn't empty." @@ -561,7 +590,7 @@ msgstr "" "l'interpréteur `, pour peu que cette liste ne soit pas " "vide." -#: library/gc.rst:355 +#: 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." @@ -570,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:361 +#: 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 | " @@ -578,37 +607,3 @@ msgid "" msgstr "" "Combinaison des options utiles au débogage d'une fuite de mémoire. Il s'agit " "d'un raccourci pour ``DEBUG_COLLECTABLE|DEBUG_UNCOLLECTABLE|DEBUG_SAVEALL``." - -#~ msgid "" -#~ "The GC classifies objects into three generations depending on how many " -#~ "collection sweeps they have survived. New objects are placed in the " -#~ "youngest generation (generation ``0``). If an object survives a " -#~ "collection it is moved into the next older generation. Since generation " -#~ "``2`` is the oldest generation, objects in that generation remain there " -#~ "after a collection. In order to decide when to run, the collector keeps " -#~ "track of the number object allocations and deallocations since the last " -#~ "collection. When the number of allocations minus the number of " -#~ "deallocations exceeds *threshold0*, collection starts. Initially only " -#~ "generation ``0`` is 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 information." -#~ msgstr "" -#~ "Les objets sont répartis en trois générations en fonction du nombre de " -#~ "passages du ramasse-miettes qui les ont laissés intacts. Les objets " -#~ "fraîchement créés sont placés dans la génération la plus jeune, numéro 0. " -#~ "À chaque fois qu'un objet persiste à la suite d'un passage du ramasse-" -#~ "miettes, il monte d'une génération, ceci jusqu'à la génération 2, la plus " -#~ "âgée. Le ramasse-miettes se déclenche en fonction du nombre d'allocations " -#~ "et de destructions depuis le passage précédent : lorsque les allocations " -#~ "moins les destructions font plus que *threshold0*, un passage est initié. " -#~ "Lors des premiers passages, seule la génération 0 est inspectée. La " -#~ "génération 1 est examinée périodiquement, lorsque le nombre de passages " -#~ "sur la génération 0 depuis le dernier passage ayant aussi examiné la " -#~ "génération 1 vient à excéder *threshold1*. Les règles pour la génération " -#~ "2 sont plus complexes. Pour avoir des détails, voir `Collecting the " -#~ "oldest generation `_ (dans le guide du développeur, en " -#~ "anglais)." diff --git a/library/getpass.po b/library/getpass.po index 5b89c194c3..39e046fe7b 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: 2025-10-17 09:58+0200\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,7 +19,7 @@ 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`" @@ -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,7 +54,7 @@ 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, " @@ -62,7 +63,7 @@ msgid "" "asterisks instead of the actual input." msgstr "" -#: library/getpass.rst:34 +#: 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 " @@ -72,7 +73,7 @@ msgstr "" "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:39 +#: 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." @@ -80,30 +81,70 @@ 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:43 +#: library/getpass.rst:39 msgid "" "On Unix systems, when *echo_char* is set, the terminal will be configured to " "operate in :manpage:`noncanonical mode " -"`. In particular, this means " -"that line editing shortcuts such as :kbd:`Ctrl+U` will not work and may " -"insert unexpected characters into the input." +"`. 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 "Added the *echo_char* parameter for keyboard feedback." +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:60 +#: library/getpass.rst:70 msgid "Return the \"login name\" of the user." msgstr "Renvoie le *login name* de l'utilisateur." -#: library/getpass.rst:62 +#: library/getpass.rst:72 #, fuzzy msgid "" "This function checks the environment " @@ -121,11 +162,11 @@ msgstr "" "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:69 +#: 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:71 +#: 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 47edb98e90..6c9154a3de 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -20,13 +20,14 @@ msgstr "" 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 " @@ -43,20 +44,21 @@ msgstr "" "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,10 +74,11 @@ 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 " +"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 " @@ -90,7 +93,7 @@ msgstr "" "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. [#]_" @@ -98,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 " @@ -108,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 " @@ -120,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 " @@ -139,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 " @@ -155,13 +158,13 @@ msgstr "" "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`), " @@ -172,7 +175,7 @@ msgstr "" "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, " @@ -182,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 " @@ -210,7 +213,7 @@ 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 " @@ -223,7 +226,7 @@ msgstr "" "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 " @@ -243,7 +246,7 @@ msgstr "" "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:" @@ -252,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 " @@ -268,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 " @@ -290,7 +293,7 @@ msgstr "" "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 " @@ -303,7 +306,7 @@ msgstr "" "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 " @@ -314,19 +317,19 @@ msgstr "" "*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`." -#: 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 " @@ -337,7 +340,7 @@ msgstr "" "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." @@ -345,7 +348,7 @@ msgstr "" "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 " @@ -355,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 " @@ -366,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 " @@ -389,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* " @@ -403,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 " @@ -415,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 " @@ -425,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." @@ -433,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. " @@ -443,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." @@ -451,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." @@ -459,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 " @@ -468,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 ``_``." @@ -480,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 " @@ -494,7 +497,7 @@ 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 " @@ -511,7 +514,7 @@ msgstr "" "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 " @@ -520,15 +523,15 @@ 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 " @@ -541,7 +544,7 @@ msgstr "" "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 " @@ -567,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()`` " @@ -577,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 " @@ -586,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, " @@ -597,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 " @@ -619,7 +622,7 @@ msgstr "" "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 " @@ -630,7 +633,7 @@ 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 " @@ -642,11 +645,11 @@ msgstr "" "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 " @@ -661,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 " @@ -671,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` " @@ -683,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 " @@ -697,20 +700,21 @@ 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 " @@ -720,7 +724,7 @@ msgstr "" "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 " @@ -730,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 " @@ -748,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 " @@ -787,7 +793,7 @@ msgstr "" "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 " @@ -796,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 " @@ -820,7 +826,7 @@ msgstr "" "programme de François Pinard, nommé :program:`xpot`, fait de même et est " "disponible dans son `paquet po-utils `__." -#: library/gettext.rst:452 +#: library/gettext.rst:449 msgid "" "(Python also includes pure-Python versions of these programs, " "called :program:`pygettext.py` and :program:`msgfmt.py`; some Python " @@ -845,7 +851,7 @@ msgstr "" "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 +#: library/gettext.rst:461 msgid "" ":program:`xgettext`, :program:`pygettext`, and similar tools " "generate :file:`.po` files that are message catalogs. They are structured " @@ -858,14 +864,15 @@ 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 " +"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 " @@ -877,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 "" @@ -887,11 +895,11 @@ 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 " @@ -901,7 +909,7 @@ msgstr "" "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` " @@ -913,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:`!_` " @@ -931,7 +939,7 @@ msgstr "" "à 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::" @@ -939,7 +947,7 @@ 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::" @@ -947,11 +955,11 @@ 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 " @@ -961,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 " @@ -976,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 " @@ -985,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 " @@ -1005,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 " @@ -1016,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:`!" @@ -1042,11 +1050,11 @@ msgstr "" "est totalement arbitraire et aurait très bien pu " "être :func:`MarqueurDeTraduction`." -#: library/gettext.rst:616 +#: 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 " @@ -1056,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 " @@ -1112,7 +1120,7 @@ msgstr "" "préférable d'appeler :func:`bindtextdomain` en donnant explicitement un " "chemin absolu au début de votre application." -#: library/gettext.rst:647 +#: library/gettext.rst:644 msgid "See the footnote for :func:`bindtextdomain` above." msgstr "Voir la note de :func:`bindtextdomain` ci-dessus." diff --git a/library/glob.po b/library/glob.po index d29c59ab29..23f9b88a93 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: 2025-10-17 09:58+0200\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." @@ -47,15 +46,21 @@ msgstr "" "d'utiliser les fonctions :func:`os.path.expanduser` " "et :func:`os.path.expandvars`.)" -#: library/glob.rst:28 +#: 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 ``'?'``." @@ -63,11 +68,11 @@ 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 " @@ -88,11 +93,12 @@ msgstr "" "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 " +"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-" @@ -101,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." @@ -109,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 " @@ -121,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``." @@ -135,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``." @@ -143,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." @@ -151,25 +157,32 @@ 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." @@ -177,7 +190,7 @@ msgstr "" "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 " @@ -192,53 +205,53 @@ msgstr "" "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 " +"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." 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 " @@ -253,7 +266,7 @@ msgstr "" "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` " @@ -263,14 +276,14 @@ msgstr "" "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 e7dbfbd9e3..5d00dcc8b5 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: 2025-10-17 09:58+0200\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" @@ -305,7 +305,8 @@ msgid "Exceptions" msgstr "Exceptions" #: library/graphlib.rst:207 -msgid "The :mod:`graphlib` module defines the following exception classes:" +#, 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:211 diff --git a/library/grp.po b/library/grp.po index d1f54f99fc..ffc92aa403 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: 2025-10-17 09:58+0200\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,84 +18,84 @@ 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 "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 " @@ -106,36 +106,36 @@ msgid "" "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." 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 e9997fc728..fda3eaf744 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: 2025-10-17 09:58+0200\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" @@ -33,13 +33,22 @@ msgstr "" "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 :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 " @@ -52,7 +61,7 @@ msgstr "" "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 " @@ -63,11 +72,11 @@ msgstr "" "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`." @@ -75,7 +84,7 @@ 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 " @@ -85,7 +94,7 @@ msgstr "" "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'``, " @@ -95,7 +104,7 @@ 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." @@ -103,7 +112,7 @@ 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 " @@ -114,7 +123,7 @@ 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 " @@ -124,7 +133,7 @@ msgstr "" "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." @@ -132,22 +141,29 @@ 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:173 +#: 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 "" +"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: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:72 +#: library/gzip.rst:79 #, fuzzy msgid "" "Constructor for the :class:`GzipFile` class, which simulates most of the " @@ -160,7 +176,7 @@ msgstr "" "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. " @@ -172,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 " @@ -187,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'``, " @@ -202,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 " @@ -212,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 " @@ -224,20 +240,24 @@ 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 " @@ -253,7 +273,7 @@ msgstr "" "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, " @@ -265,12 +285,12 @@ msgstr "" "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. The number " @@ -281,7 +301,7 @@ msgstr "" "l'appel. Le nombre d'octets retournés peut être supérieur ou inférieur au " "nombre demandé." -#: library/gzip.rst:127 +#: 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 " @@ -293,15 +313,15 @@ msgstr "" "sous-jacent (par exemple, si l'instance de :class:`GzipFile` a été " "construite avec le paramètre *fileobj*)." -#: library/gzip.rst:136 +#: library/gzip.rst:147 msgid "``'rb'`` for reading and ``'wb'`` for writing." msgstr "" -#: library/gzip.rst:138 +#: library/gzip.rst:149 msgid "In previous versions it was an integer ``1`` or ``2``." msgstr "" -#: library/gzip.rst:143 +#: library/gzip.rst:154 #, fuzzy msgid "" "When decompressing, this attribute is set to the last timestamp in the most " @@ -314,14 +334,14 @@ msgstr "" "attribut, comme un entier. La valeur initiale avant lecture d'un en-tête est " "``None``." -#: library/gzip.rst:150 +#: 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:154 +#: library/gzip.rst:165 msgid "" "Support for the :keyword:`with` statement was added, along with the *mtime* " "constructor argument and :attr:`mtime` attribute." @@ -329,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:158 +#: 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:161 +#: 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:164 +#: 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:167 +#: library/gzip.rst:178 msgid "" "Added support for writing arbitrary :term:`bytes-like objects `. The :meth:`~io.BufferedIOBase.read` method now accepts an argument " @@ -353,19 +373,19 @@ msgstr "" "` arbitraires. La méthode :meth:`~io.BufferedIOBase.read` " "accepte désormais un argument de valeur ``None``." -#: library/gzip.rst:176 +#: library/gzip.rst:187 msgid "" "Opening :class:`GzipFile` for writing without specifying the *mode* argument " "is deprecated." msgstr "" -#: library/gzip.rst:180 +#: library/gzip.rst:191 msgid "" "Remove the ``filename`` attribute, use the :attr:`~GzipFile.name` attribute " "instead." msgstr "" -#: library/gzip.rst:187 +#: library/gzip.rst:203 #, fuzzy msgid "" "Compress the *data*, returning a :class:`bytes` object containing the " @@ -377,11 +397,11 @@ msgstr "" "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:193 +#: library/gzip.rst:209 msgid "Added the *mtime* parameter for reproducible output." msgstr "" -#: library/gzip.rst:195 +#: 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 " @@ -390,19 +410,19 @@ msgid "" "supplied by the underlying zlib implementation." msgstr "" -#: library/gzip.rst:202 +#: 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:205 +#: 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:212 +#: 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 " @@ -411,40 +431,40 @@ msgid "" "*wbits* set to 31 is faster." msgstr "" -#: library/gzip.rst:219 +#: 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:226 +#: library/gzip.rst:246 msgid "Examples of usage" msgstr "Exemples d'utilisation" -#: library/gzip.rst:228 +#: library/gzip.rst:248 msgid "Example of how to read a compressed file::" msgstr "Exemple montrant comment lire un fichier compressé ::" -#: library/gzip.rst:234 +#: 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:241 +#: 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:249 +#: 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:257 +#: library/gzip.rst:277 msgid "Module :mod:`zlib`" msgstr "Module :mod:`zlib`" -#: library/gzip.rst:258 +#: library/gzip.rst:278 msgid "" "The basic data compression module needed to support the :program:`gzip` file " "format." @@ -452,53 +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:261 +#: 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:271 -msgid "Command Line Interface" +#: library/gzip.rst:291 +#, fuzzy +msgid "Command-line interface" msgstr "Interface en ligne de commande" -#: library/gzip.rst:273 +#: 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:276 -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:280 +#: 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:284 -msgid "Command line options" +#: library/gzip.rst:304 +#, fuzzy +msgid "Command-line options" msgstr "Options de la ligne de commande" -#: library/gzip.rst:288 +#: library/gzip.rst:308 msgid "If *file* is not specified, read from :data:`sys.stdin`." msgstr "" -#: library/gzip.rst:292 +#: library/gzip.rst:312 msgid "Indicates the fastest compression method (less compression)." msgstr "" -#: library/gzip.rst:296 +#: library/gzip.rst:316 msgid "Indicates the slowest compression method (best compression)." msgstr "" -#: library/gzip.rst:300 +#: library/gzip.rst:320 msgid "Decompress the given file." msgstr "" -#: library/gzip.rst:304 +#: library/gzip.rst:324 msgid "Show the help message." msgstr "Affiche le message d'aide." diff --git a/library/hashlib.po b/library/hashlib.po index a223dcdd37..70f9e6c796 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -20,11 +20,11 @@ msgid ":mod:`!hashlib` --- Secure hashes and message digests" msgstr "" ":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 hash algorithms. " @@ -44,7 +44,7 @@ msgstr "" "de synthèse de messages ». Le terme moderne est « algorithme de hachage " "sécurisé »." -#: library/hashlib.rst:31 +#: library/hashlib.rst:28 msgid "" "If you want the adler32 or crc32 hash functions, they are available in " "the :mod:`zlib` module." @@ -52,11 +52,11 @@ 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:38 +#: library/hashlib.rst:35 msgid "Hash algorithms" msgstr "Algorithmes de hachage" -#: library/hashlib.rst:40 +#: 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: " @@ -79,7 +79,7 @@ msgstr "" "ou :meth:`hexdigest()`." # suit un : -#: library/hashlib.rst:48 +#: 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 " @@ -90,7 +90,7 @@ msgstr "" "supérieure à 2047 octets lors de leur création ou leur mise à jour " "(méthode :meth:`.update`.)." -#: library/hashlib.rst:55 +#: 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`, " @@ -106,16 +106,16 @@ msgstr "" "« conforme FIPS ». Cette liste correspond au résultat de la " "fonction :data:`algorithms_guaranteed`." -#: library/hashlib.rst:63 +#: 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 " +"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:70 +#: 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-" @@ -126,7 +126,7 @@ msgstr "" "à la section `Voir aussi`_ à la fin du document." # suit un : -#: library/hashlib.rst:74 +#: 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` " @@ -137,7 +137,7 @@ msgstr "" "ont été ajoutés. :func:`blake2b` et :func:`blake2s` ont été ajoutés." # suit un : -#: library/hashlib.rst:82 +#: 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 " @@ -152,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:89 +#: 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:92 +#: 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:98 +#: 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:100 +#: library/hashlib.rst:104 #, fuzzy msgid "" "To obtain the digest of the byte string ``b\"Nobody inspects the spammish " @@ -176,15 +184,15 @@ msgstr "" "Par exemple, pour obtenir l'empreinte de la chaîne ``b\"Nobody inspects the " "spammish repetition\"`` ::" -#: library/hashlib.rst:112 +#: library/hashlib.rst:116 msgid "More condensed:" msgstr "En plus condensé :" -#: library/hashlib.rst:118 +#: library/hashlib.rst:122 msgid "Constructors" msgstr "Constructeurs" -#: library/hashlib.rst:122 +#: library/hashlib.rst:126 #, fuzzy msgid "" "Is a generic constructor that takes the string *name* of the desired " @@ -197,26 +205,26 @@ msgstr "" "algorithmes listés ci-dessus ainsi qu'aux autres algorithmes que votre " "bibliothèque OpenSSL peut offrir." -#: library/hashlib.rst:127 +#: 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:146 +#: library/hashlib.rst:150 msgid "" "Named constructors such as these are faster than passing an algorithm name " "to :func:`new`." msgstr "" -#: library/hashlib.rst:150 +#: library/hashlib.rst:154 msgid "Attributes" msgstr "" -#: library/hashlib.rst:152 +#: library/hashlib.rst:156 msgid "Hashlib provides the following constant module attributes:" msgstr "*Hashlib* fournit les constantes de module suivantes :" -#: library/hashlib.rst:156 +#: 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 " @@ -228,7 +236,7 @@ msgstr "" "dans cette liste bien que certains éditeurs diffusent une implémentation " "Python dont la bibliothèque « compatible FIPS » le bloque." -#: library/hashlib.rst:165 +#: 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 " @@ -242,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:174 +#: library/hashlib.rst:178 msgid "Hash Objects" msgstr "Objets de calcul d'empreinte" -#: library/hashlib.rst:176 +#: library/hashlib.rst:180 msgid "" "The following values are provided as constant attributes of the hash objects " "returned by the constructors:" @@ -254,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:181 +#: 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:185 +#: 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:187 +#: 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:191 +#: 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." @@ -276,7 +284,7 @@ msgstr "" "autre objet de calcul d'empreinte de ce type." # suit un : -#: library/hashlib.rst:194 +#: 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 " @@ -286,11 +294,11 @@ msgstr "" "pas spécifié formellement jusqu'à Python 3.4, il peut ne pas exister sur " "certaines plate-formes." -#: library/hashlib.rst:199 +#: 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:204 +#: 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: " @@ -300,7 +308,7 @@ 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:212 +#: 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 " @@ -310,7 +318,7 @@ msgstr "" "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:219 +#: 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 " @@ -321,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:226 +#: 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." @@ -330,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:231 +#: library/hashlib.rst:235 msgid "SHAKE variable length digests" msgstr "Empreintes de messages de taille variable SHAKE" -#: library/hashlib.rst:236 +#: 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 " @@ -347,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:243 +#: 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 " @@ -357,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:250 +#: 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 " @@ -368,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:254 +#: library/hashlib.rst:258 msgid "Example use:" msgstr "Exemple :" -#: library/hashlib.rst:261 +#: library/hashlib.rst:265 msgid "File hashing" msgstr "Calcul d'empreinte (ou hachage) de fichiers" -#: library/hashlib.rst:263 +#: library/hashlib.rst:267 msgid "" "The hashlib module provides a helper function for efficient hashing of a " "file or file-like object." @@ -385,14 +393,14 @@ msgstr "" "efficacement l'empreinte (aussi appelée condensat) d'un fichier ou d'un " "objet fichier-compatible." -#: library/hashlib.rst:268 +#: 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:270 +#: library/hashlib.rst:274 #, fuzzy msgid "" "*fileobj* must be a file-like object opened for reading in binary mode. It " @@ -410,7 +418,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:276 +#: library/hashlib.rst:280 #, fuzzy msgid "" "The function may bypass Python's I/O and use the file descriptor " @@ -427,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:281 +#: 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." @@ -435,21 +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:284 +#: library/hashlib.rst:288 msgid "Example:" msgstr "Exemple :" -#: library/hashlib.rst:305 +#: 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:311 +#: library/hashlib.rst:315 msgid "Key derivation" msgstr "Dérivation de clé" -#: library/hashlib.rst:313 +#: 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 " @@ -463,7 +471,7 @@ msgstr "" "bonne fonction de hachage doit être paramétrable, lente et inclure un " "`salage `_." -#: library/hashlib.rst:321 +#: library/hashlib.rst:325 msgid "" "The function provides PKCS#5 password-based key derivation function 2. It " "uses HMAC as pseudorandom function." @@ -472,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:324 +#: 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 " @@ -487,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:330 +#: 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 " @@ -504,7 +512,7 @@ msgstr "" "recommandées lorsqu'on utilise pbkdf2`_ (page en anglais) expliquent tout en " "détail." -#: library/hashlib.rst:336 +#: 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 " @@ -514,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:345 +#: library/hashlib.rst:349 msgid "Function only available when Python is compiled with OpenSSL." msgstr "" -#: library/hashlib.rst:349 +#: 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:355 +#: library/hashlib.rst:359 msgid "" "The function provides scrypt password-based key derivation function as " "defined in :rfc:`7914`." @@ -532,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:358 +#: library/hashlib.rst:362 msgid "" "*password* and *salt* must be :term:`bytes-like objects `. Applications and libraries should limit *password* to a sensible " @@ -544,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:363 +#: 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). " @@ -555,11 +563,11 @@ 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:373 +#: library/hashlib.rst:377 msgid "BLAKE2" msgstr "BLAKE2" -#: library/hashlib.rst:380 +#: library/hashlib.rst:382 msgid "" "BLAKE2_ is a cryptographic hash function defined in :rfc:`7693` that comes " "in two flavors:" @@ -567,7 +575,7 @@ msgstr "" "BLAKE2_ est une fonction de hachage cryptographique définie dans " "la :rfc:`7693` et disponible en deux versions :" -#: library/hashlib.rst:383 +#: library/hashlib.rst:385 msgid "" "**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " "between 1 and 64 bytes," @@ -575,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:386 +#: library/hashlib.rst:388 msgid "" "**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " "any size between 1 and 32 bytes." @@ -583,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:389 +#: library/hashlib.rst:391 msgid "" "BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " "**salted hashing**, **personalization**, and **tree hashing**." @@ -592,25 +600,26 @@ msgstr "" "plus simple que HMAC_), **salted hashing**, **personalization** et le **tree " "hashing**." -#: library/hashlib.rst:392 +#: 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:397 +#: library/hashlib.rst:399 msgid "Creating hash objects" msgstr "Création d'objets de calcul d'empreinte" -#: library/hashlib.rst:399 +#: 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:413 +#: library/hashlib.rst:415 msgid "" "These functions return the corresponding hash objects for calculating " "BLAKE2b or BLAKE2s. They optionally take these general parameters:" @@ -618,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:416 +#: 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." @@ -627,11 +636,11 @@ msgstr "" "octets-compatible `. Il ne peut être passé que comme " "argument positionnel." -#: library/hashlib.rst:419 +#: 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:421 +#: library/hashlib.rst:423 msgid "" "*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " "BLAKE2s)." @@ -639,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:424 +#: library/hashlib.rst:426 msgid "" "*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " "bytes for BLAKE2s)." @@ -647,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:427 +#: library/hashlib.rst:429 msgid "" "*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " "for BLAKE2s)." @@ -655,57 +664,57 @@ msgstr "" "*person* : chaîne de personnalisation (jusqu'à 16 octets pour BLAKE2b, " "jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:430 +#: 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:433 +#: library/hashlib.rst:435 msgid "Hash" msgstr "Hash" -#: library/hashlib.rst:433 +#: library/hashlib.rst:435 msgid "digest_size" msgstr "digest_size" -#: library/hashlib.rst:433 +#: library/hashlib.rst:435 msgid "len(key)" msgstr "len(key)" -#: library/hashlib.rst:433 +#: library/hashlib.rst:435 msgid "len(salt)" msgstr "len(salt)" -#: library/hashlib.rst:433 +#: library/hashlib.rst:435 msgid "len(person)" msgstr "len(person)" -#: library/hashlib.rst:435 +#: library/hashlib.rst:437 msgid "BLAKE2b" msgstr "BLAKE2b" -#: library/hashlib.rst:435 +#: library/hashlib.rst:437 msgid "64" msgstr "64" -#: library/hashlib.rst:435 +#: library/hashlib.rst:437 msgid "16" msgstr "16" -#: library/hashlib.rst:436 +#: library/hashlib.rst:438 msgid "BLAKE2s" msgstr "BLAKE2s" -#: library/hashlib.rst:436 +#: library/hashlib.rst:438 msgid "32" msgstr "32" -#: library/hashlib.rst:436 +#: library/hashlib.rst:438 msgid "8" msgstr "8" # suit un : -#: library/hashlib.rst:441 +#: library/hashlib.rst:443 msgid "" "BLAKE2 specification defines constant lengths for salt and personalization " "parameters, however, for convenience, this implementation accepts byte " @@ -722,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:448 +#: 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:450 +#: 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:452 +#: 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:454 +#: library/hashlib.rst:456 msgid "" "*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " "mode)." @@ -749,7 +758,7 @@ msgstr "" "*depth* : profondeur maximale de l'arbre (1 à 255, 255 si illimité, 1 " "correspond au mode séquentiel)." -#: library/hashlib.rst:457 +#: library/hashlib.rst:459 msgid "" "*leaf_size*: maximal byte length of leaf (0 to ``2**32-1``, 0 if unlimited " "or in sequential mode)." @@ -757,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:460 +#: 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)." @@ -766,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:463 +#: 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:465 +#: library/hashlib.rst:467 msgid "" "*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " "in sequential mode)." @@ -781,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:468 +#: library/hashlib.rst:470 msgid "" "*last_node*: boolean indicating whether the processed node is the last one " "(``False`` for sequential mode)." @@ -789,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:471 +#: library/hashlib.rst:473 msgid "Explanation of tree mode parameters." msgstr "Explication des paramètres du mode arbre." -#: library/hashlib.rst:475 +#: library/hashlib.rst:477 msgid "" "See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." @@ -801,38 +810,38 @@ msgstr "" "Voir la section 2.10 dans `BLAKE2 specification `_ pour une approche globale du hachage en mode arbre." -#: library/hashlib.rst:481 +#: library/hashlib.rst:483 msgid "Constants" msgstr "Constantes" -#: library/hashlib.rst:486 +#: 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:492 +#: 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:498 +#: library/hashlib.rst:500 msgid "Maximum key size." msgstr "Taille maximale de clé." -#: library/hashlib.rst:504 +#: 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:508 +#: library/hashlib.rst:510 msgid "Examples" msgstr "Exemples" -#: library/hashlib.rst:511 +#: library/hashlib.rst:513 msgid "Simple hashing" msgstr "Hachage simple" -#: library/hashlib.rst:513 +#: 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` " @@ -849,7 +858,7 @@ msgstr "" "méthode :meth:`~hash.digest` (ou :meth:`~hash.hexdigest` pour les chaînes " "hexadécimales)." -#: library/hashlib.rst:526 +#: 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:" @@ -858,7 +867,7 @@ msgstr "" "argument positionnel, le premier morceau du message pour le mettre " "directement à jour :" -#: library/hashlib.rst:533 +#: library/hashlib.rst:535 msgid "" "You can call :meth:`hash.update` as many times as you need to iteratively " "update the hash:" @@ -866,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:547 +#: library/hashlib.rst:549 msgid "Using different digest sizes" msgstr "Production de tailles d'empreintes différentes" -#: library/hashlib.rst:549 +#: 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 " @@ -881,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:563 +#: 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 " @@ -893,11 +902,11 @@ msgstr "" "produisent des sorties différentes même si les longueurs de sortie sont les " "mêmes :" -#: library/hashlib.rst:579 +#: library/hashlib.rst:581 msgid "Keyed hashing" msgstr "Hachage avec clé – Code d'authentification de message" -#: library/hashlib.rst:581 +#: library/hashlib.rst:583 msgid "" "Keyed hashing can be used for authentication as a faster and simpler " "replacement for `Hash-based message authentication code `_)" @@ -1000,7 +1009,7 @@ msgstr "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_, article en anglais)" -#: library/hashlib.rst:665 +#: 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." @@ -1008,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:670 +#: 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 " @@ -1020,11 +1029,11 @@ msgstr "" "de passe. Voir `la FAQ BLAKE2 `_ (page en anglais) " "pour plus d'informations." -#: library/hashlib.rst:693 +#: library/hashlib.rst:695 msgid "Personalization" msgstr "Personnalisation" -#: library/hashlib.rst:695 +#: 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 " @@ -1034,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:699 +#: 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 " @@ -1051,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:706 +#: library/hashlib.rst:708 msgid "" "(`The Skein Hash Function Family `_, p. 21)" @@ -1059,12 +1068,12 @@ msgstr "" "(`The Skein Hash Function Family `_, p. 21, article en anglais)" -#: library/hashlib.rst:710 +#: 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:724 +#: library/hashlib.rst:726 msgid "" "Personalization together with the keyed mode can also be used to derive " "different keys from a single one." @@ -1072,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:738 +#: library/hashlib.rst:740 msgid "Tree mode" msgstr "Mode Arbre" -#: library/hashlib.rst:740 +#: 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:746 +#: library/hashlib.rst:748 msgid "" "This example uses 64-byte internal digests, and returns the 32-byte final " "digest::" @@ -1090,11 +1099,11 @@ msgstr "" "Cet exemple utilise en interne des empreintes de 64 octets, et produit " "finalement des empreintes 32 octets ::" -#: library/hashlib.rst:776 +#: library/hashlib.rst:778 msgid "Credits" msgstr "Crédits" -#: library/hashlib.rst:778 +#: 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_ " @@ -1106,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:783 +#: library/hashlib.rst:785 msgid "" "It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " "Bernstein*." @@ -1114,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:785 +#: 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 " @@ -1125,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:789 +#: 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:791 +#: library/hashlib.rst:793 msgid "" "The following public domain dedication applies for both C hash function " "implementation, extension code, and this documentation:" @@ -1138,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:794 +#: 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 " @@ -1149,7 +1158,7 @@ msgstr "" "domaine public dans le monde entier. Ce logiciel est distribué sans aucune " "garantie." -#: library/hashlib.rst:798 +#: 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/" @@ -1159,7 +1168,7 @@ msgstr "" "Domain Dedication*. Sinon, voir https://creativecommons.org/publicdomain/" "zero/1.0/." -#: library/hashlib.rst:802 +#: 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 " @@ -1169,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:806 +#: library/hashlib.rst:808 msgid "*Alexandr Sokolovskiy*" msgstr "*Alexandr Sokolovskiy*" -#: library/hashlib.rst:827 +#: library/hashlib.rst:829 msgid "Module :mod:`hmac`" msgstr "Module :mod:`hmac`" -#: library/hashlib.rst:828 +#: 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:830 +#: library/hashlib.rst:832 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/hashlib.rst:831 +#: 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:833 +#: 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:834 +#: 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:836 +#: 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:837 +#: 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:839 +#: library/hashlib.rst:841 msgid "https://www.blake2.net/" msgstr "https://www.blake2.net/" -#: library/hashlib.rst:840 +#: library/hashlib.rst:842 msgid "Official BLAKE2 website." msgstr "Site officiel de BLAKE2." -#: library/hashlib.rst:842 +#: 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:843 +#: library/hashlib.rst:845 msgid "" "Wikipedia article with information on which algorithms have known issues and " "what that means regarding their use." @@ -1228,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:846 +#: library/hashlib.rst:848 msgid "https://www.ietf.org/rfc/rfc8018.txt" msgstr "https://www.ietf.org/rfc/rfc8018.txt" -#: library/hashlib.rst:847 +#: 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:849 +#: 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:850 +#: 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 " diff --git a/library/heapq.po b/library/heapq.po index 090a79e76b..dc7da17439 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: 2025-10-17 09:58+0200\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,14 +32,14 @@ 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 "" "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:23 +#: library/heapq.rst:18 #, fuzzy msgid "" "For min-heaps, this implementation uses lists for which ``heap[k] <= " @@ -56,7 +56,7 @@ 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:29 +#: library/heapq.rst:24 msgid "" "Max-heaps satisfy the reverse invariant: every parent node has a value " "*greater* than any of its children. These are implemented as lists for " @@ -66,7 +66,7 @@ msgid "" "max-heap invariant." msgstr "" -#: library/heapq.rst:36 +#: library/heapq.rst:31 #, fuzzy msgid "" "The :mod:`!heapq` API differs from textbook heap algorithms in two aspects: " @@ -85,7 +85,7 @@ 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:43 +#: library/heapq.rst:38 #, fuzzy msgid "" "These two aspects make it possible to view the heap as a regular Python list " @@ -96,20 +96,20 @@ msgstr "" "sans surprise : ``heap[0]`` est le plus petit élément et ``heap.sort()`` " "conserve l'invariant du tas !" -#: library/heapq.rst:47 +#: 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:50 +#: 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:54 +#: library/heapq.rst:49 #, fuzzy msgid "" "To create a heap, use a list initialized as ``[]``, or transform an existing " @@ -120,11 +120,18 @@ msgstr "" "une liste existante et transformez la en tas à l'aide de la " "fonction :func:`heapify`." -#: library/heapq.rst:58 +#: library/heapq.rst:53 #, fuzzy msgid "The following functions are provided for min-heaps:" msgstr "Les fonctions suivantes sont fournies :" +#: 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 "" @@ -155,13 +162,6 @@ msgstr "" "suivie par un appel séparé à :func:`heappop`." #: library/heapq.rst:82 -#, 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:87 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 " @@ -171,7 +171,7 @@ msgstr "" "*item*. La taille du tas ne change pas. Si le tas est vide, une " "exception :exc:`IndexError` est levée." -#: library/heapq.rst:90 +#: 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 " @@ -183,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:95 +#: 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 " @@ -195,19 +195,19 @@ 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:101 +#: library/heapq.rst:96 #, fuzzy msgid "For max-heaps, the following functions are provided:" msgstr "Les fonctions suivantes sont fournies :" -#: library/heapq.rst:106 +#: 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:113 +#: library/heapq.rst:108 #, fuzzy msgid "" "Push the value *item* onto the max-heap *heap*, maintaining the max-heap " @@ -216,7 +216,7 @@ msgstr "" "Introduit la valeur *item* dans le tas *heap*, en conservant l'invariance du " "tas." -#: library/heapq.rst:121 +#: library/heapq.rst:116 #, fuzzy msgid "" "Pop and return the largest item from the max-heap *heap*, maintaining the " @@ -227,7 +227,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:130 +#: library/heapq.rst:125 #, fuzzy msgid "" "Push *item* on the max-heap *heap*, then pop and return the largest item " @@ -238,7 +238,7 @@ msgstr "" "de *heap*. Cette action combinée est plus efficace que :func:`heappush` " "suivie par un appel séparé à :func:`heappop`." -#: library/heapq.rst:140 +#: library/heapq.rst:135 #, fuzzy msgid "" "Pop and return the largest item from the max-heap *heap* and also push the " @@ -249,18 +249,18 @@ msgstr "" "*item*. La taille du tas ne change pas. Si le tas est vide, une " "exception :exc:`IndexError` est levée." -#: library/heapq.rst:145 +#: 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:151 +#: 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:156 +#: 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` " @@ -270,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:160 +#: 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 " @@ -280,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:164 +#: 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:166 +#: 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 " @@ -295,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:170 +#: 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 " @@ -308,11 +308,11 @@ msgstr "" "``sorted(itertools.chain(*iterables), reverse=True)``, tous les itérables " "doivent être classés par ordre décroissant." -#: library/heapq.rst:175 +#: library/heapq.rst:170 msgid "Added the optional *key* and *reverse* parameters." msgstr "Ajout des paramètres optionnels *key* et *reverse*." -#: library/heapq.rst:181 +#: 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 " @@ -326,7 +326,7 @@ msgstr "" "de chaque élément dans *iterable* (par exemple, ``key=str.lower``). " "Équivalent à : ``sorted(iterable, key=key, reverse=True)[:n]``." -#: library/heapq.rst:190 +#: 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 " @@ -340,7 +340,7 @@ msgstr "" "de chaque élément dans *iterable* (par exemple, ``key=str.lower``). " "Équivalent à : ``sorted(iterable, key=key)[:n]``." -#: library/heapq.rst:196 +#: 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 " @@ -355,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:204 +#: library/heapq.rst:199 msgid "Basic Examples" msgstr "Exemples simples" -#: library/heapq.rst:206 +#: 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 " @@ -369,7 +369,7 @@ 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:219 +#: library/heapq.rst:214 msgid "" "This is similar to ``sorted(iterable)``, but unlike :func:`sorted`, this " "implementation is not stable." @@ -377,7 +377,7 @@ msgstr "" "Ceci est similaire à ``sorted(iterable)`` mais, contrairement " "à :func:`sorted`, cette implémentation n'est pas stable." -#: library/heapq.rst:222 +#: 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::" @@ -386,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:235 +#: 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:237 +#: library/heapq.rst:268 msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" @@ -399,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:240 +#: 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?" @@ -407,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:243 +#: 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." @@ -415,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:246 +#: library/heapq.rst:277 msgid "" "If the priority of a task changes, how do you move it to a new position in " "the heap?" @@ -423,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:249 +#: 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?" @@ -431,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:252 +#: 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 " @@ -447,7 +473,7 @@ msgstr "" "comparaison des triplets ne va jamais chercher à comparer des tâches entre " "elles." -#: library/heapq.rst:258 +#: 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 " @@ -457,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:269 +#: 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 " @@ -467,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:273 +#: 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 " @@ -478,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:307 +#: library/heapq.rst:338 msgid "Theory" msgstr "Théorie" -#: library/heapq.rst:309 +#: 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 " @@ -495,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:314 +#: 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:327 +#: 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 " @@ -527,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:336 +#: library/heapq.rst:362 #, fuzzy msgid "" "If this heap invariant is protected at all time, index 0 is clearly the " @@ -548,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:343 +#: 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 " @@ -570,7 +601,7 @@ msgstr "" "implémenter un ordonnanceur (et c'est ce que j'ai utilisé pour mon " "séquenceur MIDI ☺)." -#: library/heapq.rst:352 +#: 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 " @@ -584,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:358 +#: 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, " @@ -610,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:368 +#: 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 " @@ -629,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:376 +#: 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. :-)" @@ -638,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:380 +#: library/heapq.rst:406 msgid "Footnotes" msgstr "Notes" -#: library/heapq.rst:381 +#: 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 596e8c9807..a3fd99bd14 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: 2025-10-17 09:58+0200\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,11 +22,11 @@ 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 +#: 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 " @@ -34,7 +34,7 @@ msgid "" "cannot be used with HMAC." msgstr "" -#: library/hmac.rst:22 +#: library/hmac.rst:19 msgid "" "Return a new hmac object. *key* is a bytes or bytearray object giving the " "secret key. If *msg* is present, the method call ``update(msg)`` is made. " @@ -50,7 +50,7 @@ msgstr "" "fonction de hachage ou un module implémentant la PEP 247. Bien qu’il soit " "après *msg*, *digestmod* est un paramètre obligatoire." -#: library/hmac.rst:28 +#: library/hmac.rst:25 msgid "" "Parameter *key* can be a bytes or bytearray object. Parameter *msg* can be " "of any type supported by :mod:`hashlib`. Parameter *digestmod* can be the " @@ -60,7 +60,7 @@ msgstr "" "*msg* peut être de n'importe quel type pris en charge par :mod:`hashlib`. Le " "paramètre *digestmod* peut être le nom d'un algorithme de hachage." -#: library/hmac.rst:33 +#: library/hmac.rst:30 #, fuzzy msgid "" "The *digestmod* argument is now required. Pass it as a keyword argument to " @@ -71,7 +71,7 @@ msgstr "" "Passez-le en argument nommé pour éviter la bizarrerie que ça donnerait quand " "vous n'avez pas un *msg* initial." -#: library/hmac.rst:40 +#: library/hmac.rst:37 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 " @@ -86,7 +86,7 @@ msgstr "" "de tenir en mémoire vive. Les paramètres *key*, *msg* et *digest* ont la " "même signification que pour :func:`~hmac.new`." -#: library/hmac.rst:46 +#: library/hmac.rst:43 msgid "" "CPython implementation detail, the optimized C implementation is only used " "when *digest* is a string and name of a digest algorithm, which is supported " @@ -96,11 +96,11 @@ 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:55 +#: library/hmac.rst:52 msgid "An HMAC object has the following methods:" msgstr "Un objet HMAC a les méthodes suivantes :" -#: library/hmac.rst:59 +#: 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); " @@ -110,12 +110,12 @@ msgstr "" "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:63 +#: 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:69 +#: 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 " @@ -127,7 +127,7 @@ 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:76 +#: library/hmac.rst:73 #, fuzzy msgid "" "When comparing the output of :meth:`digest` to an externally supplied digest " @@ -140,7 +140,7 @@ msgstr "" "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:84 +#: 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 " @@ -151,7 +151,7 @@ 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:90 +#: library/hmac.rst:87 #, fuzzy msgid "" "When comparing the output of :meth:`hexdigest` to an externally supplied " @@ -165,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:98 +#: 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 " @@ -175,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:102 +#: 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:106 +#: 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:110 +#: 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:116 +#: 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:121 +#: library/hmac.rst:118 #, fuzzy msgid "" "Removed the undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``, " @@ -207,11 +207,11 @@ msgstr "" "documentés) sont des détails d'implémentation internes et seront supprimés " "en Python 3.10." -#: library/hmac.rst:125 +#: 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:129 +#: 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 " @@ -226,7 +226,7 @@ msgstr "" "comme retourné par :meth:`HMAC.hexdigest` par exemple), ou :term:`bytes-like " "object`." -#: library/hmac.rst:137 +#: 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 " @@ -236,18 +236,18 @@ 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:145 +#: 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:151 +#: library/hmac.rst:148 msgid "Module :mod:`hashlib`" msgstr "Module :mod:`hashlib`" -#: library/hmac.rst:152 +#: library/hmac.rst:149 msgid "The Python module providing secure hash functions." msgstr "Le module Python fournissant des fonctions de hachage sécurisé." diff --git a/library/html.entities.po b/library/html.entities.po index 8518f756b8..9092d81a5d 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-17 09:58+0200\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" @@ -20,11 +20,11 @@ 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`, " @@ -34,7 +34,7 @@ msgstr "" "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 " @@ -50,7 +50,7 @@ msgstr "" "le point-virgule: dans ce cas, le nom est présent à la fois avec et sans le " "``;``. 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." @@ -58,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 a04cc183f9..8e300c5a0f 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: 2025-10-17 09:58+0200\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,20 +83,24 @@ 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 " @@ -99,20 +111,20 @@ msgstr "" "classe :class:`HTMLParser` pour afficher les balises ouvrantes, les balises " "fermantes ainsi que les données quand elles apparaissent ::" -#: library/html.parser.rst:66 +#: library/html.parser.rst:73 msgid "The output will then be:" msgstr "La sortie est alors :" -#: library/html.parser.rst:85 +#: library/html.parser.rst:92 msgid ":class:`.HTMLParser` Methods" msgstr "Méthodes de la classe :class:`.HTMLParser`" -#: library/html.parser.rst:87 +#: 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:92 +#: 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 " @@ -124,7 +136,7 @@ msgstr "" "méthode :meth:`close` soit appelée. L'argument *data* doit être de " "classe :class:`str`." -#: library/html.parser.rst:99 +#: 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 " @@ -137,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:107 +#: library/html.parser.rst:114 msgid "" "Reset the instance. Loses all unprocessed data. This is called implicitly " "at instantiation time." @@ -145,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:113 +#: 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:118 +#: library/html.parser.rst:125 #, fuzzy msgid "" "Return the text of the most recently opened start tag. This should not " @@ -165,7 +177,7 @@ 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:124 +#: 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 " @@ -177,7 +189,7 @@ msgstr "" "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:131 +#: library/html.parser.rst:138 msgid "" "This method is called to handle the start tag of an element (e.g. ``
``)." @@ -185,13 +197,15 @@ msgstr "" "Cette méthode est appelée pour traiter une balise ouvrante (p. ex. ``
``)." -#: library/html.parser.rst:133 +#: 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 " @@ -200,7 +214,7 @@ msgstr "" "du paramètre *value* et toute entité de référence ou de caractère est " "remplacée." -#: library/html.parser.rst:139 +#: library/html.parser.rst:146 msgid "" "For instance, for the tag ````, this method " "would be called as ``handle_starttag('a', [('href', 'https://" @@ -210,7 +224,7 @@ msgstr "" "méthode est appelée par ``handle_starttag('a', [('href', 'https://" "www.cwi.nl/')])``." -#: library/html.parser.rst:142 +#: library/html.parser.rst:149 msgid "" "All entity references from :mod:`html.entities` are replaced in the " "attribute values." @@ -218,18 +232,18 @@ 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:148 +#: 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:150 +#: 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:155 +#: 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 " @@ -243,34 +257,36 @@ msgstr "" "cette information lexicale ; l'implémentation par défaut appelle " "simplement :meth:`handle_starttag` et :meth:`handle_endtag`." -#: library/html.parser.rst:163 +#: 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 ``