diff --git a/.gitignore b/.gitignore
index c90071a..4b407cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
-*.mo
\ No newline at end of file
+*.mo
+.idea/
+.potodo/
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 3513a9a..d3a0b58 100644
--- a/Makefile
+++ b/Makefile
@@ -1,85 +1,181 @@
-# Makefile for {{cookiecutter.language}} Python Documentation
+# Makefile for italian Python Documentation
#
# Here is what you can do:
#
-# - make # Automatically build an html local version
+# - make # Automatically build an HTML local version
# - make todo # To list remaining tasks
+# - make verifs # To check for correctness: wrapping, spelling
+# - make wrap # To check for wrapping
+# - make spell # To check for spelling
# - make merge # To merge pot from upstream
# - make fuzzy # To find fuzzy strings
# - make progress # To compute current progression
-# - make upgrade_venv # To upgrade the venv that compiles the doc
#
# Modes are: autobuild-stable, autobuild-dev, and autobuild-html,
# documented in gen/src/3.6/Doc/Makefile as we're only delegating the
# real work to the Python Doc Makefile.
-CPYTHON_CLONE := ../cpython/
-SPHINX_CONF := $(CPYTHON_CLONE)/Doc/conf.py
-LANGUAGE := it_IT
-VENV := ~/.venvs/python-docs-i18n/
+# Configuration
+
+# The CPYTHON_CURRENT_COMMIT is the commit, in the cpython repository,
+# 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 := 083bf3ad1795604ee833d1595f2a536b9cd57419
+
+CPYTHON_PATH := ../cpython/
+
+LANGUAGE := it
+BRANCH := 3.13
+
+EXCLUDED := \
+ whatsnew/ \
+ c-api/ \
+ distutils/ \
+ install/ \
+ library/
+
+SPHINXERRORHANDLING = # -W
+
+# Internal variables
+
+UPSTREAM := https://github.com/python/cpython
+
PYTHON := $(shell which python3)
MODE := html
-BRANCH = 3.11
-COMMIT =
-JOBS = auto
+POSPELL_TMP_DIR := .pospell/
+JOBS := auto
+# Detect OS
-.PHONY: all
-all: $(SPHINX_CONF) $(VENV)/bin/activate
-ifneq "$(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD)" "$(BRANCH)"
- $(warning "Your ../cpython checkout may be on the wrong branch, got $(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD) expected $(BRANCH)")
+ifeq '$(findstring ;,$(PATH))' ';'
+ detected_OS := Windows
+else
+ detected_OS := $(shell uname 2>/dev/null || echo Unknown)
+ detected_OS := $(patsubst CYGWIN%,Cygwin,$(detected_OS))
+ detected_OS := $(patsubst MSYS%,MSYS,$(detected_OS))
+ detected_OS := $(patsubst MINGW%,MSYS,$(detected_OS))
endif
- mkdir -p $(CPYTHON_CLONE)/locales/$(LANGUAGE)/
- ln -nfs $(shell $(PYTHON) -c 'import os; print(os.path.realpath("."))') $(CPYTHON_CLONE)/locales/$(LANGUAGE)/LC_MESSAGES
- $(MAKE) -C $(CPYTHON_CLONE)/Doc/ VENVDIR=$(VENV) PYTHON=$(PYTHON) SPHINXOPTS='-qW -j$(JOBS) -D locale_dirs=../locales -D language=$(LANGUAGE) -D gettext_compact=0 -D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=' $(MODE)
+ifeq ($(detected_OS),Darwin) # Mac OS X
+ CP_CMD := gcp # accessible with `brew install coreutils` or `brew upgrade coreutils`
+else
+ CP_CMD := cp
+endif
-$(SPHINX_CONF):
- git clone --depth 1 --branch $(BRANCH) https://github.com/python/cpython.git $(CPYTHON_CLONE)
- [ -n "$(COMMIT)" ] && (i=1; while ! $$(git -C $(CPYTHON_CLONE) checkout $(COMMIT)); do i=$$((i * 2)); git -C $(CPYTHON_CLONE) fetch --depth $$i; done) || true
-
+.PHONY: all
+all: ensure_prerequisites
+ git -C $(CPYTHON_PATH) checkout $(CPYTHON_CURRENT_COMMIT)
+ mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/
+ $(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/
+ $(MAKE) -C $(CPYTHON_PATH)/Doc/ \
+ SPHINXOPTS='-q -j$(JOBS) \
+ -D locale_dirs=$(abspath locales) \
+ -D language=$(LANGUAGE) \
+ -D gettext_compact=0 \
+ -D latex_engine=xelatex \
+ -D latex_elements.inputenc= \
+ -D latex_elements.fontenc=' \
+ SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \
+ $(MODE)
+ git -C $(CPYTHON_PATH) checkout -
+ @echo "Build success, open file://$(abspath $(CPYTHON_PATH))/Doc/build/html/index.html or run 'make serve' to see them."
-.PHONY: upgrade_venv
-upgrade_venv:
- $(MAKE) -C $(CPYTHON_CLONE)/Doc/ VENVDIR=$(VENV) PYTHON=$(PYTHON) venv
+.PHONY: ensure_prerequisites
+ensure_prerequisites:
+ @if [ -z $(CPYTHON_PATH) ]; then \
+ echo "Your CPYTHON_PATH is empty, please provide one."; \
+ exit 1; \
+ fi
+ @if ! [ -d $(CPYTHON_PATH) ]; then \
+ echo "Building the translation requires a cpython clone."; \
+ echo "Please provide the path to a clone using the CPYTHON_PATH variable."; \
+ echo "(Currently CPYTHON_PATH is $(CPYTHON_PATH)."; \
+ echo "So you may want to run:"; \
+ echo ""; \
+ echo " git clone $(UPSTREAM) $(CPYTHON_PATH)"; \
+ exit 1; \
+ fi
+ @if [ -n "$$(git -C $(CPYTHON_PATH) status --porcelain)" ]; then \
+ echo "Your cpython clone at $(CPYTHON_PATH) is not clean."; \
+ echo "In order to avoid breaking things, please clean it first."; \
+ exit 1; \
+ fi
+ @if ! (blurb help >/dev/null 2>&1 && sphinx-build --version >/dev/null 2>&1); then \
+ git -C $(CPYTHON_PATH) checkout $(BRANCH); \
+ echo "You're missing dependencies, please enable a venv and install:"; \
+ echo ""; \
+ echo " python -m pip install -r requirements.txt -r $(CPYTHON_PATH)/Doc/requirements.txt"; \
+ exit 1; \
+ fi
-$(VENV)/bin/activate:
- $(MAKE) -C $(CPYTHON_CLONE)/Doc/ VENVDIR=$(VENV) PYTHON=$(PYTHON) venv
+.PHONY: serve
+serve:
+ $(MAKE) -C $(CPYTHON_PATH)/Doc/ serve
.PHONY: progress
progress:
- @python3 -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \
+ @$(PYTHON) -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \
$(shell msgcat *.po */*.po | msgattrib --translated | grep -c '^msgid') \
$(shell msgcat *.po */*.po | grep -c '^msgid')
+.PHONY: todo
+todo: ensure_prerequisites
+ potodo --exclude venv .venv $(EXCLUDED)
+
+.PHONY: wrap
+wrap: ensure_prerequisites
+ @echo "Verify wrapping"
+ powrap --check --quiet *.po **/*.po
+
+SRCS = $(shell git diff --name-only $(BRANCH) | grep '.po$$')
+# foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out
+DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS)))
+
+.PHONY: spell
+spell: ensure_prerequisites $(DESTS)
+
+$(POSPELL_TMP_DIR)/%.po.out: %.po dict
+ @echo "Pospell checking $<..."
+ mkdir -p $(@D)
+ pospell -p dict -l fr_FR $< && touch $@
+
+.PHONY: fuzzy
+fuzzy: ensure_prerequisites
+ potodo -f --exclude venv .venv $(EXCLUDED)
+
+.PHONY: verifs
+verifs: wrap spell
+
.PHONY: merge
-merge: upgrade_venv
-ifneq "$(shell cd $(CPYTHON_CLONE) 2>/dev/null && git branch --show-current)" "$(BRANCH)"
- $(error "You're merging from a different branch:" "$(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD)" vs "$(BRANCH)")
-endif
- (cd $(CPYTHON_CLONE)/Doc; rm -f build/NEWS)
- (cd $(CPYTHON_CLONE); $(VENV)/bin/sphinx-build -Q -b gettext -D gettext_compact=0 Doc pot/)
- find $(CPYTHON_CLONE)/pot/ -name '*.pot' |\
- while read -r POT;\
- do\
- PO="./$$(echo "$$POT" | sed "s#$(CPYTHON_CLONE)/pot/##; s#\.pot\$$#.po#")";\
- mkdir -p "$$(dirname "$$PO")";\
- if [ -f "$$PO" ];\
- then\
- case "$$POT" in\
- *whatsnew*) msgmerge --backup=off --force-po --no-fuzzy-matching -U "$$PO" "$$POT" ;;\
- *) msgmerge --backup=off --force-po -U "$$PO" "$$POT" ;;\
- esac\
- else\
- msgcat -o "$$PO" "$$POT";\
- fi\
+merge: ensure_prerequisites
+ @echo "Merge from $(UPSTREAM)"
+ git -C $(CPYTHON_PATH) checkout $(BRANCH)
+ git -C $(CPYTHON_PATH) pull --ff-only
+ (cd $(CPYTHON_PATH)/Doc; sphinx-build -Q -b gettext -D gettext_compact=0 . ../pot)
+ find $(CPYTHON_PATH)/pot/ -name '*.pot' |\
+ while read -r POT; \
+ do \
+ PO="./$$(echo "$$POT" | sed "s#$(CPYTHON_PATH)/pot/##; s#\.pot\$$#.po#")"; \
+ mkdir -p "$$(dirname "$$PO")"; \
+ if [ -f "$$PO" ]; \
+ then \
+ msgmerge --backup=off --force-po -U "$$PO" "$$POT"; \
+ else \
+ msgcat -o "$$PO" "$$POT"; \
+ fi \
done
+ rm -fr $(CPYTHON_PATH)/pot/
+ sed -i 's|^#: .*Doc/|#: |' *.po */*.po
powrap -m
+ @printf "\n%s %s\n" "Replace CPYTHON_CURRENT_COMMIT in Makefile by: " $(shell git -C $(CPYTHON_PATH) rev-parse HEAD)
+ @printf 'To add, you can use:\n git status -s | grep "^ M .*\.po" | cut -d" " -f3 | while read -r file; do if [ $$(git diff "$$file" | wc -l) -gt 13 ]; then git add "$$file"; fi ; done\n'
-
-.PHONY: fuzzy
-fuzzy:
- for file in *.po */*.po; do echo $$(msgattrib --only-fuzzy --no-obsolete "$$file" | grep -c '#, fuzzy') $$file; done | grep -v ^0 | sort -gr
\ No newline at end of file
+.PHONY: clean
+clean:
+ @echo "Cleaning *.mo and $(POSPELL_TMP_DIR)"
+ rm -fr $(POSPELL_TMP_DIR)
+ find -name '*.mo' -delete
\ No newline at end of file
diff --git a/README.rst b/README.rst
index 6adf5f3..77c506c 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
Translation of the Python Documentation — it
============================================
-.. image:: https://travis-ci.org/python/python-docs-it.svg?branch=3.7
+.. image:: https://travis-ci.org/python/python-docs-it.svg?branch=3.13
:target: https://travis-ci.org/python/python-docs-it
@@ -10,7 +10,7 @@ Documentation Contribution Agreement
NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is
maintained using a global network of volunteers. By posting this
-project on Transifex, Github, and other public places, and inviting
+project on Github, and other public places, and inviting
you to participate, we are proposing an agreement that you will
provide your improvements to Python's documentation or the translation
of Python's documentation for the PSF's use under the CC0 license
@@ -37,7 +37,6 @@ How to Contribute
You can contribute using:
- Github
-- `transifex `_
- Or just by opening `an issue on github `_
@@ -64,8 +63,15 @@ Step by step:
.. code-block:: bash
+ # Create a working directory
+ mkdir cpython_projects
+ cd cpython_projects
+
+ # Git clone cpython code
+ git clone git@github.com:python/cpython.git
+
# Git clone your github fork using ssh:
- git clone git@github.com:alessandrocucci/python-docs-it.git
+ git clone git@github.com:yourusername/python-docs-it.git
# Go to the cloned directory:
cd python-docs-it/
@@ -75,7 +81,7 @@ Step by step:
All the translations must be made on the latest release.
We never translate on an oldest version, by example, the latest python release
-is python 3.7, we don't want to translate directly on the python 3.5 release.
+is python 3.13, we don't want to translate directly on the python 3.12 release.
If needed translations would be backported on the oldest versions by the
`documentation team `.
@@ -84,10 +90,10 @@ Now you're ready to start a work session, each time you'll start a new task, sta
.. code-block:: bash
# To work, we'll need a branch, based on an up-to-date (freshly fetched)
- # upstream/3.7 branch, let's say we'll work on glossary so we name
+ # upstream/3.13 branch, let's say we'll work on glossary so we name
# the branch "glossary":
git fetch upstream
- git checkout -b glossary upstream/3.7
+ git checkout -b glossary upstream/3.13
# You can now work on the file, typically using poedit,
poedit directory/file.po
diff --git a/about.po b/about.po
index 8197c18..557186c 100644
--- a/about.po
+++ b/about.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: 2019-04-21 21:19+0200\n"
"Last-Translator: Alessandro Cucci \n"
"Language-Team: \n"
@@ -18,11 +18,11 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.1\n"
-#: ../Doc/about.rst:3
+#: about.rst:3
msgid "About these documents"
msgstr "Riguardo questa documentazione"
-#: ../Doc/about.rst:6
+#: about.rst:6
msgid ""
"These documents are generated from `reStructuredText`_ sources by `Sphinx`_, "
"a document processor specifically written for the Python documentation."
@@ -31,7 +31,7 @@ msgstr ""
"`reStructuredText`_, un elaboratore di documenti appositamente scritto per "
"la documentazione di Python."
-#: ../Doc/about.rst:15
+#: about.rst:15
msgid ""
"Development of the documentation and its toolchain is an entirely volunteer "
"effort, just like Python itself. If you want to contribute, please take a "
@@ -44,11 +44,11 @@ msgstr ""
"per avere maggiori informazioni su come farlo. Nuovi volontari sono sempre "
"i benvenuti!"
-#: ../Doc/about.rst:20
+#: about.rst:20
msgid "Many thanks go to:"
msgstr "Molte grazie a:"
-#: ../Doc/about.rst:22
+#: about.rst:22
msgid ""
"Fred L. Drake, Jr., the creator of the original Python documentation toolset "
"and writer of much of the content;"
@@ -56,7 +56,7 @@ msgstr ""
"Fred L. Drake, Jr., il creatore del software per generare documentazione "
"Python e scrittore di gran parte del contenuto;"
-#: ../Doc/about.rst:24
+#: about.rst:24
#, fuzzy
msgid ""
"the `Docutils `_ project for creating "
@@ -65,7 +65,7 @@ msgstr ""
"il progetto `Docutils `_ per la creazione "
"di reStructuredText e della suite Docutils;"
-#: ../Doc/about.rst:26
+#: about.rst:26
#, fuzzy
msgid ""
"Fredrik Lundh for his Alternative Python Reference project from which Sphinx "
@@ -75,23 +75,23 @@ msgstr ""
"effbot.org/zone/pyref.htm>`_ da cui Sphinx ha preso in prestito molte buone "
"idee."
-#: ../Doc/about.rst:31
+#: about.rst:31
msgid "Contributors to the Python Documentation"
msgstr "Volontari che hanno contribuito alla documentazione di Python"
-#: ../Doc/about.rst:33
+#: about.rst:33
#, fuzzy
msgid ""
"Many people have contributed to the Python language, the Python standard "
-"library, and the Python documentation. See `Misc/ACKS` in the Python source "
-"distribution for a partial list of contributors."
+"library, and the Python documentation. See :source:`Misc/ACKS` in the "
+"Python source distribution for a partial list of contributors."
msgstr ""
"Molte persone hanno contribuito a scrivere il linguaggio Python, la libreria "
"standard di Python e la documentazione di Python. Per conoscere un elenco "
"parziale dei volontari è possibile visitare la pagina :source:`Misc/ACKS`, "
"presente nel codice sorgente della distribuzione Python."
-#: ../Doc/about.rst:37
+#: about.rst:37
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 9dcfbf8..558ff54 100644
--- a/bugs.po
+++ b/bugs.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: 2019-04-21 22:39+0200\n"
"Last-Translator: Alessandro Cucci \n"
"Language-Team: \n"
@@ -18,11 +18,11 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.1\n"
-#: ../Doc/bugs.rst:5
+#: bugs.rst:5
msgid "Dealing with Bugs"
msgstr "Come comportarsi con i *bug*"
-#: ../Doc/bugs.rst:7
+#: bugs.rst:7
msgid ""
"Python is a mature programming language which has established a reputation "
"for stability. In order to maintain this reputation, the developers would "
@@ -33,7 +33,7 @@ msgstr ""
"sviluppatori saranno contenti di ricevere delle segnalazioni nel caso "
"dovessi trovare eventuali errori in Python."
-#: ../Doc/bugs.rst:11
+#: bugs.rst:11
msgid ""
"It can be sometimes faster to fix bugs yourself and contribute patches to "
"Python as it streamlines the process and involves less people. Learn how to :"
@@ -44,11 +44,11 @@ msgstr ""
"meno persone. Impara come fare leggendo: :ref:`contribute `."
-#: ../Doc/bugs.rst:16
+#: bugs.rst:16
msgid "Documentation bugs"
msgstr "Errori nella Documentazione"
-#: ../Doc/bugs.rst:18
+#: bugs.rst:18
msgid ""
"If you find a bug in this documentation or would like to propose an "
"improvement, please submit a bug report on the :ref:`tracker `. Se dovessi avere anche un suggerimento su come "
"risolvere il problema, aggiungilo!"
-#: ../Doc/bugs.rst:22
+#: bugs.rst:22
+msgid ""
+"You can also open a discussion item on our `Documentation Discourse forum "
+"`_."
+msgstr ""
+"È possibile anche aprire un argomento di discussione sul nostro `forum "
+"Discourse sulla documentazione `_."
+
+#: bugs.rst:25
+msgid ""
+"If you find a bug in the theme (HTML / CSS / JavaScript) of the "
+"documentation, please submit a bug report on the `python-doc-theme bug "
+"tracker `_."
+msgstr ""
+"Se dovessi trovare un errore nel tema (HTML / CSS / JavaScript) della "
+"documentazione, ti preghiamo di inviare una segnalazione su `python-doc-"
+"theme bug tracker `_."
+
+#: bugs.rst:29
msgid ""
"If you're short on time, you can also email documentation bug reports to "
"docs@python.org (behavioral bugs can be sent to python-list@python.org). "
@@ -72,70 +90,74 @@ msgstr ""
"gestita da volontari; la vostra richiesta verrà notata, anche se potrebbe "
"volerci un po' di tempo per essere elaborata."
-#: ../Doc/bugs.rst:30
-#, fuzzy
+#: bugs.rst:36
msgid "`Documentation bugs`_"
-msgstr "Errori nella Documentazione"
+msgstr "`Documentation bugs`_"
-#: ../Doc/bugs.rst:30
-#, fuzzy
+#: bugs.rst:37
msgid ""
"A list of documentation bugs that have been submitted to the Python issue "
"tracker."
-msgstr "`Documentation bugs`_ sul tracker di issue di Python"
+msgstr ""
+"Un elenco dei bug della documentazione che sono stati inviati al sistema di segnalazione "
+"dei problemi di Python."
-#: ../Doc/bugs.rst:33
+#: bugs.rst:39
msgid "`Issue Tracking `_"
-msgstr ""
+msgstr "`Issue Tracking `_"
-#: ../Doc/bugs.rst:33
+#: bugs.rst:40
msgid ""
"Overview of the process involved in reporting an improvement on the tracker."
-msgstr ""
+msgstr "Panoramica del processo coinvolto nella segnalazione di un miglioramento sul tracker."
-#: ../Doc/bugs.rst:36
+#: bugs.rst:42
msgid ""
"`Helping with Documentation `_"
msgstr ""
+"`Aiutare con la Documentazione `_"
-#: ../Doc/bugs.rst:36
+#: bugs.rst:43
msgid ""
"Comprehensive guide for individuals that are interested in contributing to "
"Python documentation."
msgstr ""
+"Guida completa per le persone interessate a contribuire alla documentazione di Python."
-#: ../Doc/bugs.rst:38
+#: bugs.rst:45
msgid ""
-"`Documentation Translations `_"
+"`Documentation Translations `_"
msgstr ""
+"`Traduzioni della Documentazione `_"
-#: ../Doc/bugs.rst:39
+#: bugs.rst:46
msgid ""
"A list of GitHub pages for documentation translation and their primary "
"contacts."
msgstr ""
+"Un elenco delle pagine GitHub per la traduzione della documentazione e i loro contatti principali."
-#: ../Doc/bugs.rst:45
+#: bugs.rst:52
msgid "Using the Python issue tracker"
msgstr "Utilizzo dell'Issue Tracker di Python"
-#: ../Doc/bugs.rst:47
-#, fuzzy
+#: bugs.rst:54
msgid ""
"Issue reports for Python itself should be submitted via the GitHub issues "
"tracker (https://github.com/python/cpython/issues). The GitHub issues "
"tracker offers a web form which allows pertinent information to be entered "
"and submitted to the developers."
msgstr ""
-"Le segnalazioni di errori del linguaggio Python devono essere inviate "
-"tramite il *Python Bug Tracker* (https://bugs.python.org/). Il bug tracker "
-"offre un modulo Web che permette di inserire e inviare informazioni "
-"pertinenti agli sviluppatori."
+"I report sui problemi di Python stesso devono essere inviati tramite il sistema di segnalazione "
+"dei problemi su GitHub (https://github.com/python/cpython/issues). Il sistema di segnalazione "
+"dei problemi su GitHub offre un modulo web che consente di inserire "
+"e inviare agli sviluppatori le informazioni pertinenti."
-#: ../Doc/bugs.rst:52
-#, fuzzy
+#: bugs.rst:59
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 "
@@ -145,50 +167,44 @@ msgid ""
"can!). To do this, search the tracker using the search box at the top of the "
"page."
msgstr ""
-"Il primo passo da fare quanto si vuole aprire una segnalazione è quello di "
-"cercare se il problema è già stato segnalato. Il vantaggio nel farlo, oltre "
-"a far risparmiare tempo agli sviluppatori, è che si impara cosa è stato "
-"fatto per risolverlo; può darsi che il problema sia già stato risolto per la "
-"prossima versione, oppure che siano necessarie informazioni aggiuntive (in "
-"tal caso, se possibile, si prega di fornirle!). Per farlo, occorre cercare "
-"nel database dei *bug* usando il campo di ricerca nella parte superiore "
-"della pagina."
-
-#: ../Doc/bugs.rst:59
-#, fuzzy
+"Il primo passo per presentare un report è determinare se il problema è già stato segnalato. "
+"Il vantaggio di farlo, oltre a risparmiare tempo agli sviluppatori, è scoprire cosa è stato fatto "
+"per risolverlo; potrebbe essere che il problema sia già stato risolto per la prossima versione, "
+"o che siano necessarie ulteriori informazioni (in tal caso sei invitato a fornirle se puoi!). "
+"Per farlo, cerca nel tracker utilizzando la casella di ricerca in cima alla pagina."
+
+#: bugs.rst:66
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 "
"using the \"Sign up\" link. It is not possible to submit a bug report "
"anonymously."
msgstr ""
-"Se il problema che stai segnalando non è già presente nel bug tracker, torna "
-"al Bug Tracker Python e accedi usando le tue credenziali. Se non si dispone "
-"già di un account, selezionare il link \"Registrati\" o, se si utilizza "
-"OpenID, uno dei loghi del provider OpenID nella barra laterale. Non è "
-"possibile inviare una segnalazione di bug in forma anonima."
-
-#: ../Doc/bugs.rst:64
-#, fuzzy
+"Se il problema che stai segnalando non è già nell'elenco, accedi a GitHub. "
+"Se non hai già un account GitHub, crea un nuovo account utilizzando il link \"Sign up\". "
+"Non è possibile inviare un report di bug in modo anonimo."
+
+#: bugs.rst:71
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."
msgstr ""
-"Ora che sei connesso, è possibile inviare una segnalazione. Seleziona il "
-"link \"Crea Nuovo\" nella barra laterale per aprire il modulo di "
-"segnalazione dei bug."
+"Essendo ora loggato, puoi inviare un problema. Clicca sul pulsante \"New issue\" "
+"nella barra superiore per segnalare un nuovo problema."
-#: ../Doc/bugs.rst:67
+#: bugs.rst:74
msgid "The submission form has two fields, \"Title\" and \"Comment\"."
-msgstr ""
+msgstr "Il form di invio ha due campi, \"Titolo\" e \"Commento\"."
-#: ../Doc/bugs.rst:69
+#: bugs.rst:76
msgid ""
"For the \"Title\" field, enter a *very* short description of the problem; "
-"less than ten words is good."
+"fewer than ten words is good."
msgstr ""
+"Per il campo \"Titolo\", inserisci una *molto* breve descrizione del problema; "
+"meno di dieci parole è considerato buono."
-#: ../Doc/bugs.rst:72
+#: bugs.rst:79
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 "
@@ -201,18 +217,17 @@ msgstr ""
"stavate utilizzando (incluse le informazioni sulle versioni, se dovesse "
"essere utile)."
-#: ../Doc/bugs.rst:77
-#, fuzzy
+#: bugs.rst:84
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 "
"time an action is taken on the issue."
msgstr ""
-"Ogni segnalazione di bug sarà assegnata ad uno sviluppatore che determinerà "
-"cosa deve essere fatto per correggere il problema. Riceverai un "
-"aggiornamento ogni volta che viene intrapresa un'azione a riguardo."
+"Ogni report del problema verrà esaminato da uno sviluppatore che determinerà cosa "
+"deve essere fatto per correggere il problema. Riceverai un aggiornamento ogni "
+"volta che viene intrapresa un'azione sul problema."
-#: ../Doc/bugs.rst:86
+#: bugs.rst:91
msgid ""
"`How to Report Bugs Effectively `_"
@@ -220,7 +235,7 @@ msgstr ""
"`Come segnalare efficacemente i bug `_"
-#: ../Doc/bugs.rst:85
+#: bugs.rst:92
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."
@@ -228,16 +243,15 @@ msgstr ""
"Articolo che specifica come creare un'utile segnalazione riguardo un *bug*. "
"Descrive che tipo di informazione è utile e perché è utile."
-#: ../Doc/bugs.rst:89
-#, fuzzy
+#: bugs.rst:95
msgid ""
"`Bug Writing Guidelines `_"
msgstr ""
-"`Linee Guida per la segnalazione dei *Bug* `_"
+"`Linee Guida per la segnalazione dei *Bug* `_"
-#: ../Doc/bugs.rst:89
+#: bugs.rst:96
msgid ""
"Information about writing a good bug report. Some of this is specific to "
"the Mozilla project, but describes general good practices."
@@ -246,11 +260,11 @@ msgstr ""
"queste sono specifiche del progetto Mozilla, ma descrivono le buone pratiche "
"generali."
-#: ../Doc/bugs.rst:95
+#: bugs.rst:102
msgid "Getting started contributing to Python yourself"
-msgstr "Come iniziare a contribuire a Python da soli"
+msgstr "Come iniziare a contribuire a Python in autonomia"
-#: ../Doc/bugs.rst:97
+#: bugs.rst:104
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/abstract.po b/c-api/abstract.po
index 297f9e3..879264b 100644
--- a/c-api/abstract.po
+++ b/c-api/abstract.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/abstract.rst:7
+#: c-api/abstract.rst:7
msgid "Abstract Objects Layer"
msgstr ""
-#: ../Doc/c-api/abstract.rst:9
+#: c-api/abstract.rst:9
msgid ""
"The functions in this chapter interact with Python objects regardless of "
"their type, or with wide classes of object types (e.g. all numerical types, "
@@ -29,7 +29,7 @@ msgid ""
"apply, they will raise a Python exception."
msgstr ""
-#: ../Doc/c-api/abstract.rst:14
+#: c-api/abstract.rst:14
msgid ""
"It is not possible to use these functions on objects that are not properly "
"initialized, such as a list object that has been created by :c:func:"
diff --git a/c-api/allocation.po b/c-api/allocation.po
index c01ea54..e769459 100644
--- a/c-api/allocation.po
+++ b/c-api/allocation.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/allocation.rst:6
+#: c-api/allocation.rst:6
msgid "Allocating Objects on the Heap"
msgstr ""
-#: ../Doc/c-api/allocation.rst:17
+#: c-api/allocation.rst:17
msgid ""
"Initialize a newly allocated object *op* with its type and initial "
"reference. Returns the initialized object. If *type* indicates that the "
@@ -30,53 +30,55 @@ msgid ""
"affected."
msgstr ""
-#: ../Doc/c-api/allocation.rst:26
+#: c-api/allocation.rst:26
msgid ""
"This does everything :c:func:`PyObject_Init` does, and also initializes the "
"length information for a variable-size object."
msgstr ""
-#: ../Doc/c-api/allocation.rst:32
+#: c-api/allocation.rst:32
msgid ""
"Allocate a new Python object using the C structure type *TYPE* and the "
-"Python type object *type*. Fields not defined by the Python object header "
-"are not initialized; the object's reference count will be one. The size of "
+"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
+"Python object header are not initialized. The caller will own the only "
+"reference to the object (i.e. its reference count will be one). The size of "
"the memory allocation is determined from the :c:member:`~PyTypeObject."
"tp_basicsize` field of the type object."
msgstr ""
-#: ../Doc/c-api/allocation.rst:41
+#: c-api/allocation.rst:43
msgid ""
"Allocate a new Python object using the C structure type *TYPE* and the "
-"Python type object *type*. Fields not defined by the Python object header "
-"are not initialized. The allocated memory allows for the *TYPE* structure "
-"plus *size* fields of the size given by the :c:member:`~PyTypeObject."
-"tp_itemsize` field of *type*. This is useful for implementing objects like "
-"tuples, which are able to determine their size at construction time. "
-"Embedding the array of fields into the same allocation decreases the number "
-"of allocations, improving the memory management efficiency."
+"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
+"Python object header are not initialized. The allocated memory allows for "
+"the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given "
+"by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is "
+"useful for implementing objects like tuples, which are able to determine "
+"their size at construction time. Embedding the array of fields into the "
+"same allocation decreases the number of allocations, improving the memory "
+"management efficiency."
msgstr ""
-#: ../Doc/c-api/allocation.rst:53
+#: c-api/allocation.rst:57
msgid ""
-"Releases memory allocated to an object using :c:func:`PyObject_New` or :c:"
-"func:`PyObject_NewVar`. This is normally called from the :c:member:"
+"Releases memory allocated to an object using :c:macro:`PyObject_New` or :c:"
+"macro:`PyObject_NewVar`. This is normally called from the :c:member:"
"`~PyTypeObject.tp_dealloc` handler specified in the object's type. The "
"fields of the object should not be accessed after this call as the memory is "
"no longer a valid Python object."
msgstr ""
-#: ../Doc/c-api/allocation.rst:62
+#: c-api/allocation.rst:66
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 "
"object."
msgstr ""
-#: ../Doc/c-api/allocation.rst:69
+#: c-api/allocation.rst:73
msgid ":c:func:`PyModule_Create`"
msgstr ""
-#: ../Doc/c-api/allocation.rst:70
+#: c-api/allocation.rst:74
msgid "To allocate and create extension modules."
msgstr ""
diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po
index 3ab3de2..4185697 100644
--- a/c-api/apiabiversion.po
+++ b/c-api/apiabiversion.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,163 +17,167 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/apiabiversion.rst:7
+#: c-api/apiabiversion.rst:7
msgid "API and ABI Versioning"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:9
+#: c-api/apiabiversion.rst:9
msgid ""
"CPython exposes its version number in the following macros. Note that these "
"correspond to the version code is **built** with, not necessarily the "
"version used at **run time**."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:13
+#: c-api/apiabiversion.rst:13
msgid ""
"See :ref:`stable` for a discussion of API and ABI stability across versions."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:17
+#: c-api/apiabiversion.rst:17
msgid "The ``3`` in ``3.4.1a2``."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:21
+#: c-api/apiabiversion.rst:21
msgid "The ``4`` in ``3.4.1a2``."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:25
+#: c-api/apiabiversion.rst:25
msgid "The ``1`` in ``3.4.1a2``."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:29
+#: c-api/apiabiversion.rst:29
msgid ""
"The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, "
"``0xC`` for release candidate or ``0xF`` for final."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:35
+#: c-api/apiabiversion.rst:35
msgid "The ``2`` in ``3.4.1a2``. Zero for final releases."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:39
+#: c-api/apiabiversion.rst:39
msgid "The Python version number encoded in a single integer."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:41
+#: c-api/apiabiversion.rst:41
msgid ""
"The underlying version information can be found by treating it as a 32 bit "
"number in the following manner:"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:45
+#: c-api/apiabiversion.rst:45
msgid "Bytes"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:45
+#: c-api/apiabiversion.rst:45
msgid "Bits (big endian order)"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:45
+#: c-api/apiabiversion.rst:45
msgid "Meaning"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:45
+#: c-api/apiabiversion.rst:45
msgid "Value for ``3.4.1a2``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:47
+#: c-api/apiabiversion.rst:47
msgid "1"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:47
+#: c-api/apiabiversion.rst:47
msgid "1-8"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:47
+#: c-api/apiabiversion.rst:47
msgid "``PY_MAJOR_VERSION``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:47
+#: c-api/apiabiversion.rst:47
msgid "``0x03``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:49
+#: c-api/apiabiversion.rst:49
msgid "2"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:49
+#: c-api/apiabiversion.rst:49
msgid "9-16"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:49
+#: c-api/apiabiversion.rst:49
msgid "``PY_MINOR_VERSION``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:49
+#: c-api/apiabiversion.rst:49
msgid "``0x04``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:51
+#: c-api/apiabiversion.rst:51
msgid "3"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:51
+#: c-api/apiabiversion.rst:51
msgid "17-24"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:51
+#: c-api/apiabiversion.rst:51
msgid "``PY_MICRO_VERSION``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:51
+#: c-api/apiabiversion.rst:51
msgid "``0x01``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:53
+#: c-api/apiabiversion.rst:53
msgid "4"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:53
+#: c-api/apiabiversion.rst:53
msgid "25-28"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:53
+#: c-api/apiabiversion.rst:53
msgid "``PY_RELEASE_LEVEL``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:53
+#: c-api/apiabiversion.rst:53
msgid "``0xA``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:55
+#: c-api/apiabiversion.rst:55
msgid "29-32"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:55
+#: c-api/apiabiversion.rst:55
msgid "``PY_RELEASE_SERIAL``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:55
+#: c-api/apiabiversion.rst:55
msgid "``0x2``"
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:58
+#: c-api/apiabiversion.rst:58
msgid ""
"Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion "
"``0x030a00f0``."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:61
-msgid "This version is also available via the symbol :data:`Py_Version`."
+#: c-api/apiabiversion.rst:61
+msgid "Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:65
+#: c-api/apiabiversion.rst:63
+msgid "This version is also available via the symbol :c:var:`Py_Version`."
+msgstr ""
+
+#: c-api/apiabiversion.rst:67
msgid ""
"The Python runtime version number encoded in a single constant integer, with "
"the same format as the :c:macro:`PY_VERSION_HEX` macro. This contains the "
"Python version used at run time."
msgstr ""
-#: ../Doc/c-api/apiabiversion.rst:71
+#: c-api/apiabiversion.rst:73
msgid "All the given macros are defined in :source:`Include/patchlevel.h`."
msgstr ""
diff --git a/c-api/arg.po b/c-api/arg.po
index fa21d51..24ff8db 100644
--- a/c-api/arg.po
+++ b/c-api/arg.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,18 +17,18 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/arg.rst:6
+#: c-api/arg.rst:6
msgid "Parsing arguments and building values"
msgstr ""
-#: ../Doc/c-api/arg.rst:8
+#: c-api/arg.rst:8
msgid ""
"These functions are useful when creating your own extensions functions and "
"methods. Additional information and examples are available in :ref:"
"`extending-index`."
msgstr ""
-#: ../Doc/c-api/arg.rst:12
+#: c-api/arg.rst:12
msgid ""
"The first three of these functions described, :c:func:`PyArg_ParseTuple`, :c:"
"func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use "
@@ -37,11 +37,11 @@ msgid ""
"functions."
msgstr ""
-#: ../Doc/c-api/arg.rst:19
+#: c-api/arg.rst:19
msgid "Parsing arguments"
msgstr ""
-#: ../Doc/c-api/arg.rst:21
+#: c-api/arg.rst:21
msgid ""
"A format string consists of zero or more \"format units.\" A format unit "
"describes one Python object; it is usually a single character or a "
@@ -53,60 +53,78 @@ msgid ""
"brackets is the type of the C variable(s) whose address should be passed."
msgstr ""
-#: ../Doc/c-api/arg.rst:31
+#: c-api/arg.rst:33
msgid "Strings and buffers"
msgstr ""
-#: ../Doc/c-api/arg.rst:33
+#: c-api/arg.rst:37
+msgid ""
+"On Python 3.12 and older, the macro :c:macro:`!PY_SSIZE_T_CLEAN` must be "
+"defined before including :file:`Python.h` to use all ``#`` variants of "
+"formats (``s#``, ``y#``, etc.) explained below. This is not necessary on "
+"Python 3.13 and later."
+msgstr ""
+
+#: c-api/arg.rst:42
msgid ""
"These formats allow accessing an object as a contiguous chunk of memory. You "
"don't have to provide raw storage for the returned unicode or bytes area."
msgstr ""
-#: ../Doc/c-api/arg.rst:37
+#: c-api/arg.rst:46
+msgid "Unless otherwise stated, buffers are not NUL-terminated."
+msgstr ""
+
+#: c-api/arg.rst:48
+msgid "There are three ways strings and buffers can be converted to C:"
+msgstr ""
+
+#: c-api/arg.rst:50
msgid ""
-"In general, when a format sets a pointer to a buffer, the buffer is managed "
-"by the corresponding Python object, and the buffer shares the lifetime of "
-"this object. You won't have to release any memory yourself. The only "
-"exceptions are ``es``, ``es#``, ``et`` and ``et#``."
+"Formats such as ``y*`` and ``s*`` fill a :c:type:`Py_buffer` structure. This "
+"locks the underlying buffer so that the caller can subsequently use the "
+"buffer even inside a :c:type:`Py_BEGIN_ALLOW_THREADS` block without the risk "
+"of mutable data being resized or destroyed. As a result, **you have to "
+"call** :c:func:`PyBuffer_Release` after you have finished processing the "
+"data (or in any early abort case)."
msgstr ""
-#: ../Doc/c-api/arg.rst:42
+#: c-api/arg.rst:57
msgid ""
-"However, when a :c:type:`Py_buffer` structure gets filled, the underlying "
-"buffer is locked so that the caller can subsequently use the buffer even "
-"inside a :c:type:`Py_BEGIN_ALLOW_THREADS` block without the risk of mutable "
-"data being resized or destroyed. As a result, **you have to call** :c:func:"
-"`PyBuffer_Release` after you have finished processing the data (or in any "
-"early abort case)."
+"The ``es``, ``es#``, ``et`` and ``et#`` formats allocate the result buffer. "
+"**You have to call** :c:func:`PyMem_Free` after you have finished processing "
+"the data (or in any early abort case)."
msgstr ""
-#: ../Doc/c-api/arg.rst:49
-msgid "Unless otherwise stated, buffers are not NUL-terminated."
+#: c-api/arg.rst:63
+msgid ""
+"Other formats take a :class:`str` or a read-only :term:`bytes-like object`, "
+"such as :class:`bytes`, and provide a ``const char *`` pointer to its "
+"buffer. In this case the buffer is \"borrowed\": it is managed by the "
+"corresponding Python object, and shares the lifetime of this object. You "
+"won't have to release any memory yourself."
msgstr ""
-#: ../Doc/c-api/arg.rst:51
+#: c-api/arg.rst:70
msgid ""
-"Some formats require a read-only :term:`bytes-like object`, and set a "
-"pointer instead of a buffer structure. They work by checking that the "
-"object's :c:member:`PyBufferProcs.bf_releasebuffer` field is ``NULL``, which "
-"disallows mutable objects such as :class:`bytearray`."
+"To ensure that the underlying buffer may be safely borrowed, the object's :c:"
+"member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. This "
+"disallows common mutable objects such as :class:`bytearray`, but also some "
+"read-only objects such as :class:`memoryview` of :class:`bytes`."
msgstr ""
-#: ../Doc/c-api/arg.rst:58
+#: c-api/arg.rst:76
msgid ""
-"For all ``#`` variants of formats (``s#``, ``y#``, etc.), the macro :c:macro:"
-"`PY_SSIZE_T_CLEAN` must be defined before including :file:`Python.h`. On "
-"Python 3.9 and older, the type of the length argument is :c:type:"
-"`Py_ssize_t` if the :c:macro:`PY_SSIZE_T_CLEAN` macro is defined, or int "
-"otherwise."
+"Besides this ``bf_releasebuffer`` requirement, there is no check to verify "
+"whether the input object is immutable (e.g. whether it would honor a request "
+"for a writable buffer, or whether another thread can mutate the data)."
msgstr ""
-#: ../Doc/c-api/arg.rst:83
+#: c-api/arg.rst:80
msgid "``s`` (:class:`str`) [const char \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:66
+#: c-api/arg.rst:81
msgid ""
"Convert a Unicode object to a C pointer to a character string. A pointer to "
"an existing string is stored in the character pointer variable whose address "
@@ -116,7 +134,7 @@ msgid ""
"encoding. If this conversion fails, a :exc:`UnicodeError` is raised."
msgstr ""
-#: ../Doc/c-api/arg.rst:75
+#: c-api/arg.rst:90
msgid ""
"This format does not accept :term:`bytes-like objects `. "
"If you want to accept filesystem paths and convert them to C character "
@@ -124,17 +142,17 @@ msgid ""
"`PyUnicode_FSConverter` as *converter*."
msgstr ""
-#: ../Doc/c-api/arg.rst:81 ../Doc/c-api/arg.rst:148
+#: c-api/arg.rst:96
msgid ""
"Previously, :exc:`TypeError` was raised when embedded null code points were "
"encountered in the Python string."
msgstr ""
-#: ../Doc/c-api/arg.rst:89
+#: c-api/arg.rst:100
msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]"
msgstr ""
-#: ../Doc/c-api/arg.rst:86
+#: c-api/arg.rst:101
msgid ""
"This format accepts Unicode objects as well as bytes-like objects. It fills "
"a :c:type:`Py_buffer` structure provided by the caller. In this case the "
@@ -142,109 +160,110 @@ msgid ""
"converted to C strings using ``'utf-8'`` encoding."
msgstr ""
-#: ../Doc/c-api/arg.rst:96
+#: c-api/arg.rst:106
msgid ""
"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :"
"c:type:`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:92
+#: c-api/arg.rst:107
msgid ""
-"Like ``s*``, except that it doesn't accept mutable objects. The result is "
-"stored into two C variables, the first one a pointer to a C string, the "
-"second one its length. The string may contain embedded null bytes. Unicode "
-"objects are converted to C strings using ``'utf-8'`` encoding."
+"Like ``s*``, except that it provides a :ref:`borrowed buffer `. The result is stored into two C variables, the first one a pointer "
+"to a C string, the second one its length. The string may contain embedded "
+"null bytes. Unicode objects are converted to C strings using ``'utf-8'`` "
+"encoding."
msgstr ""
-#: ../Doc/c-api/arg.rst:100 ../Doc/c-api/arg.rst:565
+#: c-api/arg.rst:581
msgid "``z`` (:class:`str` or ``None``) [const char \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:99
+#: c-api/arg.rst:114
msgid ""
"Like ``s``, but the Python object may also be ``None``, in which case the C "
"pointer is set to ``NULL``."
msgstr ""
-#: ../Doc/c-api/arg.rst:104
+#: c-api/arg.rst:117
msgid ""
"``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]"
msgstr ""
-#: ../Doc/c-api/arg.rst:103
+#: c-api/arg.rst:118
msgid ""
"Like ``s*``, but the Python object may also be ``None``, in which case the "
"``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``."
msgstr ""
-#: ../Doc/c-api/arg.rst:108
+#: c-api/arg.rst:121
msgid ""
"``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) "
"[const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:107
+#: c-api/arg.rst:122
msgid ""
"Like ``s#``, but the Python object may also be ``None``, in which case the C "
"pointer is set to ``NULL``."
msgstr ""
-#: ../Doc/c-api/arg.rst:118
+#: c-api/arg.rst:125
msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:111
+#: c-api/arg.rst:126
msgid ""
-"This format converts a bytes-like object to a C pointer to a character "
-"string; it does not accept Unicode objects. The bytes buffer must not "
-"contain embedded null bytes; if it does, a :exc:`ValueError` exception is "
-"raised."
+"This format converts a bytes-like object to a C pointer to a :ref:`borrowed "
+"` character string; it does not accept Unicode "
+"objects. The bytes buffer must not contain embedded null bytes; if it does, "
+"a :exc:`ValueError` exception is raised."
msgstr ""
-#: ../Doc/c-api/arg.rst:116
+#: c-api/arg.rst:132
msgid ""
"Previously, :exc:`TypeError` was raised when embedded null bytes were "
"encountered in the bytes buffer."
msgstr ""
-#: ../Doc/c-api/arg.rst:123
+#: c-api/arg.rst:136
msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]"
msgstr ""
-#: ../Doc/c-api/arg.rst:121
+#: c-api/arg.rst:137
msgid ""
"This variant on ``s*`` doesn't accept Unicode objects, only bytes-like "
"objects. **This is the recommended way to accept binary data.**"
msgstr ""
-#: ../Doc/c-api/arg.rst:127
+#: c-api/arg.rst:141
msgid ""
"``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:"
"`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:126
+#: c-api/arg.rst:142
msgid ""
"This variant on ``s#`` doesn't accept Unicode objects, only bytes-like "
"objects."
msgstr ""
-#: ../Doc/c-api/arg.rst:132
+#: c-api/arg.rst:145
msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:130
+#: c-api/arg.rst:146
msgid ""
"Requires that the Python object is a :class:`bytes` object, without "
"attempting any conversion. Raises :exc:`TypeError` if the object is not a "
"bytes object. The C variable may also be declared as :c:expr:`PyObject*`."
msgstr ""
-#: ../Doc/c-api/arg.rst:137
+#: c-api/arg.rst:150
msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:135
+#: c-api/arg.rst:151
msgid ""
"Requires that the Python object is a :class:`bytearray` object, without "
"attempting any conversion. Raises :exc:`TypeError` if the object is not a :"
@@ -252,77 +271,22 @@ msgid ""
"`PyObject*`."
msgstr ""
-#: ../Doc/c-api/arg.rst:154
-msgid "``u`` (:class:`str`) [const Py_UNICODE \\*]"
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:140
-msgid ""
-"Convert a Python Unicode object to a C pointer to a NUL-terminated buffer of "
-"Unicode characters. You must pass the address of a :c:type:`Py_UNICODE` "
-"pointer variable, which will be filled with the pointer to an existing "
-"Unicode buffer. Please note that the width of a :c:type:`Py_UNICODE` "
-"character depends on compilation options (it is either 16 or 32 bits). The "
-"Python string must not contain embedded null code points; if it does, a :exc:"
-"`ValueError` exception is raised."
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:155 ../Doc/c-api/arg.rst:164 ../Doc/c-api/arg.rst:172
-#: ../Doc/c-api/arg.rst:180
-msgid ""
-"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:"
-"func:`PyUnicode_AsWideCharString`."
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:163
-msgid "``u#`` (:class:`str`) [const Py_UNICODE \\*, :c:type:`Py_ssize_t`]"
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:157
-msgid ""
-"This variant on ``u`` stores into two C variables, the first one a pointer "
-"to a Unicode data buffer, the second one its length. This variant allows "
-"null code points."
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:171
-msgid "``Z`` (:class:`str` or ``None``) [const Py_UNICODE \\*]"
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:166
-msgid ""
-"Like ``u``, but the Python object may also be ``None``, in which case the :c:"
-"type:`Py_UNICODE` pointer is set to ``NULL``."
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:179
-msgid ""
-"``Z#`` (:class:`str` or ``None``) [const Py_UNICODE \\*, :c:type:"
-"`Py_ssize_t`]"
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:174
-msgid ""
-"Like ``u#``, but the Python object may also be ``None``, in which case the :"
-"c:type:`Py_UNICODE` pointer is set to ``NULL``."
-msgstr ""
-
-#: ../Doc/c-api/arg.rst:184
+#: c-api/arg.rst:155
msgid "``U`` (:class:`str`) [PyObject \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:182
+#: c-api/arg.rst:156
msgid ""
"Requires that the Python object is a Unicode object, without attempting any "
"conversion. Raises :exc:`TypeError` if the object is not a Unicode object. "
"The C variable may also be declared as :c:expr:`PyObject*`."
msgstr ""
-#: ../Doc/c-api/arg.rst:190
+#: c-api/arg.rst:160
msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]"
msgstr ""
-#: ../Doc/c-api/arg.rst:187
+#: c-api/arg.rst:161
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. "
@@ -330,17 +294,17 @@ msgid ""
"`PyBuffer_Release` when it is done with the buffer."
msgstr ""
-#: ../Doc/c-api/arg.rst:207
+#: c-api/arg.rst:166
msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]"
msgstr ""
-#: ../Doc/c-api/arg.rst:193
+#: c-api/arg.rst:167
msgid ""
"This variant on ``s`` is used for encoding Unicode into a character buffer. "
"It only works for encoded data without embedded NUL bytes."
msgstr ""
-#: ../Doc/c-api/arg.rst:196
+#: c-api/arg.rst:170
msgid ""
"This format requires two arguments. The first is only used as input, and "
"must be a :c:expr:`const char*` which points to the name of an encoding as a "
@@ -351,7 +315,7 @@ msgid ""
"The text will be encoded in the encoding specified by the first argument."
msgstr ""
-#: ../Doc/c-api/arg.rst:204
+#: c-api/arg.rst:178
msgid ""
":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy "
"the encoded data into this buffer and adjust *\\*buffer* to reference the "
@@ -359,33 +323,33 @@ msgid ""
"`PyMem_Free` to free the allocated buffer after use."
msgstr ""
-#: ../Doc/c-api/arg.rst:212
+#: c-api/arg.rst:183
msgid ""
"``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char "
"\\*encoding, char \\*\\*buffer]"
msgstr ""
-#: ../Doc/c-api/arg.rst:210
+#: c-api/arg.rst:184
msgid ""
"Same as ``es`` except that byte string objects are passed through without "
"recoding them. Instead, the implementation assumes that the byte string "
"object uses the encoding passed in as parameter."
msgstr ""
-#: ../Doc/c-api/arg.rst:243
+#: c-api/arg.rst:188
msgid ""
"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:"
"`Py_ssize_t` \\*buffer_length]"
msgstr ""
-#: ../Doc/c-api/arg.rst:215
+#: c-api/arg.rst:189
msgid ""
"This variant on ``s#`` is used for encoding Unicode into a character buffer. "
"Unlike the ``es`` format, this variant allows input data which contains NUL "
"characters."
msgstr ""
-#: ../Doc/c-api/arg.rst:219
+#: c-api/arg.rst:193
msgid ""
"It requires three arguments. The first is only used as input, and must be "
"a :c:expr:`const char*` which points to the name of an encoding as a NUL-"
@@ -398,11 +362,11 @@ msgid ""
"will be set to the number of bytes in the output buffer."
msgstr ""
-#: ../Doc/c-api/arg.rst:229
+#: c-api/arg.rst:203
msgid "There are two modes of operation:"
msgstr ""
-#: ../Doc/c-api/arg.rst:231
+#: c-api/arg.rst:205
msgid ""
"If *\\*buffer* points a ``NULL`` pointer, the function will allocate a "
"buffer of the needed size, copy the encoded data into this buffer and set "
@@ -411,7 +375,7 @@ msgid ""
"after usage."
msgstr ""
-#: ../Doc/c-api/arg.rst:236
+#: c-api/arg.rst:210
msgid ""
"If *\\*buffer* points to a non-``NULL`` pointer (an already allocated "
"buffer), :c:func:`PyArg_ParseTuple` will use this location as the buffer and "
@@ -420,197 +384,204 @@ msgid ""
"the buffer is not large enough, a :exc:`ValueError` will be set."
msgstr ""
-#: ../Doc/c-api/arg.rst:242
+#: c-api/arg.rst:216
msgid ""
"In both cases, *\\*buffer_length* is set to the length of the encoded data "
"without the trailing NUL byte."
msgstr ""
-#: ../Doc/c-api/arg.rst:248
+#: c-api/arg.rst:219
msgid ""
"``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char "
"\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]"
msgstr ""
-#: ../Doc/c-api/arg.rst:246
+#: c-api/arg.rst:220
msgid ""
"Same as ``es#`` except that byte string objects are passed through without "
"recoding them. Instead, the implementation assumes that the byte string "
"object uses the encoding passed in as parameter."
msgstr ""
-#: ../Doc/c-api/arg.rst:251
+#: c-api/arg.rst:224
+msgid ""
+"``u``, ``u#``, ``Z``, and ``Z#`` are removed because they used a legacy "
+"``Py_UNICODE*`` representation."
+msgstr ""
+
+#: c-api/arg.rst:230
msgid "Numbers"
msgstr ""
-#: ../Doc/c-api/arg.rst:255
+#: c-api/arg.rst:232
msgid "``b`` (:class:`int`) [unsigned char]"
msgstr ""
-#: ../Doc/c-api/arg.rst:254
+#: c-api/arg.rst:233
msgid ""
"Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :"
"c:expr:`unsigned char`."
msgstr ""
-#: ../Doc/c-api/arg.rst:259 ../Doc/c-api/arg.rst:599
+#: c-api/arg.rst:615
msgid "``B`` (:class:`int`) [unsigned char]"
msgstr ""
-#: ../Doc/c-api/arg.rst:258
+#: c-api/arg.rst:237
msgid ""
"Convert a Python integer to a tiny int without overflow checking, stored in "
"a C :c:expr:`unsigned char`."
msgstr ""
-#: ../Doc/c-api/arg.rst:262 ../Doc/c-api/arg.rst:593
+#: c-api/arg.rst:609
msgid "``h`` (:class:`int`) [short int]"
msgstr ""
-#: ../Doc/c-api/arg.rst:262
+#: c-api/arg.rst:241
msgid "Convert a Python integer to a C :c:expr:`short int`."
msgstr ""
-#: ../Doc/c-api/arg.rst:266 ../Doc/c-api/arg.rst:602
+#: c-api/arg.rst:618
msgid "``H`` (:class:`int`) [unsigned short int]"
msgstr ""
-#: ../Doc/c-api/arg.rst:265
+#: c-api/arg.rst:244
msgid ""
"Convert a Python integer to a C :c:expr:`unsigned short int`, without "
"overflow checking."
msgstr ""
-#: ../Doc/c-api/arg.rst:269 ../Doc/c-api/arg.rst:587
+#: c-api/arg.rst:603
msgid "``i`` (:class:`int`) [int]"
msgstr ""
-#: ../Doc/c-api/arg.rst:269
+#: c-api/arg.rst:248
msgid "Convert a Python integer to a plain C :c:expr:`int`."
msgstr ""
-#: ../Doc/c-api/arg.rst:273 ../Doc/c-api/arg.rst:605
+#: c-api/arg.rst:621
msgid "``I`` (:class:`int`) [unsigned int]"
msgstr ""
-#: ../Doc/c-api/arg.rst:272
+#: c-api/arg.rst:251
msgid ""
"Convert a Python integer to a C :c:expr:`unsigned int`, without overflow "
"checking."
msgstr ""
-#: ../Doc/c-api/arg.rst:276 ../Doc/c-api/arg.rst:596
+#: c-api/arg.rst:612
msgid "``l`` (:class:`int`) [long int]"
msgstr ""
-#: ../Doc/c-api/arg.rst:276
+#: c-api/arg.rst:255
msgid "Convert a Python integer to a C :c:expr:`long int`."
msgstr ""
-#: ../Doc/c-api/arg.rst:280 ../Doc/c-api/arg.rst:608
+#: c-api/arg.rst:624
msgid "``k`` (:class:`int`) [unsigned long]"
msgstr ""
-#: ../Doc/c-api/arg.rst:279
+#: c-api/arg.rst:258
msgid ""
"Convert a Python integer to a C :c:expr:`unsigned long` without overflow "
"checking."
msgstr ""
-#: ../Doc/c-api/arg.rst:283 ../Doc/c-api/arg.rst:611
+#: c-api/arg.rst:627
msgid "``L`` (:class:`int`) [long long]"
msgstr ""
-#: ../Doc/c-api/arg.rst:283
+#: c-api/arg.rst:262
msgid "Convert a Python integer to a C :c:expr:`long long`."
msgstr ""
-#: ../Doc/c-api/arg.rst:287 ../Doc/c-api/arg.rst:614
+#: c-api/arg.rst:630
msgid "``K`` (:class:`int`) [unsigned long long]"
msgstr ""
-#: ../Doc/c-api/arg.rst:286
+#: c-api/arg.rst:265
msgid ""
"Convert a Python integer to a C :c:expr:`unsigned long long` without "
"overflow checking."
msgstr ""
-#: ../Doc/c-api/arg.rst:290 ../Doc/c-api/arg.rst:617
+#: c-api/arg.rst:633
msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:290
+#: c-api/arg.rst:269
msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`."
msgstr ""
-#: ../Doc/c-api/arg.rst:297
+#: c-api/arg.rst:271
msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]"
msgstr ""
-#: ../Doc/c-api/arg.rst:293
+#: c-api/arg.rst:272
msgid ""
"Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` "
"object of length 1, to a C :c:expr:`char`."
msgstr ""
-#: ../Doc/c-api/arg.rst:296
+#: c-api/arg.rst:275
msgid "Allow :class:`bytearray` objects."
msgstr ""
-#: ../Doc/c-api/arg.rst:301 ../Doc/c-api/arg.rst:625
+#: c-api/arg.rst:640
msgid "``C`` (:class:`str` of length 1) [int]"
msgstr ""
-#: ../Doc/c-api/arg.rst:300
+#: c-api/arg.rst:279
msgid ""
"Convert a Python character, represented as a :class:`str` object of length "
"1, to a C :c:expr:`int`."
msgstr ""
-#: ../Doc/c-api/arg.rst:304 ../Doc/c-api/arg.rst:631
+#: c-api/arg.rst:647
msgid "``f`` (:class:`float`) [float]"
msgstr ""
-#: ../Doc/c-api/arg.rst:304
+#: c-api/arg.rst:283
msgid "Convert a Python floating point number to a C :c:expr:`float`."
msgstr ""
-#: ../Doc/c-api/arg.rst:307 ../Doc/c-api/arg.rst:628
+#: c-api/arg.rst:644
msgid "``d`` (:class:`float`) [double]"
msgstr ""
-#: ../Doc/c-api/arg.rst:307
+#: c-api/arg.rst:286
msgid "Convert a Python floating point number to a C :c:expr:`double`."
msgstr ""
-#: ../Doc/c-api/arg.rst:310
+#: c-api/arg.rst:288
msgid "``D`` (:class:`complex`) [Py_complex]"
msgstr ""
-#: ../Doc/c-api/arg.rst:310
+#: c-api/arg.rst:289
msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure."
msgstr ""
-#: ../Doc/c-api/arg.rst:313
+#: c-api/arg.rst:292
msgid "Other objects"
msgstr ""
-#: ../Doc/c-api/arg.rst:318 ../Doc/c-api/arg.rst:642
+#: c-api/arg.rst:653
msgid "``O`` (object) [PyObject \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:316
+#: c-api/arg.rst:295
msgid ""
"Store a Python object (without any conversion) in a C object pointer. The C "
-"program thus receives the actual object that was passed. The object's "
-"reference count is not increased. The pointer stored is not ``NULL``."
+"program thus receives the actual object that was passed. A new :term:"
+"`strong reference` to the object is not created (i.e. its reference count is "
+"not increased). The pointer stored is not ``NULL``."
msgstr ""
-#: ../Doc/c-api/arg.rst:325
+#: c-api/arg.rst:301
msgid "``O!`` (object) [*typeobject*, PyObject \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:321
+#: c-api/arg.rst:302
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 "
@@ -619,11 +590,11 @@ msgid ""
"required type, :exc:`TypeError` is raised."
msgstr ""
-#: ../Doc/c-api/arg.rst:350 ../Doc/c-api/arg.rst:656
+#: c-api/arg.rst:671
msgid "``O&`` (object) [*converter*, *anything*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:330
+#: c-api/arg.rst:311
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 "
@@ -631,7 +602,7 @@ msgid ""
"*converter* function in turn is called as follows::"
msgstr ""
-#: ../Doc/c-api/arg.rst:337
+#: c-api/arg.rst:318
msgid ""
"where *object* is the Python object to be converted and *address* is the :c:"
"expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The "
@@ -641,7 +612,7 @@ msgid ""
"unmodified."
msgstr ""
-#: ../Doc/c-api/arg.rst:343
+#: c-api/arg.rst:324
msgid ""
"If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a "
"second time if the argument parsing eventually fails, giving the converter a "
@@ -650,15 +621,15 @@ msgid ""
"value as in the original call."
msgstr ""
-#: ../Doc/c-api/arg.rst:349
+#: c-api/arg.rst:330
msgid "``Py_CLEANUP_SUPPORTED`` was added."
msgstr ""
-#: ../Doc/c-api/arg.rst:359
+#: c-api/arg.rst:333
msgid "``p`` (:class:`bool`) [int]"
msgstr ""
-#: ../Doc/c-api/arg.rst:353
+#: c-api/arg.rst:334
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 "
@@ -667,37 +638,37 @@ msgid ""
"how Python tests values for truth."
msgstr ""
-#: ../Doc/c-api/arg.rst:364 ../Doc/c-api/arg.rst:659
+#: c-api/arg.rst:677
msgid "``(items)`` (:class:`tuple`) [*matching-items*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:362
+#: c-api/arg.rst:343
msgid ""
"The object must be a Python sequence whose length is the number of format "
"units in *items*. The C arguments must correspond to the individual format "
"units in *items*. Format units for sequences may be nested."
msgstr ""
-#: ../Doc/c-api/arg.rst:366
+#: c-api/arg.rst:347
msgid ""
"It is possible to pass \"long\" integers (integers whose value exceeds the "
-"platform's :const:`LONG_MAX`) however no proper range checking is done --- "
+"platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- "
"the most significant bits are silently truncated when the receiving field is "
"too small to receive the value (actually, the semantics are inherited from "
"downcasts in C --- your mileage may vary)."
msgstr ""
-#: ../Doc/c-api/arg.rst:372
+#: c-api/arg.rst:353
msgid ""
"A few other characters have a meaning in a format string. These may not "
"occur inside nested parentheses. They are:"
msgstr ""
-#: ../Doc/c-api/arg.rst:380
+#: c-api/arg.rst:356
msgid "``|``"
msgstr ""
-#: ../Doc/c-api/arg.rst:376
+#: c-api/arg.rst:357
msgid ""
"Indicates that the remaining arguments in the Python argument list are "
"optional. The C variables corresponding to optional arguments should be "
@@ -706,11 +677,11 @@ msgid ""
"corresponding C variable(s)."
msgstr ""
-#: ../Doc/c-api/arg.rst:389
+#: c-api/arg.rst:363
msgid "``$``"
msgstr ""
-#: ../Doc/c-api/arg.rst:383
+#: c-api/arg.rst:364
msgid ""
":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining "
"arguments in the Python argument list are keyword-only. Currently, all "
@@ -718,35 +689,36 @@ msgid ""
"be specified before ``$`` in the format string."
msgstr ""
-#: ../Doc/c-api/arg.rst:394
+#: c-api/arg.rst:372
msgid "``:``"
msgstr ""
-#: ../Doc/c-api/arg.rst:392
+#: c-api/arg.rst:373
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 ""
-#: ../Doc/c-api/arg.rst:399
+#: c-api/arg.rst:377
msgid "``;``"
msgstr ""
-#: ../Doc/c-api/arg.rst:397
+#: c-api/arg.rst:378
msgid ""
"The list of format units ends here; the string after the semicolon is used "
"as the error message *instead* of the default error message. ``:`` and ``;"
"`` mutually exclude each other."
msgstr ""
-#: ../Doc/c-api/arg.rst:401
+#: c-api/arg.rst:382
msgid ""
"Note that any Python object references which are provided to the caller are "
-"*borrowed* references; do not decrement their reference count!"
+"*borrowed* references; do not release them (i.e. do not decrement their "
+"reference count)!"
msgstr ""
-#: ../Doc/c-api/arg.rst:404
+#: c-api/arg.rst:386
msgid ""
"Additional arguments passed to these functions must be addresses of "
"variables whose type is determined by the format string; these are used to "
@@ -756,7 +728,7 @@ msgid ""
"unit in that case."
msgstr ""
-#: ../Doc/c-api/arg.rst:410
+#: c-api/arg.rst:392
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 "
@@ -766,67 +738,82 @@ msgid ""
"the following format units are left untouched."
msgstr ""
-#: ../Doc/c-api/arg.rst:419
+#: c-api/arg.rst:401
msgid "API Functions"
msgstr ""
-#: ../Doc/c-api/arg.rst:423
+#: c-api/arg.rst:405
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 ""
-#: ../Doc/c-api/arg.rst:430
+#: c-api/arg.rst:412
msgid ""
"Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list "
"rather than a variable number of arguments."
msgstr ""
-#: ../Doc/c-api/arg.rst:436
+#: c-api/arg.rst:418
msgid ""
"Parse the parameters of a function that takes both positional and keyword "
-"parameters into local variables. The *keywords* argument is a ``NULL``-"
-"terminated array of keyword parameter names. Empty names denote :ref:"
-"`positional-only parameters `. Returns true on "
-"success; on failure, it returns false and raises the appropriate exception."
+"parameters into local variables. The *keywords* argument is a ``NULL``-"
+"terminated array of keyword parameter names specified as null-terminated "
+"ASCII or UTF-8 encoded C strings. Empty names denote :ref:`positional-only "
+"parameters `. Returns true on success; on "
+"failure, it returns false and raises the appropriate exception."
+msgstr ""
+
+#: c-api/arg.rst:429
+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 ""
-#: ../Doc/c-api/arg.rst:443
+#: c-api/arg.rst:433
msgid ""
"Added support for :ref:`positional-only parameters `."
msgstr ""
-#: ../Doc/c-api/arg.rst:450
+#: c-api/arg.rst:437
+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:446
msgid ""
"Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a "
"va_list rather than a variable number of arguments."
msgstr ""
-#: ../Doc/c-api/arg.rst:456
+#: c-api/arg.rst:452
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 ""
-#: ../Doc/c-api/arg.rst:466
+#: c-api/arg.rst:461
msgid ""
-"Function used to deconstruct the argument lists of \"old-style\" functions "
-"--- these are functions which use the :const:`METH_OLDARGS` parameter "
-"parsing method, which has been removed in Python 3. This is not recommended "
-"for use in parameter parsing in new code, and most code in the standard "
-"interpreter has been modified to no longer use this for that purpose. It "
-"does remain a convenient way to decompose other tuples, however, and may "
-"continue to be used for that purpose."
+"Parse the parameter of a function that takes a single positional parameter "
+"into a local variable. Returns true on success; on failure, it returns "
+"false and raises the appropriate exception."
+msgstr ""
+
+#: c-api/arg.rst:465
+msgid "Example::"
msgstr ""
-#: ../Doc/c-api/arg.rst:477
+#: c-api/arg.rst:481
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 "
-"retrieve their parameters should be declared as :const:`METH_VARARGS` in "
+"retrieve their parameters should be declared as :c:macro:`METH_VARARGS` in "
"function or method tables. The tuple containing the actual parameters "
"should be passed as *args*; it must actually be a tuple. The length of the "
"tuple must be at least *min* and no more than *max*; *min* and *max* may be "
@@ -840,23 +827,32 @@ msgid ""
"if there was a failure."
msgstr ""
-#: ../Doc/c-api/arg.rst:492
+#: c-api/arg.rst:496
msgid ""
"This is an example of the use of this function, taken from the sources for "
-"the :mod:`_weakref` helper module for weak references::"
+"the :mod:`!_weakref` helper module for weak references::"
msgstr ""
-#: ../Doc/c-api/arg.rst:508
+#: c-api/arg.rst:512
msgid ""
"The call to :c:func:`PyArg_UnpackTuple` in this example is entirely "
"equivalent to this call to :c:func:`PyArg_ParseTuple`::"
msgstr ""
-#: ../Doc/c-api/arg.rst:516
+#: c-api/arg.rst:519
+msgid ""
+"The value to be inserted, if any, before :c:expr:`char * const *` in the "
+"*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` "
+"and :c:func:`PyArg_VaParseTupleAndKeywords`. Default empty for C and "
+"``const`` for C++ (:c:expr:`const char * const *`). To override, define it "
+"to the desired value before including :file:`Python.h`."
+msgstr ""
+
+#: c-api/arg.rst:533
msgid "Building values"
msgstr ""
-#: ../Doc/c-api/arg.rst:520
+#: c-api/arg.rst:537
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 "
@@ -864,7 +860,7 @@ msgid ""
"``NULL`` is returned."
msgstr ""
-#: ../Doc/c-api/arg.rst:525
+#: c-api/arg.rst:542
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 "
@@ -873,7 +869,7 @@ msgid ""
"it to return a tuple of size 0 or one, parenthesize the format string."
msgstr ""
-#: ../Doc/c-api/arg.rst:531
+#: c-api/arg.rst:548
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. "
@@ -884,7 +880,7 @@ msgid ""
"`Py_BuildValue` returns."
msgstr ""
-#: ../Doc/c-api/arg.rst:539
+#: c-api/arg.rst:556
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 "
@@ -892,209 +888,209 @@ msgid ""
"be passed."
msgstr ""
-#: ../Doc/c-api/arg.rst:543
+#: c-api/arg.rst:560
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 ""
-#: ../Doc/c-api/arg.rst:549
+#: c-api/arg.rst:564
msgid "``s`` (:class:`str` or ``None``) [const char \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:548
+#: c-api/arg.rst:565
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 ""
-#: ../Doc/c-api/arg.rst:554
+#: c-api/arg.rst:568
msgid ""
"``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:552
+#: c-api/arg.rst:569
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 ""
-#: ../Doc/c-api/arg.rst:558
+#: c-api/arg.rst:573
msgid "``y`` (:class:`bytes`) [const char \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:557
+#: c-api/arg.rst:574
msgid ""
"This converts a C string to a Python :class:`bytes` object. If the C string "
"pointer is ``NULL``, ``None`` is returned."
msgstr ""
-#: ../Doc/c-api/arg.rst:562
+#: c-api/arg.rst:577
msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:561
+#: c-api/arg.rst:578
msgid ""
"This converts a C string and its lengths to a Python object. If the C "
"string pointer is ``NULL``, ``None`` is returned."
msgstr ""
-#: ../Doc/c-api/arg.rst:565 ../Doc/c-api/arg.rst:581
+#: c-api/arg.rst:598
msgid "Same as ``s``."
msgstr ""
-#: ../Doc/c-api/arg.rst:568
+#: c-api/arg.rst:584
msgid ""
"``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:568 ../Doc/c-api/arg.rst:584
+#: c-api/arg.rst:601
msgid "Same as ``s#``."
msgstr ""
-#: ../Doc/c-api/arg.rst:573
+#: c-api/arg.rst:587
msgid "``u`` (:class:`str`) [const wchar_t \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:571
+#: c-api/arg.rst:588
msgid ""
-"Convert a null-terminated :c:expr:`wchar_t` buffer of Unicode (UTF-16 or "
+"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 ""
-#: ../Doc/c-api/arg.rst:578
+#: c-api/arg.rst:592
msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:576
+#: c-api/arg.rst:593
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 ""
-#: ../Doc/c-api/arg.rst:581
+#: c-api/arg.rst:597
msgid "``U`` (:class:`str` or ``None``) [const char \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:584
+#: c-api/arg.rst:600
msgid ""
"``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-#: ../Doc/c-api/arg.rst:587
+#: c-api/arg.rst:604
msgid "Convert a plain C :c:expr:`int` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:590
+#: c-api/arg.rst:606
msgid "``b`` (:class:`int`) [char]"
msgstr ""
-#: ../Doc/c-api/arg.rst:590
+#: c-api/arg.rst:607
msgid "Convert a plain C :c:expr:`char` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:593
+#: c-api/arg.rst:610
msgid "Convert a plain C :c:expr:`short int` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:596
+#: c-api/arg.rst:613
msgid "Convert a C :c:expr:`long int` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:599
+#: c-api/arg.rst:616
msgid "Convert a C :c:expr:`unsigned char` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:602
+#: c-api/arg.rst:619
msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:605
+#: c-api/arg.rst:622
msgid "Convert a C :c:expr:`unsigned int` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:608
+#: c-api/arg.rst:625
msgid "Convert a C :c:expr:`unsigned long` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:611
+#: c-api/arg.rst:628
msgid "Convert a C :c:expr:`long long` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:614
+#: c-api/arg.rst:631
msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object."
msgstr ""
-#: ../Doc/c-api/arg.rst:617
+#: c-api/arg.rst:634
msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer."
msgstr ""
-#: ../Doc/c-api/arg.rst:621
+#: c-api/arg.rst:636
msgid "``c`` (:class:`bytes` of length 1) [char]"
msgstr ""
-#: ../Doc/c-api/arg.rst:620
+#: c-api/arg.rst:637
msgid ""
"Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` "
"object of length 1."
msgstr ""
-#: ../Doc/c-api/arg.rst:624
+#: c-api/arg.rst:641
msgid ""
"Convert a C :c:expr:`int` representing a character to Python :class:`str` "
"object of length 1."
msgstr ""
-#: ../Doc/c-api/arg.rst:628
+#: c-api/arg.rst:645
msgid "Convert a C :c:expr:`double` to a Python floating point number."
msgstr ""
-#: ../Doc/c-api/arg.rst:631
+#: c-api/arg.rst:648
msgid "Convert a C :c:expr:`float` to a Python floating point number."
msgstr ""
-#: ../Doc/c-api/arg.rst:634
+#: c-api/arg.rst:650
msgid "``D`` (:class:`complex`) [Py_complex \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:634
+#: c-api/arg.rst:651
msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number."
msgstr ""
-#: ../Doc/c-api/arg.rst:637
+#: c-api/arg.rst:654
msgid ""
-"Pass a Python object untouched (except for its reference count, which is "
-"incremented by one). If the object passed in is a ``NULL`` pointer, it is "
-"assumed that this was caused because the call producing the argument found "
-"an error and set an exception. Therefore, :c:func:`Py_BuildValue` will "
-"return ``NULL`` but won't raise an exception. If no exception has been "
-"raised yet, :exc:`SystemError` is set."
+"Pass a Python object untouched but create a new :term:`strong reference` to "
+"it (i.e. its reference count is incremented by one). If the object passed in "
+"is a ``NULL`` pointer, it is assumed that this was caused because the call "
+"producing the argument found an error and set an exception. Therefore, :c:"
+"func:`Py_BuildValue` will return ``NULL`` but won't raise an exception. If "
+"no exception has been raised yet, :exc:`SystemError` is set."
msgstr ""
-#: ../Doc/c-api/arg.rst:645
+#: c-api/arg.rst:663
msgid "``S`` (object) [PyObject \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:645
+#: c-api/arg.rst:664
msgid "Same as ``O``."
msgstr ""
-#: ../Doc/c-api/arg.rst:650
+#: c-api/arg.rst:666
msgid "``N`` (object) [PyObject \\*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:648
+#: c-api/arg.rst:667
msgid ""
-"Same as ``O``, except it doesn't increment the reference count on the "
-"object. Useful when the object is created by a call to an object constructor "
-"in the argument list."
+"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 ""
-#: ../Doc/c-api/arg.rst:653
+#: c-api/arg.rst:672
msgid ""
"Convert *anything* to a Python object through a *converter* function. The "
"function is called with *anything* (which should be compatible with :c:expr:"
@@ -1102,40 +1098,40 @@ msgid ""
"``NULL`` if an error occurred."
msgstr ""
-#: ../Doc/c-api/arg.rst:659
+#: c-api/arg.rst:678
msgid ""
"Convert a sequence of C values to a Python tuple with the same number of "
"items."
msgstr ""
-#: ../Doc/c-api/arg.rst:662
+#: c-api/arg.rst:680
msgid "``[items]`` (:class:`list`) [*matching-items*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:662
+#: c-api/arg.rst:681
msgid ""
"Convert a sequence of C values to a Python list with the same number of "
"items."
msgstr ""
-#: ../Doc/c-api/arg.rst:667
+#: c-api/arg.rst:683
msgid "``{items}`` (:class:`dict`) [*matching-items*]"
msgstr ""
-#: ../Doc/c-api/arg.rst:665
+#: c-api/arg.rst:684
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 ""
-#: ../Doc/c-api/arg.rst:669
+#: c-api/arg.rst:688
msgid ""
"If there is an error in the format string, the :exc:`SystemError` exception "
"is set and ``NULL`` returned."
msgstr ""
-#: ../Doc/c-api/arg.rst:674
+#: c-api/arg.rst:693
msgid ""
"Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list "
"rather than a variable number of arguments."
diff --git a/c-api/bool.po b/c-api/bool.po
index 4e495ec..6bdca92 100644
--- a/c-api/bool.po
+++ b/c-api/bool.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,50 +17,60 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/bool.rst:6
+#: c-api/bool.rst:6
msgid "Boolean Objects"
msgstr ""
-#: ../Doc/c-api/bool.rst:8
+#: c-api/bool.rst:8
msgid ""
"Booleans in Python are implemented as a subclass of integers. There are "
-"only two booleans, :const:`Py_False` and :const:`Py_True`. As such, the "
+"only two booleans, :c:data:`Py_False` and :c:data:`Py_True`. As such, the "
"normal creation and deletion functions don't apply to booleans. The "
"following macros are available, however."
msgstr ""
-#: ../Doc/c-api/bool.rst:16
+#: c-api/bool.rst:16
+msgid ""
+"This instance of :c:type:`PyTypeObject` represents the Python boolean type; "
+"it is the same object as :class:`bool` in the Python layer."
+msgstr ""
+
+#: c-api/bool.rst:22
msgid ""
"Return true if *o* is of type :c:data:`PyBool_Type`. This function always "
"succeeds."
msgstr ""
-#: ../Doc/c-api/bool.rst:22
+#: c-api/bool.rst:28
msgid ""
-"The Python ``False`` object. This object has no methods. It needs to be "
-"treated just like any other object with respect to reference counts."
+"The Python ``False`` object. This object has no methods and is :term:"
+"`immortal`."
msgstr ""
-#: ../Doc/c-api/bool.rst:28
-msgid ""
-"The Python ``True`` object. This object has no methods. It needs to be "
-"treated just like any other object with respect to reference counts."
+#: c-api/bool.rst:31
+msgid ":c:data:`Py_False` is :term:`immortal`."
msgstr ""
-#: ../Doc/c-api/bool.rst:34
+#: c-api/bool.rst:37
msgid ""
-"Return :const:`Py_False` from a function, properly incrementing its "
-"reference count."
+"The Python ``True`` object. This object has no methods and is :term:"
+"`immortal`."
msgstr ""
-#: ../Doc/c-api/bool.rst:40
-msgid ""
-"Return :const:`Py_True` from a function, properly incrementing its reference "
-"count."
+#: c-api/bool.rst:40
+msgid ":c:data:`Py_True` is :term:`immortal`."
+msgstr ""
+
+#: c-api/bool.rst:46
+msgid "Return :c:data:`Py_False` from a function."
+msgstr ""
+
+#: c-api/bool.rst:51
+msgid "Return :c:data:`Py_True` from a function."
msgstr ""
-#: ../Doc/c-api/bool.rst:46
+#: c-api/bool.rst:56
msgid ""
-"Return a new reference to :const:`Py_True` or :const:`Py_False` depending on "
-"the truth value of *v*."
+"Return :c:data:`Py_True` or :c:data:`Py_False`, depending on the truth value "
+"of *v*."
msgstr ""
diff --git a/c-api/buffer.po b/c-api/buffer.po
index 065445f..e6685be 100644
--- a/c-api/buffer.po
+++ b/c-api/buffer.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/buffer.rst:11
+#: c-api/buffer.rst:11
msgid "Buffer Protocol"
msgstr ""
-#: ../Doc/c-api/buffer.rst:18
+#: c-api/buffer.rst:18
msgid ""
"Certain objects available in Python wrap access to an underlying memory "
"array or *buffer*. Such objects include the built-in :class:`bytes` and :"
@@ -30,7 +30,7 @@ msgid ""
"image processing or numeric analysis."
msgstr ""
-#: ../Doc/c-api/buffer.rst:24
+#: c-api/buffer.rst:24
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 "
@@ -38,26 +38,26 @@ msgid ""
"without intermediate copying."
msgstr ""
-#: ../Doc/c-api/buffer.rst:29
+#: c-api/buffer.rst:29
msgid ""
"Python provides such a facility at the C level in the form of the :ref:"
"`buffer protocol `. This protocol has two sides:"
msgstr ""
-#: ../Doc/c-api/buffer.rst:34
+#: c-api/buffer.rst:34
msgid ""
"on the producer side, a type can export a \"buffer interface\" which allows "
"objects of that type to expose information about their underlying buffer. "
"This interface is described in the section :ref:`buffer-structs`;"
msgstr ""
-#: ../Doc/c-api/buffer.rst:38
+#: c-api/buffer.rst:38
msgid ""
"on the consumer side, several means are available to obtain a pointer to the "
"raw underlying data of an object (for example a method parameter)."
msgstr ""
-#: ../Doc/c-api/buffer.rst:41
+#: c-api/buffer.rst:41
msgid ""
"Simple objects such as :class:`bytes` and :class:`bytearray` expose their "
"underlying buffer in byte-oriented form. Other forms are possible; for "
@@ -65,11 +65,11 @@ msgid ""
"values."
msgstr ""
-#: ../Doc/c-api/buffer.rst:45
+#: c-api/buffer.rst:45
msgid ""
"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase."
"write` method of file objects: any object that can export a series of bytes "
-"through the buffer interface can be written to a file. While :meth:`write` "
+"through the buffer interface can be written to a file. While :meth:`!write` "
"only needs read-only access to the internal contents of the object passed to "
"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write "
"access to the contents of their argument. The buffer interface allows "
@@ -77,34 +77,34 @@ msgid ""
"buffers."
msgstr ""
-#: ../Doc/c-api/buffer.rst:53
+#: c-api/buffer.rst:53
msgid ""
"There are two ways for a consumer of the buffer interface to acquire a "
"buffer over a target object:"
msgstr ""
-#: ../Doc/c-api/buffer.rst:56
+#: c-api/buffer.rst:56
msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;"
msgstr ""
-#: ../Doc/c-api/buffer.rst:58
+#: c-api/buffer.rst:58
msgid ""
"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the "
"``y*``, ``w*`` or ``s*`` :ref:`format codes `."
msgstr ""
-#: ../Doc/c-api/buffer.rst:61
+#: c-api/buffer.rst:61
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 "
"resource leaks."
msgstr ""
-#: ../Doc/c-api/buffer.rst:69
+#: c-api/buffer.rst:69
msgid "Buffer structure"
msgstr ""
-#: ../Doc/c-api/buffer.rst:71
+#: c-api/buffer.rst:71
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 "
@@ -116,7 +116,7 @@ msgid ""
"in its native, in-memory format."
msgstr ""
-#: ../Doc/c-api/buffer.rst:80
+#: c-api/buffer.rst:80
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 "
@@ -125,14 +125,14 @@ msgid ""
"created."
msgstr ""
-#: ../Doc/c-api/buffer.rst:86
+#: c-api/buffer.rst:86
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 ""
-#: ../Doc/c-api/buffer.rst:94
+#: c-api/buffer.rst:94
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 "
@@ -140,28 +140,28 @@ msgid ""
"the value may point to the end of the memory block."
msgstr ""
-#: ../Doc/c-api/buffer.rst:99
+#: c-api/buffer.rst:99
msgid ""
"For :term:`contiguous` arrays, the value points to the beginning of the "
"memory block."
msgstr ""
-#: ../Doc/c-api/buffer.rst:104
+#: c-api/buffer.rst:104
msgid ""
"A new reference to the exporting object. The reference is owned by the "
-"consumer and automatically decremented and set to ``NULL`` by :c:func:"
-"`PyBuffer_Release`. The field is the equivalent of the return value of any "
-"standard C-API function."
+"consumer and automatically released (i.e. reference count decremented) and "
+"set to ``NULL`` by :c:func:`PyBuffer_Release`. The field is the equivalent "
+"of the return value of any standard C-API function."
msgstr ""
-#: ../Doc/c-api/buffer.rst:109
+#: c-api/buffer.rst:111
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 ""
-#: ../Doc/c-api/buffer.rst:116
+#: c-api/buffer.rst:118
msgid ""
"``product(shape) * itemsize``. For contiguous arrays, this is the length of "
"the underlying memory block. For non-contiguous arrays, it is the length "
@@ -169,7 +169,7 @@ msgid ""
"representation."
msgstr ""
-#: ../Doc/c-api/buffer.rst:121
+#: c-api/buffer.rst:123
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 "
@@ -177,19 +177,19 @@ msgid ""
"`PyBUF_WRITABLE`."
msgstr ""
-#: ../Doc/c-api/buffer.rst:127
+#: c-api/buffer.rst:129
msgid ""
"An indicator of whether the buffer is read-only. This field is controlled by "
"the :c:macro:`PyBUF_WRITABLE` flag."
msgstr ""
-#: ../Doc/c-api/buffer.rst:132
+#: c-api/buffer.rst:134
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 ""
-#: ../Doc/c-api/buffer.rst:135
+#: c-api/buffer.rst:137
msgid ""
"Important exception: If a consumer requests a buffer without the :c:macro:"
"`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to "
@@ -197,47 +197,41 @@ msgid ""
"original format."
msgstr ""
-#: ../Doc/c-api/buffer.rst:140
+#: c-api/buffer.rst:142
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 ""
-#: ../Doc/c-api/buffer.rst:144
+#: c-api/buffer.rst:146
msgid ""
"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:"
"`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must "
"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``."
msgstr ""
-#: ../Doc/c-api/buffer.rst:150
+#: c-api/buffer.rst:152
msgid ""
-"A *NUL* terminated string in :mod:`struct` module style syntax describing "
+"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 ""
-#: ../Doc/c-api/buffer.rst:154
+#: c-api/buffer.rst:156
msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag."
msgstr ""
-#: ../Doc/c-api/buffer.rst:158
+#: c-api/buffer.rst:160
msgid ""
"The number of dimensions the memory represents as an n-dimensional array. If "
"it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing "
"a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer."
-"strides` and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``."
+"strides` and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``. The maximum "
+"number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`."
msgstr ""
-#: ../Doc/c-api/buffer.rst:163
-msgid ""
-"The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions "
-"to 64. Exporters MUST respect this limit, consumers of multi-dimensional "
-"buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions."
-msgstr ""
-
-#: ../Doc/c-api/buffer.rst:169
+#: c-api/buffer.rst:168
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 "
@@ -245,34 +239,34 @@ msgid ""
"`~Py_buffer.len`."
msgstr ""
-#: ../Doc/c-api/buffer.rst:174
+#: c-api/buffer.rst:173
msgid ""
"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` "
"requires special attention. See `complex arrays`_ for further information."
msgstr ""
-#: ../Doc/c-api/buffer.rst:178
+#: c-api/buffer.rst:177
msgid "The shape array is read-only for the consumer."
msgstr ""
-#: ../Doc/c-api/buffer.rst:182
+#: c-api/buffer.rst:181
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 ""
-#: ../Doc/c-api/buffer.rst:186
+#: c-api/buffer.rst:185
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 ""
-#: ../Doc/c-api/buffer.rst:190
+#: c-api/buffer.rst:189
msgid "The strides array is read-only for the consumer."
msgstr ""
-#: ../Doc/c-api/buffer.rst:194
+#: c-api/buffer.rst:193
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 "
@@ -281,24 +275,24 @@ msgid ""
"that no de-referencing should occur (striding in a contiguous memory block)."
msgstr ""
-#: ../Doc/c-api/buffer.rst:201
+#: c-api/buffer.rst:200
msgid ""
"If all suboffsets are negative (i.e. no de-referencing is needed), then this "
"field must be ``NULL`` (the default value)."
msgstr ""
-#: ../Doc/c-api/buffer.rst:204
+#: c-api/buffer.rst:203
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 ""
-#: ../Doc/c-api/buffer.rst:208
+#: c-api/buffer.rst:207
msgid "The suboffsets array is read-only for the consumer."
msgstr ""
-#: ../Doc/c-api/buffer.rst:212
+#: c-api/buffer.rst:211
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 "
@@ -306,11 +300,22 @@ msgid ""
"the buffer is released. The consumer MUST NOT alter this value."
msgstr ""
-#: ../Doc/c-api/buffer.rst:221
+#: c-api/buffer.rst:218
+msgid "Constants:"
+msgstr ""
+
+#: c-api/buffer.rst:222
+msgid ""
+"The maximum number of dimensions the memory represents. Exporters MUST "
+"respect this limit, consumers of multi-dimensional buffers SHOULD be able to "
+"handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to 64."
+msgstr ""
+
+#: c-api/buffer.rst:231
msgid "Buffer request types"
msgstr ""
-#: ../Doc/c-api/buffer.rst:223
+#: c-api/buffer.rst:233
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 "
@@ -318,16 +323,16 @@ msgid ""
"argument to specify the exact buffer type it can handle."
msgstr ""
-#: ../Doc/c-api/buffer.rst:228
+#: c-api/buffer.rst:238
msgid ""
-"All :c:data:`Py_buffer` fields are unambiguously defined by the request type."
+"All :c:type:`Py_buffer` fields are unambiguously defined by the request type."
msgstr ""
-#: ../Doc/c-api/buffer.rst:232
+#: c-api/buffer.rst:242
msgid "request-independent fields"
msgstr ""
-#: ../Doc/c-api/buffer.rst:233
+#: c-api/buffer.rst:243
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:"
@@ -335,11 +340,11 @@ msgid ""
"itemsize`, :c:member:`~Py_buffer.ndim`."
msgstr ""
-#: ../Doc/c-api/buffer.rst:239
+#: c-api/buffer.rst:249
msgid "readonly, format"
msgstr ""
-#: ../Doc/c-api/buffer.rst:243
+#: 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 "
@@ -347,13 +352,13 @@ msgid ""
"MUST be consistent for all consumers."
msgstr ""
-#: ../Doc/c-api/buffer.rst:250
+#: c-api/buffer.rst:260
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 ""
-#: ../Doc/c-api/buffer.rst:254
+#: c-api/buffer.rst:264
msgid ""
":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next "
"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:"
@@ -361,158 +366,139 @@ msgid ""
"writable buffer."
msgstr ""
-#: ../Doc/c-api/buffer.rst:258
+#: c-api/buffer.rst:268
msgid ""
":c:macro:`PyBUF_FORMAT` can be \\|'d to any of the flags except :c:macro:"
"`PyBUF_SIMPLE`. The latter already implies format ``B`` (unsigned bytes)."
msgstr ""
-#: ../Doc/c-api/buffer.rst:263
+#: c-api/buffer.rst:273
msgid "shape, strides, suboffsets"
msgstr ""
-#: ../Doc/c-api/buffer.rst:265
+#: c-api/buffer.rst:275
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 ""
-#: ../Doc/c-api/buffer.rst:272 ../Doc/c-api/buffer.rst:296
-#: ../Doc/c-api/buffer.rst:321
+#: c-api/buffer.rst:306 c-api/buffer.rst:331
msgid "Request"
msgstr ""
-#: ../Doc/c-api/buffer.rst:272 ../Doc/c-api/buffer.rst:296
-#: ../Doc/c-api/buffer.rst:321
+#: c-api/buffer.rst:306 c-api/buffer.rst:331
msgid "shape"
msgstr ""
-#: ../Doc/c-api/buffer.rst:272 ../Doc/c-api/buffer.rst:296
-#: ../Doc/c-api/buffer.rst:321
+#: c-api/buffer.rst:306 c-api/buffer.rst:331
msgid "strides"
msgstr ""
-#: ../Doc/c-api/buffer.rst:272 ../Doc/c-api/buffer.rst:296
-#: ../Doc/c-api/buffer.rst:321
+#: c-api/buffer.rst:306 c-api/buffer.rst:331
msgid "suboffsets"
msgstr ""
-#: ../Doc/c-api/buffer.rst:274 ../Doc/c-api/buffer.rst:276
-#: ../Doc/c-api/buffer.rst:278 ../Doc/c-api/buffer.rst:298
-#: ../Doc/c-api/buffer.rst:300 ../Doc/c-api/buffer.rst:302
-#: ../Doc/c-api/buffer.rst:304 ../Doc/c-api/buffer.rst:323
-#: ../Doc/c-api/buffer.rst:325 ../Doc/c-api/buffer.rst:327
-#: ../Doc/c-api/buffer.rst:329 ../Doc/c-api/buffer.rst:331
-#: ../Doc/c-api/buffer.rst:333 ../Doc/c-api/buffer.rst:335
-#: ../Doc/c-api/buffer.rst:337
+#: c-api/buffer.rst:286 c-api/buffer.rst:308 c-api/buffer.rst:312
+#: c-api/buffer.rst:333 c-api/buffer.rst:337 c-api/buffer.rst:341
+#: c-api/buffer.rst:345 c-api/buffer.rst:347
msgid "yes"
msgstr ""
-#: ../Doc/c-api/buffer.rst:274 ../Doc/c-api/buffer.rst:323
-#: ../Doc/c-api/buffer.rst:325
+#: c-api/buffer.rst:333 c-api/buffer.rst:335
msgid "if needed"
msgstr ""
-#: ../Doc/c-api/buffer.rst:276 ../Doc/c-api/buffer.rst:278
-#: ../Doc/c-api/buffer.rst:280 ../Doc/c-api/buffer.rst:298
-#: ../Doc/c-api/buffer.rst:300 ../Doc/c-api/buffer.rst:302
-#: ../Doc/c-api/buffer.rst:304 ../Doc/c-api/buffer.rst:327
-#: ../Doc/c-api/buffer.rst:329 ../Doc/c-api/buffer.rst:331
-#: ../Doc/c-api/buffer.rst:333 ../Doc/c-api/buffer.rst:335
-#: ../Doc/c-api/buffer.rst:337
+#: c-api/buffer.rst:288 c-api/buffer.rst:308 c-api/buffer.rst:312
+#: c-api/buffer.rst:337 c-api/buffer.rst:341 c-api/buffer.rst:345
+#: c-api/buffer.rst:347
msgid "NULL"
msgstr ""
-#: ../Doc/c-api/buffer.rst:287
+#: c-api/buffer.rst:297
msgid "contiguity requests"
msgstr ""
-#: ../Doc/c-api/buffer.rst:289
+#: c-api/buffer.rst:299
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 ""
-#: ../Doc/c-api/buffer.rst:296 ../Doc/c-api/buffer.rst:321
+#: c-api/buffer.rst:331
msgid "contig"
msgstr ""
-#: ../Doc/c-api/buffer.rst:298 ../Doc/c-api/buffer.rst:304
-#: ../Doc/c-api/buffer.rst:335 ../Doc/c-api/buffer.rst:337
+#: c-api/buffer.rst:314 c-api/buffer.rst:347
msgid "C"
msgstr ""
-#: ../Doc/c-api/buffer.rst:300
+#: c-api/buffer.rst:310
msgid "F"
msgstr ""
-#: ../Doc/c-api/buffer.rst:302
+#: c-api/buffer.rst:312
msgid "C or F"
msgstr ""
-#: ../Doc/c-api/buffer.rst:304
+#: c-api/buffer.rst:314
msgid ":c:macro:`PyBUF_ND`"
msgstr ""
-#: ../Doc/c-api/buffer.rst:309
+#: c-api/buffer.rst:319
msgid "compound requests"
msgstr ""
-#: ../Doc/c-api/buffer.rst:311
+#: c-api/buffer.rst:321
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 ""
-#: ../Doc/c-api/buffer.rst:315
+#: c-api/buffer.rst:325
msgid ""
"In the following table *U* stands for undefined contiguity. The consumer "
"would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity."
msgstr ""
-#: ../Doc/c-api/buffer.rst:321
+#: c-api/buffer.rst:331
msgid "readonly"
msgstr ""
-#: ../Doc/c-api/buffer.rst:321
+#: c-api/buffer.rst:331
msgid "format"
msgstr ""
-#: ../Doc/c-api/buffer.rst:323 ../Doc/c-api/buffer.rst:325
-#: ../Doc/c-api/buffer.rst:327 ../Doc/c-api/buffer.rst:329
-#: ../Doc/c-api/buffer.rst:331 ../Doc/c-api/buffer.rst:333
+#: c-api/buffer.rst:335 c-api/buffer.rst:339 c-api/buffer.rst:343
msgid "U"
msgstr ""
-#: ../Doc/c-api/buffer.rst:323 ../Doc/c-api/buffer.rst:327
-#: ../Doc/c-api/buffer.rst:331 ../Doc/c-api/buffer.rst:335
+#: c-api/buffer.rst:337 c-api/buffer.rst:345
msgid "0"
msgstr ""
-#: ../Doc/c-api/buffer.rst:325 ../Doc/c-api/buffer.rst:329
-#: ../Doc/c-api/buffer.rst:333 ../Doc/c-api/buffer.rst:337
+#: c-api/buffer.rst:339 c-api/buffer.rst:347
msgid "1 or 0"
msgstr ""
-#: ../Doc/c-api/buffer.rst:342
+#: c-api/buffer.rst:352
msgid "Complex arrays"
msgstr ""
-#: ../Doc/c-api/buffer.rst:345
+#: c-api/buffer.rst:355
msgid "NumPy-style: shape and strides"
msgstr ""
-#: ../Doc/c-api/buffer.rst:347
+#: c-api/buffer.rst:357
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 ""
-#: ../Doc/c-api/buffer.rst:350
+#: c-api/buffer.rst:360
msgid ""
"If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer."
"buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In "
@@ -520,25 +506,25 @@ msgid ""
"strides` are ``NULL``."
msgstr ""
-#: ../Doc/c-api/buffer.rst:354
+#: c-api/buffer.rst:364
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 ""
-#: ../Doc/c-api/buffer.rst:364
+#: c-api/buffer.rst:374
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 ""
-#: ../Doc/c-api/buffer.rst:398
+#: c-api/buffer.rst:408
msgid "PIL-style: shape, strides and suboffsets"
msgstr ""
-#: ../Doc/c-api/buffer.rst:400
+#: c-api/buffer.rst:410
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 "
@@ -549,32 +535,32 @@ msgid ""
"x[2][3]`` arrays that can be located anywhere in memory."
msgstr ""
-#: ../Doc/c-api/buffer.rst:409
+#: c-api/buffer.rst:419
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 ""
-#: ../Doc/c-api/buffer.rst:428
+#: c-api/buffer.rst:438
msgid "Buffer-related functions"
msgstr ""
-#: ../Doc/c-api/buffer.rst:432
+#: c-api/buffer.rst:442
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 ""
-#: ../Doc/c-api/buffer.rst:439
+#: c-api/buffer.rst:449
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 :c:"
-"data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``."
+"the exporter cannot provide a buffer of the exact type, it MUST raise :exc:"
+"`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``."
msgstr ""
-#: ../Doc/c-api/buffer.rst:444
+#: c-api/buffer.rst:454
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 "
@@ -582,7 +568,7 @@ msgid ""
"instead of *exporter* (See :ref:`Buffer Object Structures `)."
msgstr ""
-#: ../Doc/c-api/buffer.rst:449
+#: c-api/buffer.rst:459
msgid ""
"Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls "
"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:"
@@ -590,26 +576,27 @@ msgid ""
"`PyBuffer_Release` must be called exactly once."
msgstr ""
-#: ../Doc/c-api/buffer.rst:457
+#: c-api/buffer.rst:467
msgid ""
-"Release the buffer *view* and decrement the reference count for ``view-"
+"Release the buffer *view* and release the :term:`strong reference` (i.e. "
+"decrement the reference count) to the view's supporting object, ``view-"
">obj``. This function MUST be called when the buffer is no longer being "
"used, otherwise reference leaks may occur."
msgstr ""
-#: ../Doc/c-api/buffer.rst:461
+#: c-api/buffer.rst:472
msgid ""
"It is an error to call this function on a buffer that was not obtained via :"
"c:func:`PyObject_GetBuffer`."
msgstr ""
-#: ../Doc/c-api/buffer.rst:467
+#: c-api/buffer.rst:478
msgid ""
-"Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer."
-"format`. On error, raise an exception and return -1."
+"Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:"
+"`~Py_buffer.format`. On error, raise an exception and return -1."
msgstr ""
-#: ../Doc/c-api/buffer.rst:475
+#: c-api/buffer.rst:486
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 "
@@ -617,71 +604,103 @@ msgid ""
"succeeds."
msgstr ""
-#: ../Doc/c-api/buffer.rst:482
+#: c-api/buffer.rst:493
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 ""
-#: ../Doc/c-api/buffer.rst:488
+#: c-api/buffer.rst:499
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."
msgstr ""
-#: ../Doc/c-api/buffer.rst:495
+#: c-api/buffer.rst:506
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 ""
-#: ../Doc/c-api/buffer.rst:499
+#: c-api/buffer.rst:510
msgid "This function fails if *len* != *src->len*."
msgstr ""
-#: ../Doc/c-api/buffer.rst:504
+#: c-api/buffer.rst:515
msgid ""
"Copy data from *src* to *dest* buffer. Can convert between C-style and or "
"Fortran-style buffers."
msgstr ""
-#: ../Doc/c-api/buffer.rst:507
+#: c-api/buffer.rst:518
msgid "``0`` is returned on success, ``-1`` on error."
msgstr ""
-#: ../Doc/c-api/buffer.rst:511
+#: c-api/buffer.rst:522
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 ""
-#: ../Doc/c-api/buffer.rst:518
+#: c-api/buffer.rst:529
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 ""
-#: ../Doc/c-api/buffer.rst:522
+#: c-api/buffer.rst:533
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 ""
-#: ../Doc/c-api/buffer.rst:526
+#: c-api/buffer.rst:537
msgid ""
"On success, set ``view->obj`` to a new reference to *exporter* and return 0. "
-"Otherwise, raise :c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` "
-"and return ``-1``;"
+"Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` and "
+"return ``-1``;"
msgstr ""
-#: ../Doc/c-api/buffer.rst:530
+#: c-api/buffer.rst:541
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 "
"unmodified. Otherwise, *exporter* MUST be ``NULL``."
msgstr ""
+
+#: c-api/buffer.rst:3
+msgid "buffer protocol"
+msgstr ""
+
+#: c-api/buffer.rst:3
+msgid "buffer interface"
+msgstr ""
+
+#: c-api/buffer.rst:3
+msgid "(see buffer protocol)"
+msgstr ""
+
+#: c-api/buffer.rst:3
+msgid "buffer object"
+msgstr ""
+
+#: c-api/buffer.rst:32
+msgid "PyBufferProcs (C type)"
+msgstr ""
+
+#: c-api/buffer.rst:294
+msgid "contiguous"
+msgstr ""
+
+#: c-api/buffer.rst:294
+msgid "C-contiguous"
+msgstr ""
+
+#: c-api/buffer.rst:294
+msgid "Fortran contiguous"
+msgstr ""
diff --git a/c-api/bytearray.po b/c-api/bytearray.po
index f4a76d7..730180f 100644
--- a/c-api/bytearray.po
+++ b/c-api/bytearray.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,84 +17,92 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/bytearray.rst:6
+#: c-api/bytearray.rst:6
msgid "Byte Array Objects"
msgstr ""
-#: ../Doc/c-api/bytearray.rst:13
+#: c-api/bytearray.rst:13
msgid ""
"This subtype of :c:type:`PyObject` represents a Python bytearray object."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:18
+#: c-api/bytearray.rst:18
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python bytearray "
"type; it is the same object as :class:`bytearray` in the Python layer."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:23
+#: c-api/bytearray.rst:23
msgid "Type check macros"
msgstr ""
-#: ../Doc/c-api/bytearray.rst:27
+#: c-api/bytearray.rst:27
msgid ""
"Return true if the object *o* is a bytearray object or an instance of a "
"subtype of the bytearray type. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:33
+#: c-api/bytearray.rst:33
msgid ""
"Return true if the object *o* is a bytearray object, but not an instance of "
"a subtype of the bytearray type. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:38
+#: c-api/bytearray.rst:38
msgid "Direct API functions"
msgstr ""
-#: ../Doc/c-api/bytearray.rst:42
+#: c-api/bytearray.rst:42
msgid ""
"Return a new bytearray object from any object, *o*, that implements the :ref:"
"`buffer protocol `."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:48
+#: c-api/bytearray.rst:48
msgid ""
"Create a new bytearray object from *string* and its length, *len*. On "
"failure, ``NULL`` is returned."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:54
+#: c-api/bytearray.rst:54
msgid ""
"Concat bytearrays *a* and *b* and return a new bytearray with the result."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:59
+#: c-api/bytearray.rst:59
msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:64
+#: c-api/bytearray.rst:64
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."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:71
+#: c-api/bytearray.rst:71
msgid "Resize the internal buffer of *bytearray* to *len*."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:74
+#: c-api/bytearray.rst:74
msgid "Macros"
msgstr ""
-#: ../Doc/c-api/bytearray.rst:76
+#: c-api/bytearray.rst:76
msgid "These macros trade safety for speed and they don't check pointers."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:80
+#: c-api/bytearray.rst:80
msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking."
msgstr ""
-#: ../Doc/c-api/bytearray.rst:85
+#: c-api/bytearray.rst:85
msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking."
msgstr ""
+
+#: c-api/bytearray.rst:8
+msgid "object"
+msgstr ""
+
+#: c-api/bytearray.rst:8
+msgid "bytearray"
+msgstr ""
diff --git a/c-api/bytes.po b/c-api/bytes.po
index df9eb37..f99b083 100644
--- a/c-api/bytes.po
+++ b/c-api/bytes.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,53 +17,53 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/bytes.rst:6
+#: c-api/bytes.rst:6
msgid "Bytes Objects"
msgstr ""
-#: ../Doc/c-api/bytes.rst:8
+#: c-api/bytes.rst:8
msgid ""
"These functions raise :exc:`TypeError` when expecting a bytes parameter and "
"called with a non-bytes parameter."
msgstr ""
-#: ../Doc/c-api/bytes.rst:16
+#: c-api/bytes.rst:16
msgid "This subtype of :c:type:`PyObject` represents a Python bytes object."
msgstr ""
-#: ../Doc/c-api/bytes.rst:21
+#: c-api/bytes.rst:21
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python bytes type; it "
"is the same object as :class:`bytes` in the Python layer."
msgstr ""
-#: ../Doc/c-api/bytes.rst:27
+#: c-api/bytes.rst:27
msgid ""
"Return true if the object *o* is a bytes object or an instance of a subtype "
"of the bytes type. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/bytes.rst:33
+#: c-api/bytes.rst:33
msgid ""
"Return true if the object *o* is a bytes object, but not an instance of a "
"subtype of the bytes type. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/bytes.rst:39
+#: c-api/bytes.rst:39
msgid ""
"Return a new bytes object with a copy of the string *v* as value on success, "
"and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will "
"not be checked."
msgstr ""
-#: ../Doc/c-api/bytes.rst:46
+#: c-api/bytes.rst:46
msgid ""
"Return a new bytes object with a copy of the string *v* as value and length "
"*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents "
"of the bytes object are uninitialized."
msgstr ""
-#: ../Doc/c-api/bytes.rst:53
+#: c-api/bytes.rst:53
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 "
@@ -73,187 +73,186 @@ msgid ""
"allowed:"
msgstr ""
-#: ../Doc/c-api/bytes.rst:68
+#: c-api/bytes.rst:65
msgid "Format Characters"
msgstr ""
-#: ../Doc/c-api/bytes.rst:68
+#: c-api/bytes.rst:65
msgid "Type"
msgstr ""
-#: ../Doc/c-api/bytes.rst:68
+#: c-api/bytes.rst:65
msgid "Comment"
msgstr ""
-#: ../Doc/c-api/bytes.rst:70
-msgid ":attr:`%%`"
+#: c-api/bytes.rst:67
+msgid "``%%``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:70
+#: c-api/bytes.rst:67
msgid "*n/a*"
msgstr ""
-#: ../Doc/c-api/bytes.rst:70
+#: c-api/bytes.rst:67
msgid "The literal % character."
msgstr ""
-#: ../Doc/c-api/bytes.rst:72
-msgid ":attr:`%c`"
+#: c-api/bytes.rst:69
+msgid "``%c``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:72 ../Doc/c-api/bytes.rst:75
-#: ../Doc/c-api/bytes.rst:93 ../Doc/c-api/bytes.rst:96
+#: c-api/bytes.rst:72 c-api/bytes.rst:93
msgid "int"
msgstr ""
-#: ../Doc/c-api/bytes.rst:72
+#: c-api/bytes.rst:69
msgid "A single byte, represented as a C int."
msgstr ""
-#: ../Doc/c-api/bytes.rst:75
-msgid ":attr:`%d`"
+#: c-api/bytes.rst:72
+msgid "``%d``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:75
+#: c-api/bytes.rst:72
msgid "Equivalent to ``printf(\"%d\")``. [1]_"
msgstr ""
-#: ../Doc/c-api/bytes.rst:78
-msgid ":attr:`%u`"
+#: c-api/bytes.rst:75
+msgid "``%u``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:78
+#: c-api/bytes.rst:75
msgid "unsigned int"
msgstr ""
-#: ../Doc/c-api/bytes.rst:78
+#: c-api/bytes.rst:75
msgid "Equivalent to ``printf(\"%u\")``. [1]_"
msgstr ""
-#: ../Doc/c-api/bytes.rst:81
-msgid ":attr:`%ld`"
+#: c-api/bytes.rst:78
+msgid "``%ld``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:81
+#: c-api/bytes.rst:78
msgid "long"
msgstr ""
-#: ../Doc/c-api/bytes.rst:81
+#: c-api/bytes.rst:78
msgid "Equivalent to ``printf(\"%ld\")``. [1]_"
msgstr ""
-#: ../Doc/c-api/bytes.rst:84
-msgid ":attr:`%lu`"
+#: c-api/bytes.rst:81
+msgid "``%lu``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:84
+#: c-api/bytes.rst:81
msgid "unsigned long"
msgstr ""
-#: ../Doc/c-api/bytes.rst:84
+#: c-api/bytes.rst:81
msgid "Equivalent to ``printf(\"%lu\")``. [1]_"
msgstr ""
-#: ../Doc/c-api/bytes.rst:87
-msgid ":attr:`%zd`"
+#: c-api/bytes.rst:84
+msgid "``%zd``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:87
+#: c-api/bytes.rst:84
msgid ":c:type:`\\ Py_ssize_t`"
msgstr ""
-#: ../Doc/c-api/bytes.rst:87
+#: c-api/bytes.rst:84
msgid "Equivalent to ``printf(\"%zd\")``. [1]_"
msgstr ""
-#: ../Doc/c-api/bytes.rst:90
-msgid ":attr:`%zu`"
+#: c-api/bytes.rst:87
+msgid "``%zu``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:90
+#: c-api/bytes.rst:87
msgid "size_t"
msgstr ""
-#: ../Doc/c-api/bytes.rst:90
+#: c-api/bytes.rst:87
msgid "Equivalent to ``printf(\"%zu\")``. [1]_"
msgstr ""
-#: ../Doc/c-api/bytes.rst:93
-msgid ":attr:`%i`"
+#: c-api/bytes.rst:90
+msgid "``%i``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:93
+#: c-api/bytes.rst:90
msgid "Equivalent to ``printf(\"%i\")``. [1]_"
msgstr ""
-#: ../Doc/c-api/bytes.rst:96
-msgid ":attr:`%x`"
+#: c-api/bytes.rst:93
+msgid "``%x``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:96
+#: c-api/bytes.rst:93
msgid "Equivalent to ``printf(\"%x\")``. [1]_"
msgstr ""
-#: ../Doc/c-api/bytes.rst:99
-msgid ":attr:`%s`"
+#: c-api/bytes.rst:96
+msgid "``%s``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:99
+#: c-api/bytes.rst:96
msgid "const char\\*"
msgstr ""
-#: ../Doc/c-api/bytes.rst:99
+#: c-api/bytes.rst:96
msgid "A null-terminated C character array."
msgstr ""
-#: ../Doc/c-api/bytes.rst:102
-msgid ":attr:`%p`"
+#: c-api/bytes.rst:99
+msgid "``%p``"
msgstr ""
-#: ../Doc/c-api/bytes.rst:102
+#: c-api/bytes.rst:99
msgid "const void\\*"
msgstr ""
-#: ../Doc/c-api/bytes.rst:102
+#: c-api/bytes.rst:99
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 ""
-#: ../Doc/c-api/bytes.rst:111
+#: c-api/bytes.rst:108
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 ""
-#: ../Doc/c-api/bytes.rst:114
+#: c-api/bytes.rst:111
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 ""
-#: ../Doc/c-api/bytes.rst:120
+#: c-api/bytes.rst:117
msgid ""
"Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two "
"arguments."
msgstr ""
-#: ../Doc/c-api/bytes.rst:126
+#: c-api/bytes.rst:123
msgid ""
"Return the bytes representation of object *o* that implements the buffer "
"protocol."
msgstr ""
-#: ../Doc/c-api/bytes.rst:132
+#: c-api/bytes.rst:129
msgid "Return the length of the bytes in bytes object *o*."
msgstr ""
-#: ../Doc/c-api/bytes.rst:137
+#: c-api/bytes.rst:134
msgid "Similar to :c:func:`PyBytes_Size`, but without error checking."
msgstr ""
-#: ../Doc/c-api/bytes.rst:142
+#: c-api/bytes.rst:139
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 "
@@ -264,24 +263,24 @@ msgid ""
"`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`."
msgstr ""
-#: ../Doc/c-api/bytes.rst:154
+#: c-api/bytes.rst:151
msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking."
msgstr ""
-#: ../Doc/c-api/bytes.rst:159
+#: c-api/bytes.rst:156
msgid ""
"Return the null-terminated contents of the object *obj* through the output "
-"variables *buffer* and *length*."
+"variables *buffer* and *length*. Returns ``0`` on success."
msgstr ""
-#: ../Doc/c-api/bytes.rst:162
+#: c-api/bytes.rst:160
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 ""
-#: ../Doc/c-api/bytes.rst:166
+#: c-api/bytes.rst:164
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 "
@@ -291,13 +290,13 @@ msgid ""
"returns ``-1`` and raises :exc:`TypeError`."
msgstr ""
-#: ../Doc/c-api/bytes.rst:173
+#: c-api/bytes.rst:171
msgid ""
"Previously, :exc:`TypeError` was raised when embedded null bytes were "
"encountered in the bytes object."
msgstr ""
-#: ../Doc/c-api/bytes.rst:180
+#: c-api/bytes.rst:178
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 "
@@ -306,23 +305,29 @@ msgid ""
"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set."
msgstr ""
-#: ../Doc/c-api/bytes.rst:189
+#: c-api/bytes.rst:187
msgid ""
"Create a new bytes object in *\\*bytes* containing the contents of *newpart* "
-"appended to *bytes*. This version decrements the reference count of "
-"*newpart*."
+"appended to *bytes*. This version releases the :term:`strong reference` to "
+"*newpart* (i.e. decrements its reference count)."
msgstr ""
-#: ../Doc/c-api/bytes.rst:196
+#: c-api/bytes.rst:194
msgid ""
-"A way to resize a bytes object even though it is \"immutable\". Only use "
-"this to build up a brand new bytes object; don't use this if the bytes may "
-"already be known in other parts of the code. It is an error to call this "
-"function if the refcount on the input bytes object is not one. Pass the "
-"address of an existing bytes object as an lvalue (it may be written into), "
-"and the new size desired. On success, *\\*bytes* holds the resized bytes "
-"object and ``0`` is returned; the address in *\\*bytes* may differ from its "
-"input value. If the reallocation fails, the original bytes object at "
-"*\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` "
-"is set, and ``-1`` is returned."
+"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 "
+"one, only more efficiently. Pass the address of an existing bytes object as "
+"an lvalue (it may be written into), and the new size desired. On success, "
+"*\\*bytes* holds the resized bytes object and ``0`` is returned; the address "
+"in *\\*bytes* may differ from its input value. If the reallocation fails, "
+"the original bytes object at *\\*bytes* is deallocated, *\\*bytes* is set to "
+"``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned."
+msgstr ""
+
+#: c-api/bytes.rst:11
+msgid "object"
+msgstr ""
+
+#: c-api/bytes.rst:11
+msgid "bytes"
msgstr ""
diff --git a/c-api/call.po b/c-api/call.po
index 2e8f8bf..28341d2 100644
--- a/c-api/call.po
+++ b/c-api/call.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,26 +17,26 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/call.rst:6
+#: c-api/call.rst:6
msgid "Call Protocol"
msgstr ""
-#: ../Doc/c-api/call.rst:8
+#: c-api/call.rst:8
msgid ""
"CPython supports two different calling protocols: *tp_call* and vectorcall."
msgstr ""
-#: ../Doc/c-api/call.rst:12
+#: c-api/call.rst:12
msgid "The *tp_call* Protocol"
msgstr ""
-#: ../Doc/c-api/call.rst:14
+#: c-api/call.rst:14
msgid ""
"Instances of classes that set :c:member:`~PyTypeObject.tp_call` are "
"callable. The signature of the slot is::"
msgstr ""
-#: ../Doc/c-api/call.rst:19
+#: c-api/call.rst:19
msgid ""
"A call is made using a tuple for the positional arguments and a dict for the "
"keyword arguments, similarly to ``callable(*args, **kwargs)`` in Python "
@@ -44,29 +44,29 @@ msgid ""
"but *kwargs* may be *NULL* if there are no keyword arguments."
msgstr ""
-#: ../Doc/c-api/call.rst:25
+#: c-api/call.rst:25
msgid ""
"This convention is not only used by *tp_call*: :c:member:`~PyTypeObject."
"tp_new` and :c:member:`~PyTypeObject.tp_init` also pass arguments this way."
msgstr ""
-#: ../Doc/c-api/call.rst:29
+#: c-api/call.rst:29
msgid ""
"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API "
"`."
msgstr ""
-#: ../Doc/c-api/call.rst:36
+#: c-api/call.rst:36
msgid "The Vectorcall Protocol"
msgstr ""
-#: ../Doc/c-api/call.rst:40
+#: c-api/call.rst:40
msgid ""
"The vectorcall protocol was introduced in :pep:`590` as an additional "
"protocol for making calls more efficient."
msgstr ""
-#: ../Doc/c-api/call.rst:43
+#: c-api/call.rst:43
msgid ""
"As rule of thumb, CPython will prefer the vectorcall for internal calls if "
"the callable supports it. However, this is not a hard rule. Additionally, "
@@ -78,13 +78,23 @@ msgid ""
"`PyVectorcall_Call`. This bears repeating:"
msgstr ""
-#: ../Doc/c-api/call.rst:57
+#: c-api/call.rst:57
msgid ""
"A class supporting vectorcall **must** also implement :c:member:"
"`~PyTypeObject.tp_call` with the same semantics."
msgstr ""
-#: ../Doc/c-api/call.rst:60
+#: c-api/call.rst:62
+msgid ""
+"The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class "
+"when the class's :py:meth:`~object.__call__` method is reassigned. (This "
+"internally sets :c:member:`~PyTypeObject.tp_call` only, and thus may make it "
+"behave differently than the vectorcall function.) In earlier Python "
+"versions, vectorcall should only be used with :c:macro:`immutable "
+"` or static types."
+msgstr ""
+
+#: c-api/call.rst:69
msgid ""
"A class should not implement vectorcall if that would be slower than "
"*tp_call*. For example, if the callee needs to convert the arguments to an "
@@ -92,52 +102,52 @@ msgid ""
"vectorcall."
msgstr ""
-#: ../Doc/c-api/call.rst:65
+#: c-api/call.rst:74
msgid ""
-"Classes can implement the vectorcall protocol by enabling the :const:"
+"Classes can implement the vectorcall protocol by enabling the :c:macro:"
"`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject."
"tp_vectorcall_offset` to the offset inside the object structure where a "
"*vectorcallfunc* appears. This is a pointer to a function with the following "
"signature:"
msgstr ""
-#: ../Doc/c-api/call.rst:73
+#: c-api/call.rst:82
msgid "*callable* is the object being called."
msgstr ""
-#: ../Doc/c-api/call.rst:75
+#: c-api/call.rst:83
msgid ""
"*args* is a C array consisting of the positional arguments followed by the"
msgstr ""
-#: ../Doc/c-api/call.rst:75
+#: c-api/call.rst:84
msgid ""
"values of the keyword arguments. This can be *NULL* if there are no "
"arguments."
msgstr ""
-#: ../Doc/c-api/call.rst:79
+#: c-api/call.rst:86
msgid "*nargsf* is the number of positional arguments plus possibly the"
msgstr ""
-#: ../Doc/c-api/call.rst:78
+#: c-api/call.rst:87
msgid ""
-":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of "
+":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of "
"positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`."
msgstr ""
-#: ../Doc/c-api/call.rst:85
+#: c-api/call.rst:90
msgid "*kwnames* is a tuple containing the names of the keyword arguments;"
msgstr ""
-#: ../Doc/c-api/call.rst:82
+#: c-api/call.rst:91
msgid ""
"in other words, the keys of the kwargs dict. These names must be strings "
"(instances of ``str`` or a subclass) and they must be unique. If there are "
"no keyword arguments, then *kwnames* can instead be *NULL*."
msgstr ""
-#: ../Doc/c-api/call.rst:89
+#: c-api/call.rst:98
msgid ""
"If this flag is set in a vectorcall *nargsf* argument, the callee is allowed "
"to temporarily change ``args[-1]``. In other words, *args* points to "
@@ -145,74 +155,62 @@ msgid ""
"value of ``args[-1]`` before returning."
msgstr ""
-#: ../Doc/c-api/call.rst:94
+#: c-api/call.rst:103
msgid ""
"For :c:func:`PyObject_VectorcallMethod`, this flag means instead that "
"``args[0]`` may be changed."
msgstr ""
-#: ../Doc/c-api/call.rst:97
+#: c-api/call.rst:106
msgid ""
"Whenever they can do so cheaply (without additional allocation), callers are "
-"encouraged to use :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will "
+"encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will "
"allow callables such as bound methods to make their onward calls (which "
"include a prepended *self* argument) very efficiently."
msgstr ""
-#: ../Doc/c-api/call.rst:102
+#: c-api/call.rst:113
msgid ""
"To call an object that implements vectorcall, use a :ref:`call API ` function as with any other callable. :c:func:`PyObject_Vectorcall` "
"will usually be most efficient."
msgstr ""
-#: ../Doc/c-api/call.rst:109
-msgid ""
-"In CPython 3.8, the vectorcall API and related functions were available "
-"provisionally under names with a leading underscore: "
-"``_PyObject_Vectorcall``, ``_Py_TPFLAGS_HAVE_VECTORCALL``, "
-"``_PyObject_VectorcallMethod``, ``_PyVectorcall_Function``, "
-"``_PyObject_CallOneArg``, ``_PyObject_CallMethodNoArgs``, "
-"``_PyObject_CallMethodOneArg``. Additionally, ``PyObject_VectorcallDict`` "
-"was available as ``_PyObject_FastCallDict``. The old names are still defined "
-"as aliases of the new, non-underscored names."
-msgstr ""
-
-#: ../Doc/c-api/call.rst:121
+#: c-api/call.rst:119
msgid "Recursion Control"
msgstr ""
-#: ../Doc/c-api/call.rst:123
+#: c-api/call.rst:121
msgid ""
"When using *tp_call*, callees do not need to worry about :ref:`recursion "
"`: CPython uses :c:func:`Py_EnterRecursiveCall` and :c:func:"
"`Py_LeaveRecursiveCall` for calls made using *tp_call*."
msgstr ""
-#: ../Doc/c-api/call.rst:128
+#: c-api/call.rst:126
msgid ""
"For efficiency, this is not the case for calls done using vectorcall: the "
"callee should use *Py_EnterRecursiveCall* and *Py_LeaveRecursiveCall* if "
"needed."
msgstr ""
-#: ../Doc/c-api/call.rst:134
+#: c-api/call.rst:132
msgid "Vectorcall Support API"
msgstr ""
-#: ../Doc/c-api/call.rst:138
+#: c-api/call.rst:136
msgid ""
"Given a vectorcall *nargsf* argument, return the actual number of arguments. "
"Currently equivalent to::"
msgstr ""
-#: ../Doc/c-api/call.rst:144
+#: c-api/call.rst:142
msgid ""
"However, the function ``PyVectorcall_NARGS`` should be used to allow for "
"future extensions."
msgstr ""
-#: ../Doc/c-api/call.rst:151
+#: c-api/call.rst:149
msgid ""
"If *op* does not support the vectorcall protocol (either because the type "
"does not or because the specific instance does not), return *NULL*. "
@@ -220,31 +218,31 @@ msgid ""
"function never raises an exception."
msgstr ""
-#: ../Doc/c-api/call.rst:156
+#: c-api/call.rst:154
msgid ""
"This is mostly useful to check whether or not *op* supports vectorcall, "
"which can be done by checking ``PyVectorcall_Function(op) != NULL``."
msgstr ""
-#: ../Doc/c-api/call.rst:163
+#: c-api/call.rst:161
msgid ""
"Call *callable*'s :c:type:`vectorcallfunc` with positional and keyword "
"arguments given in a tuple and dict, respectively."
msgstr ""
-#: ../Doc/c-api/call.rst:166
+#: c-api/call.rst:164
msgid ""
"This is a specialized function, intended to be put in the :c:member:"
"`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. "
-"It does not check the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does "
+"It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does "
"not fall back to ``tp_call``."
msgstr ""
-#: ../Doc/c-api/call.rst:177
+#: c-api/call.rst:175
msgid "Object Calling API"
msgstr ""
-#: ../Doc/c-api/call.rst:179
+#: c-api/call.rst:177
msgid ""
"Various functions are available for calling a Python object. Each converts "
"its arguments to a convention supported by the called object – either "
@@ -252,189 +250,177 @@ msgid ""
"pick one that best fits the format of data you have available."
msgstr ""
-#: ../Doc/c-api/call.rst:185
+#: c-api/call.rst:183
msgid ""
"The following table summarizes the available functions; please see "
"individual documentation for details."
msgstr ""
-#: ../Doc/c-api/call.rst:189
+#: c-api/call.rst:187
msgid "Function"
msgstr ""
-#: ../Doc/c-api/call.rst:189
+#: c-api/call.rst:187
msgid "callable"
msgstr ""
-#: ../Doc/c-api/call.rst:189
+#: c-api/call.rst:187
msgid "args"
msgstr ""
-#: ../Doc/c-api/call.rst:189
+#: c-api/call.rst:187
msgid "kwargs"
msgstr ""
-#: ../Doc/c-api/call.rst:191
+#: c-api/call.rst:189
msgid ":c:func:`PyObject_Call`"
msgstr ""
-#: ../Doc/c-api/call.rst:191 ../Doc/c-api/call.rst:193
-#: ../Doc/c-api/call.rst:195 ../Doc/c-api/call.rst:197
-#: ../Doc/c-api/call.rst:199 ../Doc/c-api/call.rst:203
-#: ../Doc/c-api/call.rst:211 ../Doc/c-api/call.rst:213
+#: c-api/call.rst:191 c-api/call.rst:195 c-api/call.rst:201 c-api/call.rst:211
msgid "``PyObject *``"
msgstr ""
-#: ../Doc/c-api/call.rst:191
+#: c-api/call.rst:189
msgid "tuple"
msgstr ""
-#: ../Doc/c-api/call.rst:191 ../Doc/c-api/call.rst:213
+#: c-api/call.rst:211
msgid "dict/``NULL``"
msgstr ""
-#: ../Doc/c-api/call.rst:193
+#: c-api/call.rst:191
msgid ":c:func:`PyObject_CallNoArgs`"
msgstr ""
-#: ../Doc/c-api/call.rst:193 ../Doc/c-api/call.rst:195
-#: ../Doc/c-api/call.rst:197 ../Doc/c-api/call.rst:199
-#: ../Doc/c-api/call.rst:201 ../Doc/c-api/call.rst:203
-#: ../Doc/c-api/call.rst:205 ../Doc/c-api/call.rst:207
-#: ../Doc/c-api/call.rst:209
+#: c-api/call.rst:193 c-api/call.rst:197 c-api/call.rst:201 c-api/call.rst:205
+#: c-api/call.rst:207
msgid "---"
msgstr ""
-#: ../Doc/c-api/call.rst:195
+#: c-api/call.rst:193
msgid ":c:func:`PyObject_CallOneArg`"
msgstr ""
-#: ../Doc/c-api/call.rst:195 ../Doc/c-api/call.rst:209
+#: c-api/call.rst:207
msgid "1 object"
msgstr ""
-#: ../Doc/c-api/call.rst:197
+#: c-api/call.rst:195
msgid ":c:func:`PyObject_CallObject`"
msgstr ""
-#: ../Doc/c-api/call.rst:197
+#: c-api/call.rst:195
msgid "tuple/``NULL``"
msgstr ""
-#: ../Doc/c-api/call.rst:199
+#: c-api/call.rst:197
msgid ":c:func:`PyObject_CallFunction`"
msgstr ""
-#: ../Doc/c-api/call.rst:199 ../Doc/c-api/call.rst:201
+#: c-api/call.rst:199
msgid "format"
msgstr ""
-#: ../Doc/c-api/call.rst:201
+#: c-api/call.rst:199
msgid ":c:func:`PyObject_CallMethod`"
msgstr ""
-#: ../Doc/c-api/call.rst:201
+#: c-api/call.rst:199
msgid "obj + ``char*``"
msgstr ""
-#: ../Doc/c-api/call.rst:203
+#: c-api/call.rst:201
msgid ":c:func:`PyObject_CallFunctionObjArgs`"
msgstr ""
-#: ../Doc/c-api/call.rst:203 ../Doc/c-api/call.rst:205
+#: c-api/call.rst:203
msgid "variadic"
msgstr ""
-#: ../Doc/c-api/call.rst:205
+#: c-api/call.rst:203
msgid ":c:func:`PyObject_CallMethodObjArgs`"
msgstr ""
-#: ../Doc/c-api/call.rst:205 ../Doc/c-api/call.rst:207
-#: ../Doc/c-api/call.rst:209
+#: c-api/call.rst:205 c-api/call.rst:207
msgid "obj + name"
msgstr ""
-#: ../Doc/c-api/call.rst:207
+#: c-api/call.rst:205
msgid ":c:func:`PyObject_CallMethodNoArgs`"
msgstr ""
-#: ../Doc/c-api/call.rst:209
+#: c-api/call.rst:207
msgid ":c:func:`PyObject_CallMethodOneArg`"
msgstr ""
-#: ../Doc/c-api/call.rst:211
+#: c-api/call.rst:209
msgid ":c:func:`PyObject_Vectorcall`"
msgstr ""
-#: ../Doc/c-api/call.rst:211 ../Doc/c-api/call.rst:213
-#: ../Doc/c-api/call.rst:215
+#: c-api/call.rst:211 c-api/call.rst:213
msgid "vectorcall"
msgstr ""
-#: ../Doc/c-api/call.rst:213
+#: c-api/call.rst:211
msgid ":c:func:`PyObject_VectorcallDict`"
msgstr ""
-#: ../Doc/c-api/call.rst:215
+#: c-api/call.rst:213
msgid ":c:func:`PyObject_VectorcallMethod`"
msgstr ""
-#: ../Doc/c-api/call.rst:215
+#: c-api/call.rst:213
msgid "arg + name"
msgstr ""
-#: ../Doc/c-api/call.rst:221
+#: c-api/call.rst:219
msgid ""
"Call a callable Python object *callable*, with arguments given by the tuple "
"*args*, and named arguments given by the dictionary *kwargs*."
msgstr ""
-#: ../Doc/c-api/call.rst:224
+#: c-api/call.rst:222
msgid ""
"*args* must not be *NULL*; use an empty tuple if no arguments are needed. If "
"no named arguments are needed, *kwargs* can be *NULL*."
msgstr ""
-#: ../Doc/c-api/call.rst:227 ../Doc/c-api/call.rst:239
-#: ../Doc/c-api/call.rst:250 ../Doc/c-api/call.rst:261
-#: ../Doc/c-api/call.rst:273 ../Doc/c-api/call.rst:293
-#: ../Doc/c-api/call.rst:312 ../Doc/c-api/call.rst:326
-#: ../Doc/c-api/call.rst:335 ../Doc/c-api/call.rst:347
-#: ../Doc/c-api/call.rst:360 ../Doc/c-api/call.rst:394
+#: 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
msgid ""
"Return the result of the call on success, or raise an exception and return "
"*NULL* on failure."
msgstr ""
-#: ../Doc/c-api/call.rst:230
+#: c-api/call.rst:228
msgid ""
"This is the equivalent of the Python expression: ``callable(*args, "
"**kwargs)``."
msgstr ""
-#: ../Doc/c-api/call.rst:236
+#: c-api/call.rst:234
msgid ""
"Call a callable Python object *callable* without any arguments. It is the "
"most efficient way to call a callable Python object without any argument."
msgstr ""
-#: ../Doc/c-api/call.rst:247
+#: c-api/call.rst:245
msgid ""
"Call a callable Python object *callable* with exactly 1 positional argument "
"*arg* and no keyword arguments."
msgstr ""
-#: ../Doc/c-api/call.rst:258
+#: c-api/call.rst:256
msgid ""
"Call a callable Python object *callable*, with arguments given by the tuple "
"*args*. If no arguments are needed, then *args* can be *NULL*."
msgstr ""
-#: ../Doc/c-api/call.rst:264 ../Doc/c-api/call.rst:276
+#: c-api/call.rst:274
msgid "This is the equivalent of the Python expression: ``callable(*args)``."
msgstr ""
-#: ../Doc/c-api/call.rst:269
+#: c-api/call.rst:267
msgid ""
"Call a callable Python object *callable*, with a variable number of C "
"arguments. The C arguments are described using a :c:func:`Py_BuildValue` "
@@ -442,57 +428,57 @@ msgid ""
"are provided."
msgstr ""
-#: ../Doc/c-api/call.rst:278
+#: c-api/call.rst:276
msgid ""
"Note that if you only pass :c:expr:`PyObject *` args, :c:func:"
"`PyObject_CallFunctionObjArgs` is a faster alternative."
msgstr ""
-#: ../Doc/c-api/call.rst:281
+#: c-api/call.rst:279
msgid "The type of *format* was changed from ``char *``."
msgstr ""
-#: ../Doc/c-api/call.rst:287
+#: c-api/call.rst:285
msgid ""
"Call the method named *name* of object *obj* with a variable number of C "
"arguments. The C arguments are described by a :c:func:`Py_BuildValue` "
"format string that should produce a tuple."
msgstr ""
-#: ../Doc/c-api/call.rst:291
+#: c-api/call.rst:289
msgid "The format can be *NULL*, indicating that no arguments are provided."
msgstr ""
-#: ../Doc/c-api/call.rst:296
+#: c-api/call.rst:294
msgid ""
"This is the equivalent of the Python expression: ``obj.name(arg1, "
"arg2, ...)``."
msgstr ""
-#: ../Doc/c-api/call.rst:299
+#: c-api/call.rst:297
msgid ""
"Note that if you only pass :c:expr:`PyObject *` args, :c:func:"
"`PyObject_CallMethodObjArgs` is a faster alternative."
msgstr ""
-#: ../Doc/c-api/call.rst:302
+#: c-api/call.rst:300
msgid "The types of *name* and *format* were changed from ``char *``."
msgstr ""
-#: ../Doc/c-api/call.rst:308
+#: c-api/call.rst:306
msgid ""
"Call a callable Python object *callable*, with a variable number of :c:expr:"
"`PyObject *` arguments. The arguments are provided as a variable number of "
"parameters followed by *NULL*."
msgstr ""
-#: ../Doc/c-api/call.rst:315
+#: c-api/call.rst:313
msgid ""
"This is the equivalent of the Python expression: ``callable(arg1, "
"arg2, ...)``."
msgstr ""
-#: ../Doc/c-api/call.rst:321
+#: c-api/call.rst:319
msgid ""
"Call a method of the Python object *obj*, where the name of the method is "
"given as a Python string object in *name*. It is called with a variable "
@@ -500,34 +486,34 @@ msgid ""
"variable number of parameters followed by *NULL*."
msgstr ""
-#: ../Doc/c-api/call.rst:332
+#: c-api/call.rst:330
msgid ""
"Call a method of the Python object *obj* without arguments, where the name "
"of the method is given as a Python string object in *name*."
msgstr ""
-#: ../Doc/c-api/call.rst:343
+#: c-api/call.rst:341
msgid ""
"Call a method of the Python object *obj* with a single positional argument "
"*arg*, where the name of the method is given as a Python string object in "
"*name*."
msgstr ""
-#: ../Doc/c-api/call.rst:355
+#: c-api/call.rst:353
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 ""
-#: ../Doc/c-api/call.rst:367
+#: c-api/call.rst:365
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 ""
-#: ../Doc/c-api/call.rst:371
+#: c-api/call.rst:369
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 "
@@ -535,29 +521,29 @@ msgid ""
"tuple for the positional arguments."
msgstr ""
-#: ../Doc/c-api/call.rst:381
+#: c-api/call.rst:379
msgid ""
"Call a method using the vectorcall calling convention. The name of the "
"method is given as a Python string *name*. The object whose method is called "
"is *args[0]*, and the *args* array starting at *args[1]* represents the "
"arguments of the call. There must be at least one positional argument. "
-"*nargsf* is the number of positional arguments including *args[0]*, plus :"
-"const:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may "
+"*nargsf* is the number of positional arguments including *args[0]*, plus :c:"
+"macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may "
"temporarily be changed. Keyword arguments can be passed just like in :c:func:"
"`PyObject_Vectorcall`."
msgstr ""
-#: ../Doc/c-api/call.rst:390
+#: c-api/call.rst:388
msgid ""
-"If the object has the :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this "
+"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 ""
-#: ../Doc/c-api/call.rst:401
+#: c-api/call.rst:399
msgid "Call Support API"
msgstr ""
-#: ../Doc/c-api/call.rst:405
+#: c-api/call.rst:403
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 13eba78..babf9d3 100644
--- a/c-api/capsule.po
+++ b/c-api/capsule.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,16 +17,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/capsule.rst:6
+#: c-api/capsule.rst:6
msgid "Capsules"
msgstr ""
-#: ../Doc/c-api/capsule.rst:10
+#: c-api/capsule.rst:10
msgid ""
"Refer to :ref:`using-capsules` for more information on using these objects."
msgstr ""
-#: ../Doc/c-api/capsule.rst:17
+#: 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*` "
@@ -36,106 +36,106 @@ msgid ""
"loaded modules."
msgstr ""
-#: ../Doc/c-api/capsule.rst:27
+#: c-api/capsule.rst:27
msgid "The type of a destructor callback for a capsule. Defined as::"
msgstr ""
-#: ../Doc/c-api/capsule.rst:31
+#: c-api/capsule.rst:31
msgid ""
"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor "
"callbacks."
msgstr ""
-#: ../Doc/c-api/capsule.rst:37
+#: c-api/capsule.rst:37
msgid ""
"Return true if its argument is a :c:type:`PyCapsule`. This function always "
"succeeds."
msgstr ""
-#: ../Doc/c-api/capsule.rst:43
+#: c-api/capsule.rst:43
msgid ""
"Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* "
"argument may not be ``NULL``."
msgstr ""
-#: ../Doc/c-api/capsule.rst:46
+#: c-api/capsule.rst:46
msgid "On failure, set an exception and return ``NULL``."
msgstr ""
-#: ../Doc/c-api/capsule.rst:48
+#: c-api/capsule.rst:48
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 ""
-#: ../Doc/c-api/capsule.rst:52
+#: c-api/capsule.rst:52
msgid ""
"If the *destructor* argument is not ``NULL``, it will be called with the "
"capsule as its argument when it is destroyed."
msgstr ""
-#: ../Doc/c-api/capsule.rst:55
+#: c-api/capsule.rst:55
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 ""
-#: ../Doc/c-api/capsule.rst:62
+#: c-api/capsule.rst:62
msgid ""
"Retrieve the *pointer* stored in the capsule. On failure, set an exception "
"and return ``NULL``."
msgstr ""
-#: ../Doc/c-api/capsule.rst:65
+#: c-api/capsule.rst:65
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 "
-"also be ``NULL``. Python uses the C function :c:func:`strcmp` to compare "
+"also be ``NULL``. Python uses the C function :c:func:`!strcmp` to compare "
"capsule names."
msgstr ""
-#: ../Doc/c-api/capsule.rst:73
+#: c-api/capsule.rst:73
msgid ""
"Return the current destructor stored in the capsule. On failure, set an "
"exception and return ``NULL``."
msgstr ""
-#: ../Doc/c-api/capsule.rst:76
+#: c-api/capsule.rst:76
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 ""
-#: ../Doc/c-api/capsule.rst:83
+#: c-api/capsule.rst:83
msgid ""
"Return the current context stored in the capsule. On failure, set an "
"exception and return ``NULL``."
msgstr ""
-#: ../Doc/c-api/capsule.rst:86
+#: c-api/capsule.rst:86
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 ""
-#: ../Doc/c-api/capsule.rst:93
+#: c-api/capsule.rst:93
msgid ""
"Return the current name stored in the capsule. On failure, set an exception "
"and return ``NULL``."
msgstr ""
-#: ../Doc/c-api/capsule.rst:96
+#: c-api/capsule.rst:96
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 ""
-#: ../Doc/c-api/capsule.rst:103
+#: c-api/capsule.rst:103
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 "
@@ -143,17 +143,17 @@ msgid ""
"string exactly."
msgstr ""
-#: ../Doc/c-api/capsule.rst:108
+#: c-api/capsule.rst:108
msgid ""
"Return the capsule's internal *pointer* on success. On failure, set an "
"exception and return ``NULL``."
msgstr ""
-#: ../Doc/c-api/capsule.rst:111
+#: c-api/capsule.rst:111
msgid "*no_block* has no effect anymore."
msgstr ""
-#: ../Doc/c-api/capsule.rst:117
+#: c-api/capsule.rst:117
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`` "
@@ -162,42 +162,49 @@ msgid ""
"compared.)"
msgstr ""
-#: ../Doc/c-api/capsule.rst:123
+#: c-api/capsule.rst:123
msgid ""
"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls "
-"to any of the accessors (any function starting with :c:func:`PyCapsule_Get`) "
-"are guaranteed to succeed."
+"to any of the accessors (any function starting with ``PyCapsule_Get``) are "
+"guaranteed to succeed."
msgstr ""
-#: ../Doc/c-api/capsule.rst:127
+#: c-api/capsule.rst:127
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 ""
-#: ../Doc/c-api/capsule.rst:133
+#: c-api/capsule.rst:133
msgid "Set the context pointer inside *capsule* to *context*."
msgstr ""
-#: ../Doc/c-api/capsule.rst:135 ../Doc/c-api/capsule.rst:142
-#: ../Doc/c-api/capsule.rst:151 ../Doc/c-api/capsule.rst:159
+#: c-api/capsule.rst:142 c-api/capsule.rst:159
msgid ""
"Return ``0`` on success. Return nonzero and set an exception on failure."
msgstr ""
-#: ../Doc/c-api/capsule.rst:140
+#: c-api/capsule.rst:140
msgid "Set the destructor inside *capsule* to *destructor*."
msgstr ""
-#: ../Doc/c-api/capsule.rst:147
+#: c-api/capsule.rst:147
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 ""
-#: ../Doc/c-api/capsule.rst:156
+#: c-api/capsule.rst:156
msgid ""
"Set the void pointer inside *capsule* to *pointer*. The pointer may not be "
"``NULL``."
msgstr ""
+
+#: c-api/capsule.rst:8
+msgid "object"
+msgstr ""
+
+#: c-api/capsule.rst:8
+msgid "Capsule"
+msgstr ""
diff --git a/c-api/cell.po b/c-api/cell.po
index 5c4314e..b0bd38d 100644
--- a/c-api/cell.po
+++ b/c-api/cell.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/cell.rst:6
+#: c-api/cell.rst:6
msgid "Cell Objects"
msgstr ""
-#: ../Doc/c-api/cell.rst:8
+#: c-api/cell.rst:8
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; "
@@ -33,37 +33,37 @@ msgid ""
"referenced when accessed. Cell objects are not likely to be useful elsewhere."
msgstr ""
-#: ../Doc/c-api/cell.rst:20
+#: c-api/cell.rst:20
msgid "The C structure used for cell objects."
msgstr ""
-#: ../Doc/c-api/cell.rst:25
+#: c-api/cell.rst:25
msgid "The type object corresponding to cell objects."
msgstr ""
-#: ../Doc/c-api/cell.rst:30
+#: c-api/cell.rst:30
msgid ""
"Return true if *ob* is a cell object; *ob* must not be ``NULL``. This "
"function always succeeds."
msgstr ""
-#: ../Doc/c-api/cell.rst:36
+#: c-api/cell.rst:36
msgid ""
"Create and return a new cell object containing the value *ob*. The parameter "
"may be ``NULL``."
msgstr ""
-#: ../Doc/c-api/cell.rst:42
+#: c-api/cell.rst:42
msgid "Return the contents of the cell *cell*."
msgstr ""
-#: ../Doc/c-api/cell.rst:47
+#: c-api/cell.rst:47
msgid ""
"Return the contents of the cell *cell*, but without checking that *cell* is "
"non-``NULL`` and a cell object."
msgstr ""
-#: ../Doc/c-api/cell.rst:53
+#: c-api/cell.rst:53
msgid ""
"Set the contents of the cell object *cell* to *value*. This releases the "
"reference to any current content of the cell. *value* may be ``NULL``. "
@@ -71,7 +71,7 @@ msgid ""
"returned. On success, ``0`` will be returned."
msgstr ""
-#: ../Doc/c-api/cell.rst:61
+#: c-api/cell.rst:61
msgid ""
"Sets the value of the cell object *cell* to *value*. No reference counts "
"are adjusted, and no checks are made for safety; *cell* must be non-``NULL`` "
diff --git a/c-api/code.po b/c-api/code.po
index e0d3853..17bacae 100644
--- a/c-api/code.po
+++ b/c-api/code.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,115 +17,154 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/code.rst:8
+#: c-api/code.rst:8
msgid "Code Objects"
msgstr ""
-#: ../Doc/c-api/code.rst:12
+#: c-api/code.rst:12
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 "
"function."
msgstr ""
-#: ../Doc/c-api/code.rst:18
+#: c-api/code.rst:18
msgid ""
"The C structure of the objects used to describe code objects. The fields of "
"this type are subject to change at any time."
msgstr ""
-#: ../Doc/c-api/code.rst:24
+#: c-api/code.rst:24
msgid ""
-"This is an instance of :c:type:`PyTypeObject` representing the Python :class:"
-"`code` type."
+"This is an instance of :c:type:`PyTypeObject` representing the Python :ref:"
+"`code object `."
msgstr ""
-#: ../Doc/c-api/code.rst:30
+#: c-api/code.rst:30
msgid ""
-"Return true if *co* is a :class:`code` object. This function always "
-"succeeds."
+"Return true if *co* is a :ref:`code object `. This function "
+"always succeeds."
msgstr ""
-#: ../Doc/c-api/code.rst:34
-msgid "Return the number of free variables in *co*."
+#: c-api/code.rst:35
+msgid "Return the number of free variables in a code object."
msgstr ""
-#: ../Doc/c-api/code.rst:38
+#: c-api/code.rst:39
+msgid "Return the position of the first free variable in a code object."
+msgstr ""
+
+#: 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:49
msgid ""
"Return a new code object. If you need a dummy code object to create a "
-"frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` "
-"directly will bind you to a precise Python version since the definition of "
-"the bytecode changes often. The many arguments of this function are inter-"
-"dependent in complex ways, meaning that subtle changes to values are likely "
-"to result in incorrect execution or VM crashes. Use this function only with "
-"extreme care."
+"frame, use :c:func:`PyCode_NewEmpty` instead."
+msgstr ""
+
+#: 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:55
+msgid ""
+"The many arguments of this function are inter-dependent in complex ways, "
+"meaning that subtle changes to values are likely to result in incorrect "
+"execution or VM crashes. Use this function only with extreme care."
+msgstr ""
+
+#: c-api/code.rst:59
+msgid "Added ``qualname`` and ``exceptiontable`` parameters."
msgstr ""
-#: ../Doc/c-api/code.rst:45 ../Doc/c-api/code.rst:55
-msgid "Added ``exceptiontable`` parameter."
+#: 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 ""
-#: ../Doc/c-api/code.rst:50
+#: c-api/code.rst:72
msgid ""
-"Similar to :c:func:`PyCode_New`, but with an extra \"posonlyargcount\" for "
-"positional-only arguments. The same caveats that apply to ``PyCode_New`` "
-"also apply to this function."
+"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:77
+msgid "as ``PyCode_NewWithPosOnlyArgs``"
msgstr ""
-#: ../Doc/c-api/code.rst:60
+#: c-api/code.rst:79
+msgid "Added ``qualname`` and ``exceptiontable`` parameters."
+msgstr ""
+
+#: c-api/code.rst:84
+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:90
msgid ""
"Return a new empty code object with the specified filename, function name, "
"and first line number. The resulting code object will raise an ``Exception`` "
"if executed."
msgstr ""
-#: ../Doc/c-api/code.rst:66
+#: c-api/code.rst:96
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 ""
-#: ../Doc/c-api/code.rst:69
+#: c-api/code.rst:99
msgid ""
"For efficiently iterating over the line numbers in a code object, use `the "
"API described in PEP 626 `_."
msgstr ""
-#: ../Doc/c-api/code.rst:74
+#: c-api/code.rst:104
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 ""
-#: ../Doc/c-api/code.rst:78
+#: c-api/code.rst:108
msgid "Returns ``1`` if the function succeeds and 0 otherwise."
msgstr ""
-#: ../Doc/c-api/code.rst:82
+#: c-api/code.rst:114
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 ""
-#: ../Doc/c-api/code.rst:87
+#: c-api/code.rst:119
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 ""
-#: ../Doc/c-api/code.rst:95
+#: c-api/code.rst:127
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 ""
-#: ../Doc/c-api/code.rst:104
+#: c-api/code.rst:136
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 "
@@ -133,9 +172,193 @@ msgid ""
"returned and an exception is raised."
msgstr ""
-#: ../Doc/c-api/code.rst:113
+#: c-api/code.rst:145
msgid ""
"Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new "
"reference to a :c:type:`PyTupleObject` containing the names of the free "
"variables. On error, ``NULL`` is returned and an exception is raised."
msgstr ""
+
+#: c-api/code.rst:153
+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 "
+"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
+"exception."
+msgstr ""
+
+#: c-api/code.rst:162
+msgid ""
+"Clear watcher identified by *watcher_id* previously returned from :c:func:"
+"`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or "
+"``-1`` and set an exception on error (e.g. if the given *watcher_id* was "
+"never registered.)"
+msgstr ""
+
+#: c-api/code.rst:171
+msgid ""
+"Enumeration of possible code object watcher events: - "
+"``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``"
+msgstr ""
+
+#: c-api/code.rst:179
+msgid "Type of a code object watcher callback function."
+msgstr ""
+
+#: c-api/code.rst:181
+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 "
+"the destruction of *co* takes place, so the prior state of *co* can be "
+"inspected."
+msgstr ""
+
+#: c-api/code.rst:186
+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 "
+"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/code.rst:191
+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 "
+"and timing of creation and destruction of code objects. While changes in "
+"these details may result in differences observable by watchers (including "
+"whether a callback is invoked or not), it does not change the semantics of "
+"the Python code being executed."
+msgstr ""
+
+#: c-api/code.rst:198
+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:202
+msgid ""
+"There may already be a pending exception set on entry to the callback. In "
+"this case, the callback should return ``0`` with the same exception still "
+"set. This means the callback may not call any other API that can set an "
+"exception unless it saves and clears the exception state first, and restores "
+"it before returning."
+msgstr ""
+
+#: c-api/code.rst:212
+msgid "Extra information"
+msgstr ""
+
+#: c-api/code.rst:214
+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:218
+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:224
+msgid "Return a new an opaque index value used to adding data to code objects."
+msgstr ""
+
+#: c-api/code.rst:226
+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:230
+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:236
+msgid "as ``_PyEval_RequestCodeExtraIndex``"
+msgstr ""
+
+#: c-api/code.rst:240
+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:246
+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:249
+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:254
+msgid "as ``_PyCode_GetExtra``"
+msgstr ""
+
+#: c-api/code.rst:258
+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:264
+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:269
+msgid "as ``_PyCode_SetExtra``"
+msgstr ""
+
+#: c-api/code.rst:273
+msgid ""
+"Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, "
+"but will be available until the API changes."
+msgstr ""
+
+#: c-api/code.rst:3
+msgid "object"
+msgstr ""
+
+#: c-api/code.rst:3
+msgid "code"
+msgstr ""
+
+#: c-api/code.rst:3
+msgid "code object"
+msgstr ""
+
+#: c-api/code.rst:62
+msgid "PyCode_New (C function)"
+msgstr ""
+
+#: c-api/code.rst:75
+msgid "PyCode_NewWithPosOnlyArgs (C function)"
+msgstr ""
+
+#: c-api/code.rst:234
+msgid "_PyEval_RequestCodeExtraIndex (C function)"
+msgstr ""
+
+#: c-api/code.rst:252
+msgid "_PyCode_GetExtra (C function)"
+msgstr ""
+
+#: c-api/code.rst:267
+msgid "_PyCode_SetExtra (C function)"
+msgstr ""
diff --git a/c-api/codec.po b/c-api/codec.po
index 178251a..26d3465 100644
--- a/c-api/codec.po
+++ b/c-api/codec.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,38 +17,38 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/codec.rst:4
+#: c-api/codec.rst:4
msgid "Codec registry and support functions"
msgstr ""
-#: ../Doc/c-api/codec.rst:8
+#: c-api/codec.rst:8
msgid "Register a new codec search function."
msgstr ""
-#: ../Doc/c-api/codec.rst:10
+#: c-api/codec.rst:10
msgid ""
-"As side effect, this tries to load the :mod:`encodings` package, if not yet "
+"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."
msgstr ""
-#: ../Doc/c-api/codec.rst:15
+#: c-api/codec.rst:15
msgid ""
"Unregister a codec search function and clear the registry's cache. If the "
"search function is not registered, do nothing. Return 0 on success. Raise an "
"exception and return -1 on error."
msgstr ""
-#: ../Doc/c-api/codec.rst:23
+#: c-api/codec.rst:23
msgid ""
"Return ``1`` or ``0`` depending on whether there is a registered codec for "
"the given *encoding*. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/codec.rst:28
+#: c-api/codec.rst:28
msgid "Generic codec based encoding API."
msgstr ""
-#: ../Doc/c-api/codec.rst:30
+#: c-api/codec.rst:30
msgid ""
"*object* is passed through the encoder function found for the given "
"*encoding* using the error handling method defined by *errors*. *errors* "
@@ -56,11 +56,11 @@ msgid ""
"exc:`LookupError` if no encoder can be found."
msgstr ""
-#: ../Doc/c-api/codec.rst:37
+#: c-api/codec.rst:37
msgid "Generic codec based decoding API."
msgstr ""
-#: ../Doc/c-api/codec.rst:39
+#: c-api/codec.rst:39
msgid ""
"*object* is passed through the decoder function found for the given "
"*encoding* using the error handling method defined by *errors*. *errors* "
@@ -68,11 +68,11 @@ msgid ""
"exc:`LookupError` if no encoder can be found."
msgstr ""
-#: ../Doc/c-api/codec.rst:46
+#: c-api/codec.rst:46
msgid "Codec lookup API"
msgstr ""
-#: ../Doc/c-api/codec.rst:48
+#: c-api/codec.rst:48
msgid ""
"In the following functions, the *encoding* string is looked up converted to "
"all lower-case characters, which makes encodings looked up through this "
@@ -80,41 +80,41 @@ msgid ""
"`KeyError` is set and ``NULL`` returned."
msgstr ""
-#: ../Doc/c-api/codec.rst:55
+#: c-api/codec.rst:55
msgid "Get an encoder function for the given *encoding*."
msgstr ""
-#: ../Doc/c-api/codec.rst:59
+#: c-api/codec.rst:59
msgid "Get a decoder function for the given *encoding*."
msgstr ""
-#: ../Doc/c-api/codec.rst:63
+#: c-api/codec.rst:63
msgid ""
"Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*."
msgstr ""
-#: ../Doc/c-api/codec.rst:67
+#: c-api/codec.rst:67
msgid ""
"Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*."
msgstr ""
-#: ../Doc/c-api/codec.rst:71
+#: c-api/codec.rst:71
msgid ""
"Get a :class:`~codecs.StreamReader` factory function for the given "
"*encoding*."
msgstr ""
-#: ../Doc/c-api/codec.rst:75
+#: c-api/codec.rst:75
msgid ""
"Get a :class:`~codecs.StreamWriter` factory function for the given "
"*encoding*."
msgstr ""
-#: ../Doc/c-api/codec.rst:79
+#: c-api/codec.rst:79
msgid "Registry API for Unicode encoding error handlers"
msgstr ""
-#: ../Doc/c-api/codec.rst:83
+#: c-api/codec.rst:83
msgid ""
"Register the error handling callback function *error* under the given "
"*name*. This callback function will be called by a codec when it encounters "
@@ -122,7 +122,7 @@ msgid ""
"error parameter in the call to the encode/decode function."
msgstr ""
-#: ../Doc/c-api/codec.rst:88
+#: c-api/codec.rst:88
msgid ""
"The callback gets a single argument, an instance of :exc:"
"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:"
@@ -135,39 +135,39 @@ msgid ""
"should be resumed."
msgstr ""
-#: ../Doc/c-api/codec.rst:98
+#: c-api/codec.rst:98
msgid "Return ``0`` on success, ``-1`` on error."
msgstr ""
-#: ../Doc/c-api/codec.rst:102
+#: c-api/codec.rst:102
msgid ""
"Lookup the error handling callback function registered under *name*. As a "
"special case ``NULL`` can be passed, in which case the error handling "
"callback for \"strict\" will be returned."
msgstr ""
-#: ../Doc/c-api/codec.rst:108
+#: c-api/codec.rst:108
msgid "Raise *exc* as an exception."
msgstr ""
-#: ../Doc/c-api/codec.rst:112
+#: c-api/codec.rst:112
msgid "Ignore the unicode error, skipping the faulty input."
msgstr ""
-#: ../Doc/c-api/codec.rst:116
+#: c-api/codec.rst:116
msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``."
msgstr ""
-#: ../Doc/c-api/codec.rst:120
+#: c-api/codec.rst:120
msgid "Replace the unicode encode error with XML character references."
msgstr ""
-#: ../Doc/c-api/codec.rst:124
+#: c-api/codec.rst:124
msgid ""
"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` "
"and ``\\U``)."
msgstr ""
-#: ../Doc/c-api/codec.rst:129
+#: c-api/codec.rst:129
msgid "Replace the unicode encode error with ``\\N{...}`` escapes."
msgstr ""
diff --git a/c-api/complex.po b/c-api/complex.po
index 13de198..cc1a216 100644
--- a/c-api/complex.po
+++ b/c-api/complex.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/complex.rst:6
+#: c-api/complex.rst:6
msgid "Complex Number Objects"
msgstr ""
-#: ../Doc/c-api/complex.rst:10
+#: c-api/complex.rst:10
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, "
@@ -29,18 +29,18 @@ msgid ""
"value. The API provides functions for working with both."
msgstr ""
-#: ../Doc/c-api/complex.rst:17
+#: c-api/complex.rst:17
msgid "Complex Numbers as C Structures"
msgstr ""
-#: ../Doc/c-api/complex.rst:19
+#: 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 ""
-#: ../Doc/c-api/complex.rst:26
+#: c-api/complex.rst:26
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 "
@@ -48,113 +48,145 @@ msgid ""
"appropriate. It is defined as::"
msgstr ""
-#: ../Doc/c-api/complex.rst:39
+#: c-api/complex.rst:39
msgid ""
"Return the sum of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
-#: ../Doc/c-api/complex.rst:45
+#: c-api/complex.rst:45
msgid ""
"Return the difference between two complex numbers, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
-#: ../Doc/c-api/complex.rst:51
+#: c-api/complex.rst:51
msgid ""
"Return the negation of the complex number *num*, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
-#: ../Doc/c-api/complex.rst:57
+#: c-api/complex.rst:57
msgid ""
"Return the product of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
-#: ../Doc/c-api/complex.rst:63
+#: c-api/complex.rst:63
msgid ""
"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
-#: ../Doc/c-api/complex.rst:66
+#: c-api/complex.rst:66
msgid ""
"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :"
-"c:data:`EDOM`."
+"c:macro:`!EDOM`."
msgstr ""
-#: ../Doc/c-api/complex.rst:72
+#: c-api/complex.rst:72
msgid ""
"Return the exponentiation of *num* by *exp*, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
-#: ../Doc/c-api/complex.rst:75
+#: c-api/complex.rst:75
msgid ""
"If *num* is null and *exp* is not a positive real number, this method "
-"returns zero and sets :c:data:`errno` to :c:data:`EDOM`."
+"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`."
msgstr ""
-#: ../Doc/c-api/complex.rst:80
+#: c-api/complex.rst:80
msgid "Complex Numbers as Python Objects"
msgstr ""
-#: ../Doc/c-api/complex.rst:85
+#: c-api/complex.rst:85
msgid ""
"This subtype of :c:type:`PyObject` represents a Python complex number object."
msgstr ""
-#: ../Doc/c-api/complex.rst:90
+#: c-api/complex.rst:90
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."
msgstr ""
-#: ../Doc/c-api/complex.rst:96
+#: c-api/complex.rst:96
msgid ""
"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :"
"c:type:`PyComplexObject`. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/complex.rst:102
+#: c-api/complex.rst:102
msgid ""
"Return true if its argument is a :c:type:`PyComplexObject`, but not a "
"subtype of :c:type:`PyComplexObject`. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/complex.rst:108
+#: c-api/complex.rst:108
msgid ""
"Create a new Python complex number object from a C :c:type:`Py_complex` "
"value."
msgstr ""
-#: ../Doc/c-api/complex.rst:113
+#: c-api/complex.rst:113
msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*."
msgstr ""
-#: ../Doc/c-api/complex.rst:118
+#: c-api/complex.rst:118
msgid "Return the real part of *op* as a C :c:expr:`double`."
msgstr ""
-#: ../Doc/c-api/complex.rst:123
+#: c-api/complex.rst:120
+msgid ""
+"If *op* is not a Python complex number object but has a :meth:`~object."
+"__complex__` method, this method will first be called to convert *op* to a "
+"Python complex number object. If :meth:`!__complex__` is not defined then "
+"it falls back to call :c:func:`PyFloat_AsDouble` and returns its result. "
+"Upon failure, this method returns ``-1.0``, so one should call :c:func:"
+"`PyErr_Occurred` to check for errors."
+msgstr ""
+
+#: c-api/complex.rst:141
+msgid "Use :meth:`~object.__complex__` if available."
+msgstr ""
+
+#: c-api/complex.rst:132
msgid "Return the imaginary part of *op* as a C :c:expr:`double`."
msgstr ""
-#: ../Doc/c-api/complex.rst:128
+#: c-api/complex.rst:134
+msgid ""
+"If *op* is not a Python complex number object but has a :meth:`~object."
+"__complex__` method, this method will first be called to convert *op* to a "
+"Python complex number object. If :meth:`!__complex__` is not defined then "
+"it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on "
+"success. Upon failure, this method returns ``-1.0``, so one should call :c:"
+"func:`PyErr_Occurred` to check for errors."
+msgstr ""
+
+#: c-api/complex.rst:146
msgid "Return the :c:type:`Py_complex` value of the complex number *op*."
msgstr ""
-#: ../Doc/c-api/complex.rst:130
+#: c-api/complex.rst:148
msgid ""
-"If *op* is not a Python complex number object but has a :meth:`__complex__` "
-"method, this method will first be called to convert *op* to a Python complex "
-"number object. If ``__complex__()`` is not defined then it falls back to :"
-"meth:`__float__`. If ``__float__()`` is not defined then it falls back to :"
-"meth:`__index__`. Upon failure, this method returns ``-1.0`` as a real "
-"value."
+"If *op* is not a Python complex number object but has a :meth:`~object."
+"__complex__` method, this method will first be called to convert *op* to a "
+"Python complex number object. If :meth:`!__complex__` is not defined then "
+"it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not "
+"defined then it falls back to :meth:`~object.__index__`. Upon failure, this "
+"method returns ``-1.0`` as a real value."
+msgstr ""
+
+#: c-api/complex.rst:155
+msgid "Use :meth:`~object.__index__` if available."
+msgstr ""
+
+#: c-api/complex.rst:8
+msgid "object"
msgstr ""
-#: ../Doc/c-api/complex.rst:137
-msgid "Use :meth:`__index__` if available."
+#: c-api/complex.rst:8
+msgid "complex number"
msgstr ""
diff --git a/c-api/concrete.po b/c-api/concrete.po
index 136ceab..b49decb 100644
--- a/c-api/concrete.po
+++ b/c-api/concrete.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/concrete.rst:8
+#: c-api/concrete.rst:8
msgid "Concrete Objects Layer"
msgstr ""
-#: ../Doc/c-api/concrete.rst:10
+#: c-api/concrete.rst:10
msgid ""
"The functions in this chapter are specific to certain Python object types. "
"Passing them an object of the wrong type is not a good idea; if you receive "
@@ -31,7 +31,7 @@ msgid ""
"structured like the \"family tree\" of Python object types."
msgstr ""
-#: ../Doc/c-api/concrete.rst:19
+#: c-api/concrete.rst:19
msgid ""
"While the functions described in this chapter carefully check the type of "
"the objects which are passed in, many of them do not check for ``NULL`` "
@@ -40,38 +40,54 @@ msgid ""
"interpreter."
msgstr ""
-#: ../Doc/c-api/concrete.rst:28
+#: c-api/concrete.rst:28
msgid "Fundamental Objects"
msgstr ""
-#: ../Doc/c-api/concrete.rst:30
+#: c-api/concrete.rst:30
msgid ""
"This section describes Python type objects and the singleton object ``None``."
msgstr ""
-#: ../Doc/c-api/concrete.rst:41
+#: c-api/concrete.rst:41
msgid "Numeric Objects"
msgstr ""
-#: ../Doc/c-api/concrete.rst:56
+#: c-api/concrete.rst:56
msgid "Sequence Objects"
msgstr ""
-#: ../Doc/c-api/concrete.rst:60
+#: c-api/concrete.rst:60
msgid ""
"Generic operations on sequence objects were discussed in the previous "
"chapter; this section deals with the specific kinds of sequence objects that "
"are intrinsic to the Python language."
msgstr ""
-#: ../Doc/c-api/concrete.rst:78
+#: c-api/concrete.rst:78
msgid "Container Objects"
msgstr ""
-#: ../Doc/c-api/concrete.rst:91
+#: c-api/concrete.rst:91
msgid "Function Objects"
msgstr ""
-#: ../Doc/c-api/concrete.rst:102
+#: c-api/concrete.rst:102
msgid "Other Objects"
msgstr ""
+
+#: c-api/concrete.rst:58 c-api/concrete.rst:80
+msgid "object"
+msgstr ""
+
+#: c-api/concrete.rst:43
+msgid "numeric"
+msgstr ""
+
+#: c-api/concrete.rst:58
+msgid "sequence"
+msgstr ""
+
+#: c-api/concrete.rst:80
+msgid "mapping"
+msgstr ""
diff --git a/c-api/contextvars.po b/c-api/contextvars.po
index 39aebee..02e5376 100644
--- a/c-api/contextvars.po
+++ b/c-api/contextvars.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,114 +17,114 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/contextvars.rst:6
+#: c-api/contextvars.rst:6
msgid "Context Variables Objects"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:13
+#: c-api/contextvars.rst:15
msgid ""
"In Python 3.7.1 the signatures of all context variables C APIs were "
"**changed** to use :c:type:`PyObject` pointers instead of :c:type:"
"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:24
+#: c-api/contextvars.rst:26
msgid "See :issue:`34762` for more details."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:29
+#: c-api/contextvars.rst:29
msgid ""
"This section details the public C API for the :mod:`contextvars` module."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:33
+#: c-api/contextvars.rst:33
msgid ""
"The C structure used to represent a :class:`contextvars.Context` object."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:38
+#: c-api/contextvars.rst:38
msgid ""
"The C structure used to represent a :class:`contextvars.ContextVar` object."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:43
+#: c-api/contextvars.rst:43
msgid "The C structure used to represent a :class:`contextvars.Token` object."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:47
+#: c-api/contextvars.rst:47
msgid "The type object representing the *context* type."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:51
+#: c-api/contextvars.rst:51
msgid "The type object representing the *context variable* type."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:55
+#: c-api/contextvars.rst:55
msgid "The type object representing the *context variable token* type."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:58
+#: c-api/contextvars.rst:58
msgid "Type-check macros:"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:62
+#: c-api/contextvars.rst:62
msgid ""
"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be "
"``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:67
+#: c-api/contextvars.rst:67
msgid ""
"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be "
"``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:72
+#: c-api/contextvars.rst:72
msgid ""
"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be "
"``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:76
+#: c-api/contextvars.rst:76
msgid "Context object management functions:"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:80
+#: c-api/contextvars.rst:80
msgid ""
"Create a new empty context object. Returns ``NULL`` if an error has "
"occurred."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:85
+#: c-api/contextvars.rst:85
msgid ""
"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` "
"if an error has occurred."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:90
+#: c-api/contextvars.rst:90
msgid ""
"Create a shallow copy of the current thread context. Returns ``NULL`` if an "
"error has occurred."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:95
+#: c-api/contextvars.rst:95
msgid ""
"Set *ctx* as the current context for the current thread. Returns ``0`` on "
"success, and ``-1`` on error."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:100
+#: c-api/contextvars.rst:100
msgid ""
"Deactivate the *ctx* context and restore the previous context as the current "
"context for the current thread. Returns ``0`` on success, and ``-1`` on "
"error."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:105
+#: c-api/contextvars.rst:105
msgid "Context variable functions:"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:109
+#: c-api/contextvars.rst:109
msgid ""
"Create a new ``ContextVar`` object. The *name* parameter is used for "
"introspection and debug purposes. The *def* parameter specifies a default "
@@ -132,42 +132,42 @@ msgid ""
"occurred, this function returns ``NULL``."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:116
+#: c-api/contextvars.rst:116
msgid ""
"Get the value of a context variable. Returns ``-1`` if an error has "
"occurred during lookup, and ``0`` if no error occurred, whether or not a "
"value was found."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:120
+#: c-api/contextvars.rst:120
msgid ""
"If the context variable was found, *value* will be a pointer to it. If the "
"context variable was *not* found, *value* will point to:"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:123
+#: c-api/contextvars.rst:123
msgid "*default_value*, if not ``NULL``;"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:124
+#: c-api/contextvars.rst:124
msgid "the default value of *var*, if not ``NULL``;"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:125
+#: c-api/contextvars.rst:125
msgid "``NULL``"
msgstr ""
-#: ../Doc/c-api/contextvars.rst:127
+#: c-api/contextvars.rst:127
msgid "Except for ``NULL``, the function returns a new reference."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:131
+#: c-api/contextvars.rst:131
msgid ""
"Set the value of *var* to *value* in the current context. Returns a new "
"token object for this change, or ``NULL`` if an error has occurred."
msgstr ""
-#: ../Doc/c-api/contextvars.rst:136
+#: c-api/contextvars.rst:136
msgid ""
"Reset the state of the *var* context variable to that it was in before :c:"
"func:`PyContextVar_Set` that returned the *token* was called. This function "
diff --git a/c-api/conversion.po b/c-api/conversion.po
index 6d8e47b..615491d 100644
--- a/c-api/conversion.po
+++ b/c-api/conversion.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,29 +17,29 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/conversion.rst:6
+#: c-api/conversion.rst:6
msgid "String conversion and formatting"
msgstr ""
-#: ../Doc/c-api/conversion.rst:8
+#: c-api/conversion.rst:8
msgid "Functions for number conversion and formatted string output."
msgstr ""
-#: ../Doc/c-api/conversion.rst:13
+#: c-api/conversion.rst:13
msgid ""
"Output not more than *size* bytes to *str* according to the format string "
"*format* and the extra arguments. See the Unix man page :manpage:"
"`snprintf(3)`."
msgstr ""
-#: ../Doc/c-api/conversion.rst:19
+#: c-api/conversion.rst:19
msgid ""
"Output not more than *size* bytes to *str* according to the format string "
"*format* and the variable argument list *va*. Unix man page :manpage:"
"`vsnprintf(3)`."
msgstr ""
-#: ../Doc/c-api/conversion.rst:23
+#: c-api/conversion.rst:23
msgid ""
":c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C "
"library functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose "
@@ -47,7 +47,7 @@ msgid ""
"functions do not."
msgstr ""
-#: ../Doc/c-api/conversion.rst:28
+#: c-api/conversion.rst:28
msgid ""
"The wrappers ensure that ``str[size-1]`` is always ``'\\0'`` upon return. "
"They never write more than *size* bytes (including the trailing ``'\\0'``) "
@@ -57,39 +57,84 @@ msgid ""
"the necessary buffer size."
msgstr ""
-#: ../Doc/c-api/conversion.rst:34
+#: c-api/conversion.rst:34
msgid ""
"The return value (*rv*) for these functions should be interpreted as follows:"
msgstr ""
-#: ../Doc/c-api/conversion.rst:36
+#: c-api/conversion.rst:36
msgid ""
"When ``0 <= rv < size``, the output conversion was successful and *rv* "
"characters were written to *str* (excluding the trailing ``'\\0'`` byte at "
"``str[rv]``)."
msgstr ""
-#: ../Doc/c-api/conversion.rst:40
+#: c-api/conversion.rst:40
msgid ""
"When ``rv >= size``, the output conversion was truncated and a buffer with "
"``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is "
"``'\\0'`` in this case."
msgstr ""
-#: ../Doc/c-api/conversion.rst:44
+#: 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."
msgstr ""
-#: ../Doc/c-api/conversion.rst:49
+#: c-api/conversion.rst:49
msgid ""
"The following functions provide locale-independent string to number "
"conversions."
msgstr ""
-#: ../Doc/c-api/conversion.rst:53
+#: c-api/conversion.rst:53
+msgid ""
+"Convert the initial part of the string in ``str`` to an :c:expr:`unsigned "
+"long` value according to the given ``base``, which must be between ``2`` and "
+"``36`` inclusive, or be the special value ``0``."
+msgstr ""
+
+#: c-api/conversion.rst:57
+msgid ""
+"Leading white space and case of characters are ignored. If ``base`` is zero "
+"it looks for a leading ``0b``, ``0o`` or ``0x`` to tell which base. If "
+"these are absent it defaults to ``10``. Base must be 0 or between 2 and 36 "
+"(inclusive). If ``ptr`` is non-``NULL`` it will contain a pointer to the "
+"end of the scan."
+msgstr ""
+
+#: c-api/conversion.rst:63
+msgid ""
+"If the converted value falls out of range of corresponding return type, "
+"range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and :c:"
+"macro:`!ULONG_MAX` is returned. If no conversion can be performed, ``0`` is "
+"returned."
+msgstr ""
+
+#: c-api/conversion.rst:68
+msgid "See also the Unix man page :manpage:`strtoul(3)`."
+msgstr ""
+
+#: c-api/conversion.rst:75
+msgid ""
+"Convert the initial part of the string in ``str`` to an :c:expr:`long` value "
+"according to the given ``base``, which must be between ``2`` and ``36`` "
+"inclusive, or be the special value ``0``."
+msgstr ""
+
+#: c-api/conversion.rst:79
+msgid ""
+"Same as :c:func:`PyOS_strtoul`, but return a :c:expr:`long` value instead "
+"and :c:macro:`LONG_MAX` on overflows."
+msgstr ""
+
+#: c-api/conversion.rst:82
+msgid "See also the Unix man page :manpage:`strtol(3)`."
+msgstr ""
+
+#: c-api/conversion.rst:89
msgid ""
"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on "
"failure. The set of accepted strings corresponds to the set of strings "
@@ -98,14 +143,14 @@ msgid ""
"current locale."
msgstr ""
-#: ../Doc/c-api/conversion.rst:59
+#: c-api/conversion.rst:95
msgid ""
"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:"
"`ValueError` and return ``-1.0`` if the string is not a valid representation "
"of a floating-point number."
msgstr ""
-#: ../Doc/c-api/conversion.rst:63
+#: c-api/conversion.rst:99
msgid ""
"If endptr is not ``NULL``, convert as much of the string as possible and set "
"``*endptr`` to point to the first unconverted character. If no initial "
@@ -114,7 +159,7 @@ msgid ""
"ValueError, and return ``-1.0``."
msgstr ""
-#: ../Doc/c-api/conversion.rst:70
+#: c-api/conversion.rst:106
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 "
@@ -125,50 +170,50 @@ msgid ""
"the first character after the converted value."
msgstr ""
-#: ../Doc/c-api/conversion.rst:78
+#: c-api/conversion.rst:114
msgid ""
"If any other error occurs during the conversion (for example an out-of-"
"memory error), set the appropriate Python exception and return ``-1.0``."
msgstr ""
-#: ../Doc/c-api/conversion.rst:87
+#: c-api/conversion.rst:123
msgid ""
"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, "
"*precision*, and *flags*."
msgstr ""
-#: ../Doc/c-api/conversion.rst:90
+#: c-api/conversion.rst:126
msgid ""
"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
"ignored. The ``'r'`` format code specifies the standard :func:`repr` format."
msgstr ""
-#: ../Doc/c-api/conversion.rst:95
+#: 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:"
msgstr ""
-#: ../Doc/c-api/conversion.rst:98
+#: c-api/conversion.rst:134
msgid ""
"``Py_DTSF_SIGN`` means to always precede the returned string with a sign "
"character, even if *val* is non-negative."
msgstr ""
-#: ../Doc/c-api/conversion.rst:101
+#: c-api/conversion.rst:137
msgid ""
"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look "
"like an integer."
msgstr ""
-#: ../Doc/c-api/conversion.rst:104
+#: c-api/conversion.rst:140
msgid ""
"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the "
"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
msgstr ""
-#: ../Doc/c-api/conversion.rst:108
+#: c-api/conversion.rst:144
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 "
@@ -176,21 +221,21 @@ msgid ""
"respectively."
msgstr ""
-#: ../Doc/c-api/conversion.rst:112
+#: c-api/conversion.rst:148
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 ""
-#: ../Doc/c-api/conversion.rst:121
+#: c-api/conversion.rst:157
msgid ""
"Case insensitive comparison of strings. The function works almost "
-"identically to :c:func:`strcmp` except that it ignores the case."
+"identically to :c:func:`!strcmp` except that it ignores the case."
msgstr ""
-#: ../Doc/c-api/conversion.rst:127
+#: c-api/conversion.rst:163
msgid ""
"Case insensitive comparison of strings. The function works almost "
-"identically to :c:func:`strncmp` except that it ignores the case."
+"identically to :c:func:`!strncmp` except that it ignores the case."
msgstr ""
diff --git a/c-api/coro.po b/c-api/coro.po
index 9b5fa0e..39e0cfb 100644
--- a/c-api/coro.po
+++ b/c-api/coro.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,31 +17,31 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/coro.rst:6
+#: c-api/coro.rst:6
msgid "Coroutine Objects"
msgstr ""
-#: ../Doc/c-api/coro.rst:10
+#: c-api/coro.rst:10
msgid ""
"Coroutine objects are what functions declared with an ``async`` keyword "
"return."
msgstr ""
-#: ../Doc/c-api/coro.rst:16
+#: c-api/coro.rst:16
msgid "The C structure used for coroutine objects."
msgstr ""
-#: ../Doc/c-api/coro.rst:21
+#: c-api/coro.rst:21
msgid "The type object corresponding to coroutine objects."
msgstr ""
-#: ../Doc/c-api/coro.rst:26
+#: c-api/coro.rst:26
msgid ""
"Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be "
"``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/coro.rst:32
+#: c-api/coro.rst:32
msgid ""
"Create and return a new coroutine object based on the *frame* object, with "
"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference "
diff --git a/c-api/datetime.po b/c-api/datetime.po
index e28af26..baa399f 100644
--- a/c-api/datetime.po
+++ b/c-api/datetime.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,135 +17,184 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/datetime.rst:6
+#: c-api/datetime.rst:6
msgid "DateTime Objects"
msgstr ""
-#: ../Doc/c-api/datetime.rst:8
+#: c-api/datetime.rst:8
msgid ""
"Various date and time objects are supplied by the :mod:`datetime` module. "
"Before using any of these functions, the header file :file:`datetime.h` must "
"be included in your source (note that this is not included by :file:`Python."
-"h`), and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, usually as "
+"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 "
+"structure into a static variable, :c:data:`!PyDateTimeAPI`, that is used by "
"the following macros."
msgstr ""
-#: ../Doc/c-api/datetime.rst:16
+#: c-api/datetime.rst:18
+msgid "This subtype of :c:type:`PyObject` represents a Python date object."
+msgstr ""
+
+#: c-api/datetime.rst:22
+msgid "This subtype of :c:type:`PyObject` represents a Python datetime object."
+msgstr ""
+
+#: c-api/datetime.rst:26
+msgid "This subtype of :c:type:`PyObject` represents a Python time object."
+msgstr ""
+
+#: c-api/datetime.rst:30
+msgid ""
+"This subtype of :c:type:`PyObject` represents the difference between two "
+"datetime values."
+msgstr ""
+
+#: c-api/datetime.rst:34
+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
+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
+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
+msgid ""
+"This instance of :c:type:`PyTypeObject` represents Python type for the "
+"difference between two datetime values; it is the same object as :class:"
+"`datetime.timedelta` in the Python layer."
+msgstr ""
+
+#: c-api/datetime.rst:55
+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
msgid "Macro for access to the UTC singleton:"
msgstr ""
-#: ../Doc/c-api/datetime.rst:20
+#: c-api/datetime.rst:63
msgid ""
"Returns the time zone singleton representing UTC, the same object as :attr:"
"`datetime.timezone.utc`."
msgstr ""
-#: ../Doc/c-api/datetime.rst:26
+#: c-api/datetime.rst:69
msgid "Type-check macros:"
msgstr ""
-#: ../Doc/c-api/datetime.rst:30
+#: c-api/datetime.rst:73
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype "
-"of :c:data:`PyDateTime_DateType`. *ob* must not be ``NULL``. This function "
-"always succeeds."
+"of :c:data:`!PyDateTime_DateType`. *ob* must not be ``NULL``. This "
+"function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:37
+#: c-api/datetime.rst:80
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not "
"be ``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:43
+#: c-api/datetime.rst:86
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a "
-"subtype of :c:data:`PyDateTime_DateTimeType`. *ob* must not be ``NULL``. "
+"subtype of :c:data:`!PyDateTime_DateTimeType`. *ob* must not be ``NULL``. "
"This function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:50
+#: c-api/datetime.rst:93
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must "
"not be ``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:56
+#: c-api/datetime.rst:99
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype "
-"of :c:data:`PyDateTime_TimeType`. *ob* must not be ``NULL``. This function "
-"always succeeds."
+"of :c:data:`!PyDateTime_TimeType`. *ob* must not be ``NULL``. This "
+"function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:63
+#: c-api/datetime.rst:106
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not "
"be ``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:69
+#: c-api/datetime.rst:112
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype "
-"of :c:data:`PyDateTime_DeltaType`. *ob* must not be ``NULL``. This "
+"of :c:data:`!PyDateTime_DeltaType`. *ob* must not be ``NULL``. This "
"function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:76
+#: c-api/datetime.rst:119
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not "
"be ``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:82
+#: c-api/datetime.rst:125
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype "
-"of :c:data:`PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This "
+"of :c:data:`!PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This "
"function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:89
+#: c-api/datetime.rst:132
msgid ""
"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must "
"not be ``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/datetime.rst:93
+#: c-api/datetime.rst:136
msgid "Macros to create objects:"
msgstr ""
-#: ../Doc/c-api/datetime.rst:97
+#: c-api/datetime.rst:140
msgid ""
"Return a :class:`datetime.date` object with the specified year, month and "
"day."
msgstr ""
-#: ../Doc/c-api/datetime.rst:102
+#: c-api/datetime.rst:145
msgid ""
"Return a :class:`datetime.datetime` object with the specified year, month, "
"day, hour, minute, second and microsecond."
msgstr ""
-#: ../Doc/c-api/datetime.rst:108
+#: c-api/datetime.rst:151
msgid ""
"Return a :class:`datetime.datetime` object with the specified year, month, "
"day, hour, minute, second, microsecond and fold."
msgstr ""
-#: ../Doc/c-api/datetime.rst:116
+#: c-api/datetime.rst:159
msgid ""
"Return a :class:`datetime.time` object with the specified hour, minute, "
"second and microsecond."
msgstr ""
-#: ../Doc/c-api/datetime.rst:122
+#: c-api/datetime.rst:165
msgid ""
"Return a :class:`datetime.time` object with the specified hour, minute, "
"second, microsecond and fold."
msgstr ""
-#: ../Doc/c-api/datetime.rst:130
+#: c-api/datetime.rst:173
msgid ""
"Return a :class:`datetime.timedelta` object representing the given number of "
"days, seconds and microseconds. Normalization is performed so that the "
@@ -153,106 +202,106 @@ msgid ""
"for :class:`datetime.timedelta` objects."
msgstr ""
-#: ../Doc/c-api/datetime.rst:138
+#: c-api/datetime.rst:181
msgid ""
"Return a :class:`datetime.timezone` object with an unnamed fixed offset "
"represented by the *offset* argument."
msgstr ""
-#: ../Doc/c-api/datetime.rst:146
+#: c-api/datetime.rst:189
msgid ""
"Return a :class:`datetime.timezone` object with a fixed offset represented "
"by the *offset* argument and with tzname *name*."
msgstr ""
-#: ../Doc/c-api/datetime.rst:152
+#: c-api/datetime.rst:195
msgid ""
"Macros to extract fields from date objects. The argument must be an "
-"instance of :c:data:`PyDateTime_Date`, including subclasses (such as :c:data:"
+"instance of :c:type:`PyDateTime_Date`, including subclasses (such as :c:type:"
"`PyDateTime_DateTime`). The argument must not be ``NULL``, and the type is "
"not checked:"
msgstr ""
-#: ../Doc/c-api/datetime.rst:159
+#: c-api/datetime.rst:202
msgid "Return the year, as a positive int."
msgstr ""
-#: ../Doc/c-api/datetime.rst:164
+#: c-api/datetime.rst:207
msgid "Return the month, as an int from 1 through 12."
msgstr ""
-#: ../Doc/c-api/datetime.rst:169
+#: c-api/datetime.rst:212
msgid "Return the day, as an int from 1 through 31."
msgstr ""
-#: ../Doc/c-api/datetime.rst:172
+#: c-api/datetime.rst:215
msgid ""
"Macros to extract fields from datetime objects. The argument must be an "
-"instance of :c:data:`PyDateTime_DateTime`, including subclasses. The "
+"instance of :c:type:`PyDateTime_DateTime`, including subclasses. The "
"argument must not be ``NULL``, and the type is not checked:"
msgstr ""
-#: ../Doc/c-api/datetime.rst:178 ../Doc/c-api/datetime.rst:216
+#: c-api/datetime.rst:259
msgid "Return the hour, as an int from 0 through 23."
msgstr ""
-#: ../Doc/c-api/datetime.rst:183 ../Doc/c-api/datetime.rst:221
+#: c-api/datetime.rst:264
msgid "Return the minute, as an int from 0 through 59."
msgstr ""
-#: ../Doc/c-api/datetime.rst:188 ../Doc/c-api/datetime.rst:226
+#: c-api/datetime.rst:269
msgid "Return the second, as an int from 0 through 59."
msgstr ""
-#: ../Doc/c-api/datetime.rst:193 ../Doc/c-api/datetime.rst:231
+#: c-api/datetime.rst:274
msgid "Return the microsecond, as an int from 0 through 999999."
msgstr ""
-#: ../Doc/c-api/datetime.rst:198 ../Doc/c-api/datetime.rst:236
+#: c-api/datetime.rst:279
msgid "Return the fold, as an int from 0 through 1."
msgstr ""
-#: ../Doc/c-api/datetime.rst:205 ../Doc/c-api/datetime.rst:243
+#: c-api/datetime.rst:286
msgid "Return the tzinfo (which may be ``None``)."
msgstr ""
-#: ../Doc/c-api/datetime.rst:210
+#: c-api/datetime.rst:253
msgid ""
"Macros to extract fields from time objects. The argument must be an "
-"instance of :c:data:`PyDateTime_Time`, including subclasses. The argument "
+"instance of :c:type:`PyDateTime_Time`, including subclasses. The argument "
"must not be ``NULL``, and the type is not checked:"
msgstr ""
-#: ../Doc/c-api/datetime.rst:248
+#: c-api/datetime.rst:291
msgid ""
"Macros to extract fields from time delta objects. The argument must be an "
-"instance of :c:data:`PyDateTime_Delta`, including subclasses. The argument "
+"instance of :c:type:`PyDateTime_Delta`, including subclasses. The argument "
"must not be ``NULL``, and the type is not checked:"
msgstr ""
-#: ../Doc/c-api/datetime.rst:254
+#: c-api/datetime.rst:297
msgid "Return the number of days, as an int from -999999999 to 999999999."
msgstr ""
-#: ../Doc/c-api/datetime.rst:261
+#: c-api/datetime.rst:304
msgid "Return the number of seconds, as an int from 0 through 86399."
msgstr ""
-#: ../Doc/c-api/datetime.rst:268
+#: c-api/datetime.rst:311
msgid "Return the number of microseconds, as an int from 0 through 999999."
msgstr ""
-#: ../Doc/c-api/datetime.rst:273
+#: c-api/datetime.rst:316
msgid "Macros for the convenience of modules implementing the DB API:"
msgstr ""
-#: ../Doc/c-api/datetime.rst:277
+#: c-api/datetime.rst:320
msgid ""
"Create and return a new :class:`datetime.datetime` object given an argument "
"tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`."
msgstr ""
-#: ../Doc/c-api/datetime.rst:283
+#: c-api/datetime.rst:326
msgid ""
"Create and return a new :class:`datetime.date` object given an argument "
"tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`."
diff --git a/c-api/descriptor.po b/c-api/descriptor.po
index 6c4357c..47e422b 100644
--- a/c-api/descriptor.po
+++ b/c-api/descriptor.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,21 +17,21 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/descriptor.rst:6
+#: c-api/descriptor.rst:6
msgid "Descriptor Objects"
msgstr ""
-#: ../Doc/c-api/descriptor.rst:8
+#: c-api/descriptor.rst:8
msgid ""
"\"Descriptors\" are objects that describe some attribute of an object. They "
"are found in the dictionary of type objects."
msgstr ""
-#: ../Doc/c-api/descriptor.rst:15
+#: c-api/descriptor.rst:15
msgid "The type object for the built-in descriptor types."
msgstr ""
-#: ../Doc/c-api/descriptor.rst:35
+#: c-api/descriptor.rst:35
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 "
diff --git a/c-api/dict.po b/c-api/dict.po
index 4988551..8e5132e 100644
--- a/c-api/dict.po
+++ b/c-api/dict.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,60 +17,67 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/dict.rst:6
+#: c-api/dict.rst:6
msgid "Dictionary Objects"
msgstr ""
-#: ../Doc/c-api/dict.rst:13
+#: c-api/dict.rst:13
msgid ""
"This subtype of :c:type:`PyObject` represents a Python dictionary object."
msgstr ""
-#: ../Doc/c-api/dict.rst:18
+#: c-api/dict.rst:18
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python dictionary "
"type. This is the same object as :class:`dict` in the Python layer."
msgstr ""
-#: ../Doc/c-api/dict.rst:24
+#: c-api/dict.rst:24
msgid ""
"Return true if *p* is a dict object or an instance of a subtype of the dict "
"type. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/dict.rst:30
+#: c-api/dict.rst:30
msgid ""
"Return true if *p* is a dict object, but not an instance of a subtype of the "
"dict type. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/dict.rst:36
+#: c-api/dict.rst:36
msgid "Return a new empty dictionary, or ``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/dict.rst:41
+#: c-api/dict.rst:41
msgid ""
"Return a :class:`types.MappingProxyType` object for a mapping which enforces "
"read-only behavior. This is normally used to create a view to prevent "
"modification of the dictionary for non-dynamic class types."
msgstr ""
-#: ../Doc/c-api/dict.rst:48
+#: c-api/dict.rst:48
msgid "Empty an existing dictionary of all key-value pairs."
msgstr ""
-#: ../Doc/c-api/dict.rst:53
+#: c-api/dict.rst:53
msgid ""
"Determine if dictionary *p* contains *key*. If an item in *p* is matches "
"*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This "
"is equivalent to the Python expression ``key in p``."
msgstr ""
-#: ../Doc/c-api/dict.rst:60
+#: c-api/dict.rst:60
+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
msgid "Return a new dictionary that contains the same key-value pairs as *p*."
msgstr ""
-#: ../Doc/c-api/dict.rst:65
+#: c-api/dict.rst:74
msgid ""
"Insert *val* into the dictionary *p* with a key of *key*. *key* must be :"
"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` "
@@ -78,68 +85,102 @@ msgid ""
"to *val*."
msgstr ""
-#: ../Doc/c-api/dict.rst:75
+#: c-api/dict.rst:82
+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
msgid ""
-"Insert *val* into the dictionary *p* using *key* as a key. *key* should be "
-"a :c:expr:`const char*`. The key object is created using "
-"``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on "
-"failure. This function *does not* steal a reference to *val*."
+"Remove the entry in dictionary *p* with key *key*. *key* must be :term:"
+"`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the "
+"dictionary, :exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on "
+"failure."
msgstr ""
-#: ../Doc/c-api/dict.rst:83
+#: c-api/dict.rst:97
msgid ""
-"Remove the entry in dictionary *p* with key *key*. *key* must be hashable; "
-"if it isn't, :exc:`TypeError` is raised. If *key* is not in the dictionary, :"
-"exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on failure."
+"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 ""
-#: ../Doc/c-api/dict.rst:91
+#: c-api/dict.rst:104
msgid ""
-"Remove the entry in dictionary *p* which has a key specified by the string "
-"*key*. If *key* is not in the dictionary, :exc:`KeyError` is raised. Return "
-"``0`` on success or ``-1`` on failure."
+"Return a new :term:`strong reference` to the object from dictionary *p* "
+"which has a key *key*:"
+msgstr ""
+
+#: c-api/dict.rst:107
+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
+msgid "If the key is missing, set *\\*result* to ``NULL`` and return ``0``."
msgstr ""
-#: ../Doc/c-api/dict.rst:98
+#: c-api/dict.rst:207
+msgid "On error, raise an exception and return ``-1``."
+msgstr ""
+
+#: c-api/dict.rst:114
+msgid "See also the :c:func:`PyObject_GetItem` function."
+msgstr ""
+
+#: c-api/dict.rst:119
msgid ""
-"Return the object from dictionary *p* which has a key *key*. Return "
-"``NULL`` if the key *key* is not present, but *without* setting an exception."
+"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 ""
-#: ../Doc/c-api/dict.rst:101
+#: c-api/dict.rst:125
msgid ""
-"Note that exceptions which occur while calling :meth:`__hash__` and :meth:"
-"`__eq__` methods will get suppressed. To get error reporting use :c:func:"
-"`PyDict_GetItemWithError()` instead."
+"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 ""
-#: ../Doc/c-api/dict.rst:105
+#: c-api/dict.rst:129
msgid ""
"Calling this API without :term:`GIL` held had been allowed for historical "
"reason. It is no longer allowed."
msgstr ""
-#: ../Doc/c-api/dict.rst:112
+#: c-api/dict.rst:136
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 ""
-#: ../Doc/c-api/dict.rst:120
+#: c-api/dict.rst:144
msgid ""
"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:"
-"expr:`const char*`, rather than a :c:expr:`PyObject*`."
+"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
+"`PyObject*`."
msgstr ""
-#: ../Doc/c-api/dict.rst:123
+#: c-api/dict.rst:150
msgid ""
-"Note that exceptions which occur while calling :meth:`__hash__` and :meth:"
-"`__eq__` methods and creating a temporary string object will get suppressed. "
-"To get error reporting use :c:func:`PyDict_GetItemWithError()` instead."
+"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
+"`~object.__eq__` methods or while creating the temporary :class:`str` object "
+"are silently ignored. Prefer using the :c:func:`PyDict_GetItemWithError` "
+"function with your own :c:func:`PyUnicode_FromString` *key* instead."
msgstr ""
-#: ../Doc/c-api/dict.rst:131
+#: c-api/dict.rst:159
+msgid ""
+"Similar than :c:func:`PyDict_GetItemRef`, but *key* is specified as a :c:"
+"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
+"`PyObject*`."
+msgstr ""
+
+#: c-api/dict.rst:168
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 "
@@ -149,29 +190,79 @@ msgid ""
"the insertion."
msgstr ""
-#: ../Doc/c-api/dict.rst:141
+#: c-api/dict.rst:179
+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``, "
+"then *\\*result* is set to a :term:`strong reference` to either "
+"*default_value*, if the key was not present, or the existing value, if *key* "
+"was already present in the dictionary. Returns ``1`` if the key was present "
+"and *default_value* was not inserted, or ``0`` if the key was not present "
+"and *default_value* was inserted. On failure, returns ``-1``, sets an "
+"exception, and sets ``*result`` to ``NULL``."
+msgstr ""
+
+#: c-api/dict.rst:189
+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 "
+"both *default_value* and *\\*result* (if it's not ``NULL``). These may refer "
+"to the same object: in that case you hold two separate references to it."
+msgstr ""
+
+#: c-api/dict.rst:200
+msgid ""
+"Remove *key* from dictionary *p* and optionally return the removed value. Do "
+"not raise :exc:`KeyError` if the key missing."
+msgstr ""
+
+#: c-api/dict.rst:203
+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
+msgid ""
+"If the key is missing, set *\\*result* to ``NULL`` if *result* is not "
+"``NULL``, and return ``0``."
+msgstr ""
+
+#: c-api/dict.rst:209
+msgid ""
+"This is similar to :meth:`dict.pop`, but without the default value and not "
+"raising :exc:`KeyError` if the key missing."
+msgstr ""
+
+#: c-api/dict.rst:217
+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
msgid ""
"Return a :c:type:`PyListObject` containing all the items from the dictionary."
msgstr ""
-#: ../Doc/c-api/dict.rst:146
+#: c-api/dict.rst:231
msgid ""
"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
msgstr ""
-#: ../Doc/c-api/dict.rst:151
+#: c-api/dict.rst:236
msgid ""
"Return a :c:type:`PyListObject` containing all the values from the "
"dictionary *p*."
msgstr ""
-#: ../Doc/c-api/dict.rst:159
+#: c-api/dict.rst:244
msgid ""
"Return the number of items in the dictionary. This is equivalent to "
"``len(p)`` on a dictionary."
msgstr ""
-#: ../Doc/c-api/dict.rst:165
+#: c-api/dict.rst:250
msgid ""
"Iterate over all key-value pairs in the dictionary *p*. The :c:type:"
"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the "
@@ -185,18 +276,18 @@ msgid ""
"structure is sparse, the offsets are not consecutive."
msgstr ""
-#: ../Doc/c-api/dict.rst:176
+#: c-api/dict.rst:261
msgid "For example::"
msgstr ""
-#: ../Doc/c-api/dict.rst:186
+#: c-api/dict.rst:271
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 ""
-#: ../Doc/c-api/dict.rst:211
+#: c-api/dict.rst:296
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` "
@@ -206,7 +297,7 @@ msgid ""
"or ``-1`` if an exception was raised."
msgstr ""
-#: ../Doc/c-api/dict.rst:221
+#: c-api/dict.rst:306
msgid ""
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
@@ -215,7 +306,7 @@ msgid ""
"exception was raised."
msgstr ""
-#: ../Doc/c-api/dict.rst:230
+#: c-api/dict.rst:315
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, "
@@ -223,3 +314,116 @@ msgid ""
"*override* is true, else the first wins. Return ``0`` on success or ``-1`` "
"if an exception was raised. Equivalent Python (except for the return value)::"
msgstr ""
+
+#: c-api/dict.rst:329
+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 "
+"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
+"exception."
+msgstr ""
+
+#: c-api/dict.rst:338
+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:346
+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:354
+msgid ""
+"Mark dictionary *dict* as no longer watched. The callback granted "
+"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when "
+"*dict* is modified or deallocated. The dict must previously have been "
+"watched by this watcher. Return ``0`` on success or ``-1`` on error."
+msgstr ""
+
+#: c-api/dict.rst:363
+msgid ""
+"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, "
+"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, "
+"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED``, or "
+"``PyDict_EVENT_DEALLOCATED``."
+msgstr ""
+
+#: c-api/dict.rst:371
+msgid "Type of a dict watcher callback function."
+msgstr ""
+
+#: c-api/dict.rst:373
+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`` "
+"or ``PyDict_EVENT_MODIFIED``, *new_value* will be the new value for *key*. "
+"If *event* is ``PyDict_EVENT_DELETED``, *key* is being deleted from the "
+"dictionary and *new_value* will be ``NULL``."
+msgstr ""
+
+#: c-api/dict.rst:379
+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 "
+"``PyDict_EVENT_ADDED`` events are not issued in this case; instead a single "
+"``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary."
+msgstr ""
+
+#: c-api/dict.rst:385
+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:389
+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 "
+"prevent 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/dict.rst:395
+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:398
+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:402
+msgid ""
+"There may already be a pending exception set on entry to the callback. In "
+"this case, the callback should return ``0`` with the same exception still "
+"set. This means the callback may not call any other API that can set an "
+"exception unless it saves and clears the exception state first, and restores "
+"it before returning."
+msgstr ""
+
+#: c-api/dict.rst:8
+msgid "object"
+msgstr ""
+
+#: c-api/dict.rst:8
+msgid "dictionary"
+msgstr ""
+
+#: c-api/dict.rst:242
+msgid "built-in function"
+msgstr ""
+
+#: c-api/dict.rst:242
+msgid "len"
+msgstr ""
diff --git a/c-api/exceptions.po b/c-api/exceptions.po
index fe89c66..2b0df43 100644
--- a/c-api/exceptions.po
+++ b/c-api/exceptions.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/exceptions.rst:8
+#: c-api/exceptions.rst:8
msgid "Exception Handling"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:10
+#: c-api/exceptions.rst:10
msgid ""
"The functions described in this chapter will let you handle and raise Python "
"exceptions. It is important to understand some of the basics of Python "
@@ -34,7 +34,7 @@ msgid ""
"functions return ``1`` for success and ``0`` for failure)."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:20
+#: c-api/exceptions.rst:20
msgid ""
"Concretely, the error indicator consists of three object pointers: the "
"exception's type, the exception's value, and the traceback object. Any of "
@@ -43,7 +43,7 @@ msgid ""
"exception type is ``NULL``)."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:26
+#: c-api/exceptions.rst:26
msgid ""
"When a function must fail because some function it called failed, it "
"generally doesn't set the error indicator; the function it called already "
@@ -56,7 +56,7 @@ msgid ""
"Python/C API may not behave as intended and may fail in mysterious ways."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:37
+#: c-api/exceptions.rst:37
msgid ""
"The error indicator is **not** the result of :func:`sys.exc_info()`. The "
"former corresponds to an exception that is not yet caught (and is therefore "
@@ -64,17 +64,17 @@ msgid ""
"(and has therefore stopped propagating)."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:44
+#: c-api/exceptions.rst:44
msgid "Printing and clearing"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:49
+#: c-api/exceptions.rst:49
msgid ""
"Clear the error indicator. If the error indicator is not set, there is no "
"effect."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:55
+#: c-api/exceptions.rst:55
msgid ""
"Print a standard traceback to ``sys.stderr`` and clear the error indicator. "
"**Unless** the error is a ``SystemExit``, in that case no traceback is "
@@ -82,75 +82,105 @@ msgid ""
"the ``SystemExit`` instance."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:60
+#: c-api/exceptions.rst:60
msgid ""
"Call this function **only** when the error indicator is set. Otherwise it "
"will cause a fatal error!"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:63
+#: c-api/exceptions.rst:63
msgid ""
-"If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`, :"
-"data:`sys.last_value` and :data:`sys.last_traceback` will be set to the "
-"type, value and traceback of the printed exception, respectively."
+"If *set_sys_last_vars* is nonzero, the variable :data:`sys.last_exc` is set "
+"to the printed exception. For backwards compatibility, the deprecated "
+"variables :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys."
+"last_traceback` are also set to the type, value and traceback of this "
+"exception, respectively."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:70
+#: c-api/exceptions.rst:69
+msgid "The setting of :data:`sys.last_exc` was added."
+msgstr ""
+
+#: c-api/exceptions.rst:75
msgid "Alias for ``PyErr_PrintEx(1)``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:75
+#: c-api/exceptions.rst:80
msgid ""
"Call :func:`sys.unraisablehook` using the current exception and *obj* "
"argument."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:78
+#: c-api/exceptions.rst:83
msgid ""
"This utility function prints a warning message to ``sys.stderr`` when an "
"exception has been set but it is impossible for the interpreter to actually "
"raise the exception. It is used, for example, when an exception occurs in "
-"an :meth:`__del__` method."
+"an :meth:`~object.__del__` method."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:83
+#: c-api/exceptions.rst:88
msgid ""
"The function is called with a single argument *obj* that identifies the "
"context in which the unraisable exception occurred. If possible, the repr of "
-"*obj* will be printed in the warning message."
+"*obj* will be printed in the warning message. If *obj* is ``NULL``, only the "
+"traceback is printed."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:87
+#: c-api/exceptions.rst:93
msgid "An exception must be set when calling this function."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:91
+#: c-api/exceptions.rst:95
+msgid "Print a traceback. Print only traceback if *obj* is ``NULL``."
+msgstr ""
+
+#: c-api/exceptions.rst:98
+msgid "Use :func:`sys.unraisablehook`."
+msgstr ""
+
+#: c-api/exceptions.rst:104
+msgid ""
+"Similar to :c:func:`PyErr_WriteUnraisable`, but the *format* and subsequent "
+"parameters help format the warning message; they have the same meaning and "
+"values as in :c:func:`PyUnicode_FromFormat`. ``PyErr_WriteUnraisable(obj)`` "
+"is roughly equivalent to ``PyErr_FormatUnraisable(\"Exception ignored in: "
+"%R\", obj)``. If *format* is ``NULL``, only the traceback is printed."
+msgstr ""
+
+#: c-api/exceptions.rst:116
+msgid ""
+"Print the standard traceback display of ``exc`` to ``sys.stderr``, including "
+"chained exceptions and notes."
+msgstr ""
+
+#: c-api/exceptions.rst:123
msgid "Raising exceptions"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:93
+#: c-api/exceptions.rst:125
msgid ""
"These functions help you set the current thread's error indicator. For "
"convenience, some of these functions will always return a ``NULL`` pointer "
"for use in a ``return`` statement."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:100
+#: c-api/exceptions.rst:132
msgid ""
"This is the most common way to set the error indicator. The first argument "
"specifies the exception type; it is normally one of the standard exceptions, "
-"e.g. :c:data:`PyExc_RuntimeError`. You need not increment its reference "
-"count. The second argument is an error message; it is decoded from "
-"``'utf-8'``."
+"e.g. :c:data:`PyExc_RuntimeError`. You need not create a new :term:`strong "
+"reference` to it (e.g. with :c:func:`Py_INCREF`). The second argument is an "
+"error message; it is decoded from ``'utf-8'``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:108
+#: c-api/exceptions.rst:141
msgid ""
"This function is similar to :c:func:`PyErr_SetString` but lets you specify "
"an arbitrary Python object for the \"value\" of the exception."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:114
+#: c-api/exceptions.rst:147
msgid ""
"This function sets the error indicator and returns ``NULL``. *exception* "
"should be a Python exception class. The *format* and subsequent parameters "
@@ -158,117 +188,120 @@ msgid ""
"c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:123
+#: c-api/exceptions.rst:156
msgid ""
"Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument "
"rather than a variable number of arguments."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:131
+#: c-api/exceptions.rst:164
msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:136
+#: c-api/exceptions.rst:169
msgid ""
"This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where "
"*message* indicates that a built-in operation was invoked with an illegal "
"argument. It is mostly for internal use."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:143
+#: c-api/exceptions.rst:176
msgid ""
"This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns "
"``NULL`` so an object allocation function can write ``return "
"PyErr_NoMemory();`` when it runs out of memory."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:152
+#: c-api/exceptions.rst:185
msgid ""
"This is a convenience function to raise an exception when a C library "
"function has returned an error and set the C variable :c:data:`errno`. It "
"constructs a tuple object whose first item is the integer :c:data:`errno` "
"value and whose second item is the corresponding error message (gotten from :"
-"c:func:`strerror`), and then calls ``PyErr_SetObject(type, object)``. On "
-"Unix, when the :c:data:`errno` value is :const:`EINTR`, indicating an "
+"c:func:`!strerror`), and then calls ``PyErr_SetObject(type, object)``. On "
+"Unix, when the :c:data:`errno` value is :c:macro:`!EINTR`, indicating an "
"interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if "
"that set the error indicator, leaves it set to that. The function always "
"returns ``NULL``, so a wrapper function around a system call can write "
"``return PyErr_SetFromErrno(type);`` when the system call returns an error."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:166
+#: c-api/exceptions.rst:199
msgid ""
"Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that "
"if *filenameObject* is not ``NULL``, it is passed to the constructor of "
"*type* as a third parameter. In the case of :exc:`OSError` exception, this "
-"is used to define the :attr:`filename` attribute of the exception instance."
+"is used to define the :attr:`!filename` attribute of the exception instance."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:175
+#: c-api/exceptions.rst:208
msgid ""
"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but takes a "
"second filename object, for raising errors when a function that takes two "
"filenames fails."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:184
+#: c-api/exceptions.rst:217
msgid ""
"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename "
"is given as a C string. *filename* is decoded from the :term:`filesystem "
"encoding and error handler`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:191
+#: c-api/exceptions.rst:224
msgid ""
-"This is a convenience function to raise :exc:`WindowsError`. If called with "
-"*ierr* of ``0``, the error code returned by a call to :c:func:`GetLastError` "
-"is used instead. It calls the Win32 function :c:func:`FormatMessage` to "
-"retrieve the Windows description of error code given by *ierr* or :c:func:"
-"`GetLastError`, then it constructs a tuple object whose first item is the "
-"*ierr* value and whose second item is the corresponding error message "
-"(gotten from :c:func:`FormatMessage`), and then calls "
-"``PyErr_SetObject(PyExc_WindowsError, object)``. This function always "
-"returns ``NULL``."
+"This is a convenience function to raise :exc:`OSError`. If called with "
+"*ierr* of ``0``, the error code returned by a call to :c:func:`!"
+"GetLastError` is used instead. It calls the Win32 function :c:func:`!"
+"FormatMessage` to retrieve the Windows description of error code given by "
+"*ierr* or :c:func:`!GetLastError`, then it constructs a :exc:`OSError` "
+"object with the :attr:`~OSError.winerror` attribute set to the error code, "
+"the :attr:`~OSError.strerror` attribute set to the corresponding error "
+"message (gotten from :c:func:`!FormatMessage`), and then calls "
+"``PyErr_SetObject(PyExc_OSError, object)``. This function always returns "
+"``NULL``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:200 ../Doc/c-api/exceptions.rst:208
-#: ../Doc/c-api/exceptions.rst:217 ../Doc/c-api/exceptions.rst:225
-#: ../Doc/c-api/exceptions.rst:234 ../Doc/c-api/exceptions.rst:243
+#: c-api/exceptions.rst:242 c-api/exceptions.rst:263 c-api/exceptions.rst:281
msgid ":ref:`Availability `: Windows."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:205
+#: c-api/exceptions.rst:239
msgid ""
"Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter "
"specifying the exception type to be raised."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:213
+#: c-api/exceptions.rst:247
msgid ""
-"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the "
-"filename is given as a C string. *filename* is decoded from the filesystem "
-"encoding (:func:`os.fsdecode`)."
+"Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior "
+"that if *filename* is not ``NULL``, it is decoded from the filesystem "
+"encoding (:func:`os.fsdecode`) and passed to the constructor of :exc:"
+"`OSError` as a third parameter to be used to define the :attr:`!filename` "
+"attribute of the exception instance."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:222
+#: c-api/exceptions.rst:258
msgid ""
-"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an "
-"additional parameter specifying the exception type to be raised."
+"Similar to :c:func:`PyErr_SetExcFromWindowsErr`, with the additional "
+"behavior that if *filename* is not ``NULL``, it is passed to the constructor "
+"of :exc:`OSError` as a third parameter to be used to define the :attr:`!"
+"filename` attribute of the exception instance."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:230
+#: c-api/exceptions.rst:268
msgid ""
"Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but "
"accepts a second filename object."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:240
+#: c-api/exceptions.rst:278
msgid ""
"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional "
"parameter specifying the exception type to be raised."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:248
+#: c-api/exceptions.rst:286
msgid ""
"This is a convenience function to raise :exc:`ImportError`. *msg* will be "
"set as the exception's message string. *name* and *path*, both of which can "
@@ -276,13 +309,13 @@ msgid ""
"``path`` attributes."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:258
+#: c-api/exceptions.rst:296
msgid ""
"Much like :c:func:`PyErr_SetImportError` but this function allows for "
"specifying a subclass of :exc:`ImportError` to raise."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:266
+#: c-api/exceptions.rst:304
msgid ""
"Set file, line, and offset information for the current exception. If the "
"current exception is not a :exc:`SyntaxError`, then it sets additional "
@@ -290,19 +323,19 @@ msgid ""
"is a :exc:`SyntaxError`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:276
+#: c-api/exceptions.rst:314
msgid ""
"Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string "
"decoded from the :term:`filesystem encoding and error handler`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:284
+#: c-api/exceptions.rst:322
msgid ""
"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is "
"omitted."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:290
+#: c-api/exceptions.rst:328
msgid ""
"This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, "
"where *message* indicates that an internal operation (e.g. a Python/C API "
@@ -310,11 +343,11 @@ msgid ""
"use."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:297
+#: c-api/exceptions.rst:335
msgid "Issuing warnings"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:299
+#: c-api/exceptions.rst:337
msgid ""
"Use these functions to issue warnings from C code. They mirror similar "
"functions exported by the Python :mod:`warnings` module. They normally "
@@ -330,7 +363,7 @@ msgid ""
"return an error value)."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:314
+#: c-api/exceptions.rst:352
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. "
@@ -340,7 +373,7 @@ msgid ""
"`PyErr_WarnEx`, 2 is the function above that, and so forth."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:321
+#: c-api/exceptions.rst:359
msgid ""
"Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:"
"`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default "
@@ -349,14 +382,14 @@ msgid ""
"enumerated at :ref:`standardwarningcategories`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:327
+#: c-api/exceptions.rst:365
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 ""
-#: ../Doc/c-api/exceptions.rst:334
+#: c-api/exceptions.rst:372
msgid ""
"Issue a warning message with explicit control over all warning attributes. "
"This is a straightforward wrapper around the Python function :func:`warnings."
@@ -364,31 +397,32 @@ msgid ""
"arguments may be set to ``NULL`` to get the default effect described there."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:345
+#: c-api/exceptions.rst:383
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 ""
-#: ../Doc/c-api/exceptions.rst:352
+#: c-api/exceptions.rst:390
msgid ""
"Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:"
"`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-"
"encoded string."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:361
+#: c-api/exceptions.rst:399
msgid ""
"Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:"
-"`ResourceWarning` and it passes *source* to :func:`warnings.WarningMessage`."
+"`ResourceWarning` and it passes *source* to :class:`!warnings."
+"WarningMessage`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:368
+#: c-api/exceptions.rst:406
msgid "Querying the error indicator"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:372
+#: c-api/exceptions.rst:410
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*`` "
@@ -397,11 +431,11 @@ msgid ""
"`Py_DECREF` it."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:378
+#: c-api/exceptions.rst:416
msgid "The caller must hold the GIL."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:382
+#: c-api/exceptions.rst:420
msgid ""
"Do not compare the return value to a specific exception; use :c:func:"
"`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily "
@@ -409,14 +443,14 @@ msgid ""
"of a class exception, or it may be a subclass of the expected exception.)"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:390
+#: c-api/exceptions.rst:428
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 ""
-#: ../Doc/c-api/exceptions.rst:397
+#: c-api/exceptions.rst:435
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 "
@@ -424,7 +458,43 @@ msgid ""
"tuple (and recursively in subtuples) are searched for a match."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:405
+#: c-api/exceptions.rst:443
+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
+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
+msgid "For example::"
+msgstr ""
+
+#: c-api/exceptions.rst:459
+msgid ""
+":c:func:`PyErr_GetHandledException`, to save the exception currently being "
+"handled."
+msgstr ""
+
+#: c-api/exceptions.rst:467
+msgid ""
+"Set *exc* as the exception currently being raised, clearing the existing "
+"exception if one is set."
+msgstr ""
+
+#: c-api/exceptions.rst:472
+msgid "This call steals a reference to *exc*, which must be a valid exception."
+msgstr ""
+
+#: c-api/exceptions.rst:481
+msgid "Use :c:func:`PyErr_GetRaisedException` instead."
+msgstr ""
+
+#: c-api/exceptions.rst:483
msgid ""
"Retrieve the error indicator into three variables whose addresses are "
"passed. If the error indicator is not set, set all three variables to "
@@ -433,34 +503,43 @@ msgid ""
"the type object is not."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:412
+#: c-api/exceptions.rst:490
msgid ""
-"This function is normally only used by code that needs to catch exceptions "
-"or by code that needs to save and restore the error indicator temporarily, e."
-"g.::"
+"This function is normally only used by legacy code that needs to catch "
+"exceptions or save and restore the error indicator temporarily."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:427
+#: c-api/exceptions.rst:509
+msgid "Use :c:func:`PyErr_SetRaisedException` instead."
+msgstr ""
+
+#: c-api/exceptions.rst:511
+msgid ""
+"Set the error indicator from the three objects, *type*, *value*, and "
+"*traceback*, clearing the existing exception if one is set. If the objects "
+"are ``NULL``, the error indicator is cleared. Do not pass a ``NULL`` type "
+"and non-``NULL`` value or traceback. The exception type should be a class. "
+"Do not pass an invalid exception type or value. (Violating these rules will "
+"cause subtle problems later.) This call takes away a reference to each "
+"object: you must own a reference to each object before the call and after "
+"the call you no longer own these references. (If you don't understand this, "
+"don't use this function. I warned you.)"
+msgstr ""
+
+#: c-api/exceptions.rst:525
msgid ""
-"Set the error indicator from the three objects. If the error indicator is "
-"already set, it is cleared first. If the objects are ``NULL``, the error "
-"indicator is cleared. Do not pass a ``NULL`` type and non-``NULL`` value or "
-"traceback. The exception type should be a class. Do not pass an invalid "
-"exception type or value. (Violating these rules will cause subtle problems "
-"later.) This call takes away a reference to each object: you must own a "
-"reference to each object before the call and after the call you no longer "
-"own these references. (If you don't understand this, don't use this "
-"function. I warned you.)"
+"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 ""
-#: ../Doc/c-api/exceptions.rst:439
+#: c-api/exceptions.rst:534
msgid ""
-"This function is normally only used by code that needs to save and restore "
-"the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save the "
-"current error indicator."
+"Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-"
+"normalization."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:446
+#: c-api/exceptions.rst:537
msgid ""
"Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` "
"below can be \"unnormalized\", meaning that ``*exc`` is a class object but "
@@ -470,14 +549,14 @@ msgid ""
"improve performance."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:454
+#: c-api/exceptions.rst:545
msgid ""
-"This function *does not* implicitly set the ``__traceback__`` attribute on "
-"the exception value. If setting the traceback appropriately is desired, the "
-"following additional snippet is needed::"
+"This function *does not* implicitly set the :attr:`~BaseException."
+"__traceback__` attribute on the exception value. If setting the traceback "
+"appropriately is desired, the following additional snippet is needed::"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:465
+#: c-api/exceptions.rst:557
msgid ""
"Retrieve the active exception instance, as would be returned by :func:`sys."
"exception`. This refers to an exception that was *already caught*, not to an "
@@ -485,7 +564,7 @@ msgid ""
"or ``NULL``. Does not modify the interpreter's exception state."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:472
+#: c-api/exceptions.rst:564
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 "
@@ -493,14 +572,14 @@ msgid ""
"clear the exception state."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:481
+#: c-api/exceptions.rst:573
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 ""
-#: ../Doc/c-api/exceptions.rst:488
+#: c-api/exceptions.rst:580
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 "
@@ -508,7 +587,7 @@ msgid ""
"exception state."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:497
+#: c-api/exceptions.rst:589
msgid ""
"Retrieve the old-style representation of the exception info, as known from :"
"func:`sys.exc_info`. This refers to an exception that was *already caught*, "
@@ -518,7 +597,7 @@ msgid ""
"using :c:func:`PyErr_GetHandledException`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:506
+#: 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 "
@@ -526,7 +605,7 @@ msgid ""
"exception state."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:516
+#: c-api/exceptions.rst:608
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 "
@@ -536,7 +615,7 @@ msgid ""
"`PyErr_SetHandledException`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:525
+#: c-api/exceptions.rst:617
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 "
@@ -544,22 +623,22 @@ msgid ""
"state."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:532
+#: c-api/exceptions.rst:624
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 ""
-#: ../Doc/c-api/exceptions.rst:540
+#: c-api/exceptions.rst:632
msgid "Signal Handling"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:550
+#: c-api/exceptions.rst:642
msgid "This function interacts with Python's signal handling."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:552
+#: c-api/exceptions.rst:644
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 "
@@ -567,7 +646,7 @@ msgid ""
"module is supported, this can invoke a signal handler written in Python."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:557
+#: c-api/exceptions.rst:649
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 "
@@ -576,44 +655,44 @@ msgid ""
"`PyErr_CheckSignals()` invocation)."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:563
+#: c-api/exceptions.rst:655
msgid ""
"If the function is called from a non-main thread, or under a non-main Python "
"interpreter, it does nothing and returns ``0``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:566
+#: c-api/exceptions.rst:658
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)."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:570
+#: c-api/exceptions.rst:662
msgid ""
-"The default Python signal handler for :const:`SIGINT` raises the :exc:"
+"The default Python signal handler for :c:macro:`!SIGINT` raises the :exc:"
"`KeyboardInterrupt` exception."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:581
+#: c-api/exceptions.rst:673
msgid ""
-"Simulate the effect of a :const:`SIGINT` signal arriving. This is equivalent "
-"to ``PyErr_SetInterruptEx(SIGINT)``."
+"Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is "
+"equivalent to ``PyErr_SetInterruptEx(SIGINT)``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:585 ../Doc/c-api/exceptions.rst:612
+#: c-api/exceptions.rst:704
msgid ""
"This function is async-signal-safe. It can be called without the :term:"
"`GIL` and from a C signal handler."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:595
+#: c-api/exceptions.rst:687
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 ""
-#: ../Doc/c-api/exceptions.rst:599
+#: c-api/exceptions.rst:691
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 "
@@ -621,27 +700,27 @@ msgid ""
"interrupt an operation)."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:604
+#: c-api/exceptions.rst:696
msgid ""
-"If the given signal isn't handled by Python (it was set to :data:`signal."
-"SIG_DFL` or :data:`signal.SIG_IGN`), it will be ignored."
+"If the given signal isn't handled by Python (it was set to :py:const:`signal."
+"SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:607
+#: c-api/exceptions.rst:699
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 ""
-#: ../Doc/c-api/exceptions.rst:620
+#: c-api/exceptions.rst:712
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 ""
-#: ../Doc/c-api/exceptions.rst:624
+#: c-api/exceptions.rst:716
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 "
@@ -649,15 +728,15 @@ msgid ""
"be called from the main thread."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:629
+#: c-api/exceptions.rst:721
msgid "On Windows, the function now also supports socket handles."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:634
+#: c-api/exceptions.rst:726
msgid "Exception Classes"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:638
+#: c-api/exceptions.rst:730
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 "
@@ -666,9 +745,9 @@ msgid ""
"(accessible in C as :c:data:`PyExc_Exception`)."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:644
+#: c-api/exceptions.rst:736
msgid ""
-"The :attr:`__module__` attribute of the new class is set to the first part "
+"The :attr:`!__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 to "
"the last part (after the last dot). The *base* argument can be used to "
"specify alternate base classes; it can either be only one class or a tuple "
@@ -676,130 +755,152 @@ msgid ""
"variables and methods."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:653
+#: c-api/exceptions.rst:745
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 ""
-#: ../Doc/c-api/exceptions.rst:661
+#: c-api/exceptions.rst:753
msgid "Exception Objects"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:665
+#: c-api/exceptions.rst:757
msgid ""
"Return the traceback associated with the exception as a new reference, as "
-"accessible from Python through :attr:`__traceback__`. If there is no "
-"traceback associated, this returns ``NULL``."
+"accessible from Python through the :attr:`~BaseException.__traceback__` "
+"attribute. If there is no traceback associated, this returns ``NULL``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:672
+#: c-api/exceptions.rst:765
msgid ""
"Set the traceback associated with the exception to *tb*. Use ``Py_None`` to "
"clear it."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:678
+#: c-api/exceptions.rst:771
msgid ""
"Return the context (another exception instance during whose handling *ex* "
"was raised) associated with the exception as a new reference, as accessible "
-"from Python through :attr:`__context__`. If there is no context associated, "
-"this returns ``NULL``."
+"from Python through the :attr:`~BaseException.__context__` attribute. If "
+"there is no context associated, this returns ``NULL``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:686
+#: c-api/exceptions.rst:779
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 ""
-#: ../Doc/c-api/exceptions.rst:693
+#: c-api/exceptions.rst:786
msgid ""
-"Return the cause (either an exception instance, or :const:`None`, set by "
+"Return the cause (either an exception instance, or ``None``, set by "
"``raise ... from ...``) associated with the exception as a new reference, as "
-"accessible from Python through :attr:`__cause__`."
+"accessible from Python through the :attr:`~BaseException.__cause__` "
+"attribute."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:700
+#: c-api/exceptions.rst:794
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 :const:`None`. This steals a reference to *cause*."
+"exception instance or ``None``. This steals a reference to *cause*."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:704
+#: c-api/exceptions.rst:798
msgid ""
-":attr:`__suppress_context__` is implicitly set to ``True`` by this function."
+"The :attr:`~BaseException.__suppress_context__` attribute is implicitly set "
+"to ``True`` by this function."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:710
+#: c-api/exceptions.rst:804
+msgid "Return :attr:`~BaseException.args` of exception *ex*."
+msgstr ""
+
+#: c-api/exceptions.rst:809
+msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*."
+msgstr ""
+
+#: c-api/exceptions.rst:813
+msgid ""
+"Implement part of the interpreter's implementation of :keyword:`!except*`. "
+"*orig* is the original exception that was caught, and *excs* is the list of "
+"the exceptions that need to be raised. This list contains the unhandled part "
+"of *orig*, if any, as well as the exceptions that were raised from the :"
+"keyword:`!except*` clauses (so they have a different traceback from *orig*) "
+"and those that were reraised (and have the same traceback as *orig*). Return "
+"the :exc:`ExceptionGroup` that needs to be reraised in the end, or ``None`` "
+"if there is nothing to reraise."
+msgstr ""
+
+#: c-api/exceptions.rst:827
msgid "Unicode Exception Objects"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:712
+#: c-api/exceptions.rst:829
msgid ""
"The following functions are used to create and modify Unicode exceptions "
"from C."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:716
+#: c-api/exceptions.rst:833
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 ""
-#: ../Doc/c-api/exceptions.rst:723
+#: c-api/exceptions.rst:840
msgid "Return the *encoding* attribute of the given exception object."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:729
+#: c-api/exceptions.rst:846
msgid "Return the *object* attribute of the given exception object."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:735
+#: c-api/exceptions.rst:852
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 ""
-#: ../Doc/c-api/exceptions.rst:743
+#: c-api/exceptions.rst:860
msgid ""
"Set the *start* attribute of the given exception object to *start*. Return "
"``0`` on success, ``-1`` on failure."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:750
+#: c-api/exceptions.rst:867
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 ""
-#: ../Doc/c-api/exceptions.rst:758
+#: c-api/exceptions.rst:875
msgid ""
"Set the *end* attribute of the given exception object to *end*. Return "
"``0`` on success, ``-1`` on failure."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:765
+#: c-api/exceptions.rst:882
msgid "Return the *reason* attribute of the given exception object."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:771
+#: c-api/exceptions.rst:888
msgid ""
"Set the *reason* attribute of the given exception object to *reason*. "
"Return ``0`` on success, ``-1`` on failure."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:778
+#: c-api/exceptions.rst:895
msgid "Recursion Control"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:780
+#: c-api/exceptions.rst:897
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 "
@@ -809,42 +910,44 @@ msgid ""
"recursion handling."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:789
+#: c-api/exceptions.rst:906
msgid "Marks a point where a recursive C-level call is about to be performed."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:791
+#: c-api/exceptions.rst:908
msgid ""
-"If :const:`USE_STACKCHECK` is defined, this function checks if the OS stack "
-"overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it sets a :"
-"exc:`MemoryError` and returns a nonzero value."
+"If :c:macro:`!USE_STACKCHECK` is defined, this function checks if the OS "
+"stack overflowed using :c:func:`PyOS_CheckStack`. If this is the case, it "
+"sets a :exc:`MemoryError` and returns a nonzero value."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:795
+#: c-api/exceptions.rst:912
msgid ""
"The function then checks if the recursion limit is reached. If this is the "
"case, a :exc:`RecursionError` is set and a nonzero value is returned. "
"Otherwise, zero is returned."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:799
+#: c-api/exceptions.rst:916
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 ""
-#: ../Doc/c-api/exceptions.rst:803 ../Doc/c-api/exceptions.rst:811
-msgid "This function is now also available in the limited API."
+#: c-api/exceptions.rst:928
+msgid ""
+"This function is now also available in the :ref:`limited API `."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:808
+#: c-api/exceptions.rst:925
msgid ""
"Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each "
"*successful* invocation of :c:func:`Py_EnterRecursiveCall`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:814
+#: c-api/exceptions.rst:931
msgid ""
"Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types "
"requires special recursion handling. In addition to protecting the stack, :"
@@ -853,13 +956,13 @@ msgid ""
"Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:822
+#: c-api/exceptions.rst:939
msgid ""
"Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` "
"implementation to detect cycles."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:825
+#: c-api/exceptions.rst:942
msgid ""
"If the object has already been processed, the function returns a positive "
"integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation "
@@ -867,30 +970,30 @@ msgid ""
"`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:831
+#: c-api/exceptions.rst:948
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 ""
-#: ../Doc/c-api/exceptions.rst:835
+#: c-api/exceptions.rst:952
msgid ""
"Otherwise, the function returns zero and the :c:member:`~PyTypeObject."
"tp_repr` implementation can continue normally."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:840
+#: c-api/exceptions.rst:957
msgid ""
"Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :"
"c:func:`Py_ReprEnter` that returns zero."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:847
+#: c-api/exceptions.rst:964
msgid "Standard Exceptions"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:849
+#: c-api/exceptions.rst:966
msgid ""
"All standard Python exceptions are available as global variables whose names "
"are ``PyExc_`` followed by the Python exception name. These have the type :"
@@ -898,451 +1001,448 @@ msgid ""
"all the variables:"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:910 ../Doc/c-api/exceptions.rst:1043
-#: ../Doc/c-api/exceptions.rst:1088
+#: c-api/exceptions.rst:1160 c-api/exceptions.rst:1205
msgid "C Name"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:910 ../Doc/c-api/exceptions.rst:1088
+#: c-api/exceptions.rst:1205
msgid "Python Name"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:910 ../Doc/c-api/exceptions.rst:1043
-#: ../Doc/c-api/exceptions.rst:1088
+#: c-api/exceptions.rst:1160 c-api/exceptions.rst:1205
msgid "Notes"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:912
+#: c-api/exceptions.rst:1029
msgid ":c:data:`PyExc_BaseException`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:912
+#: c-api/exceptions.rst:1029
msgid ":exc:`BaseException`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:912 ../Doc/c-api/exceptions.rst:914
-#: ../Doc/c-api/exceptions.rst:916 ../Doc/c-api/exceptions.rst:962
-#: ../Doc/c-api/exceptions.rst:974
+#: c-api/exceptions.rst:1031 c-api/exceptions.rst:1079
+#: c-api/exceptions.rst:1091
msgid "[1]_"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:914
+#: c-api/exceptions.rst:1031
msgid ":c:data:`PyExc_Exception`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:914
+#: c-api/exceptions.rst:1031
msgid ":exc:`Exception`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:916
+#: c-api/exceptions.rst:1033
msgid ":c:data:`PyExc_ArithmeticError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:916
+#: c-api/exceptions.rst:1033
msgid ":exc:`ArithmeticError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:918
+#: c-api/exceptions.rst:1035
msgid ":c:data:`PyExc_AssertionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:918
+#: c-api/exceptions.rst:1035
msgid ":exc:`AssertionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:920
+#: c-api/exceptions.rst:1037
msgid ":c:data:`PyExc_AttributeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:920
+#: c-api/exceptions.rst:1037
msgid ":exc:`AttributeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:922
+#: c-api/exceptions.rst:1039
msgid ":c:data:`PyExc_BlockingIOError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:922
+#: c-api/exceptions.rst:1039
msgid ":exc:`BlockingIOError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:924
+#: c-api/exceptions.rst:1041
msgid ":c:data:`PyExc_BrokenPipeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:924
+#: c-api/exceptions.rst:1041
msgid ":exc:`BrokenPipeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:926
+#: c-api/exceptions.rst:1043
msgid ":c:data:`PyExc_BufferError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:926
+#: c-api/exceptions.rst:1043
msgid ":exc:`BufferError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:928
+#: c-api/exceptions.rst:1045
msgid ":c:data:`PyExc_ChildProcessError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:928
+#: c-api/exceptions.rst:1045
msgid ":exc:`ChildProcessError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:930
+#: c-api/exceptions.rst:1047
msgid ":c:data:`PyExc_ConnectionAbortedError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:930
+#: c-api/exceptions.rst:1047
msgid ":exc:`ConnectionAbortedError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:932
+#: c-api/exceptions.rst:1049
msgid ":c:data:`PyExc_ConnectionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:932
+#: c-api/exceptions.rst:1049
msgid ":exc:`ConnectionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:934
+#: c-api/exceptions.rst:1051
msgid ":c:data:`PyExc_ConnectionRefusedError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:934
+#: c-api/exceptions.rst:1051
msgid ":exc:`ConnectionRefusedError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:936
+#: c-api/exceptions.rst:1053
msgid ":c:data:`PyExc_ConnectionResetError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:936
+#: c-api/exceptions.rst:1053
msgid ":exc:`ConnectionResetError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:938
+#: c-api/exceptions.rst:1055
msgid ":c:data:`PyExc_EOFError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:938
+#: c-api/exceptions.rst:1055
msgid ":exc:`EOFError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:940
+#: c-api/exceptions.rst:1057
msgid ":c:data:`PyExc_FileExistsError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:940
+#: c-api/exceptions.rst:1057
msgid ":exc:`FileExistsError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:942
+#: c-api/exceptions.rst:1059
msgid ":c:data:`PyExc_FileNotFoundError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:942
+#: c-api/exceptions.rst:1059
msgid ":exc:`FileNotFoundError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:944
+#: c-api/exceptions.rst:1061
msgid ":c:data:`PyExc_FloatingPointError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:944
+#: c-api/exceptions.rst:1061
msgid ":exc:`FloatingPointError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:946
+#: c-api/exceptions.rst:1063
msgid ":c:data:`PyExc_GeneratorExit`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:946
+#: c-api/exceptions.rst:1063
msgid ":exc:`GeneratorExit`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:948
+#: c-api/exceptions.rst:1065
msgid ":c:data:`PyExc_ImportError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:948
+#: c-api/exceptions.rst:1065
msgid ":exc:`ImportError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:950
+#: c-api/exceptions.rst:1067
msgid ":c:data:`PyExc_IndentationError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:950
+#: c-api/exceptions.rst:1067
msgid ":exc:`IndentationError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:952
+#: c-api/exceptions.rst:1069
msgid ":c:data:`PyExc_IndexError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:952
+#: c-api/exceptions.rst:1069
msgid ":exc:`IndexError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:954
+#: c-api/exceptions.rst:1071
msgid ":c:data:`PyExc_InterruptedError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:954
+#: c-api/exceptions.rst:1071
msgid ":exc:`InterruptedError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:956
+#: c-api/exceptions.rst:1073
msgid ":c:data:`PyExc_IsADirectoryError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:956
+#: c-api/exceptions.rst:1073
msgid ":exc:`IsADirectoryError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:958
+#: c-api/exceptions.rst:1075
msgid ":c:data:`PyExc_KeyError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:958
+#: c-api/exceptions.rst:1075
msgid ":exc:`KeyError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:960
+#: c-api/exceptions.rst:1077
msgid ":c:data:`PyExc_KeyboardInterrupt`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:960
+#: c-api/exceptions.rst:1077
msgid ":exc:`KeyboardInterrupt`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:962
+#: c-api/exceptions.rst:1079
msgid ":c:data:`PyExc_LookupError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:962
+#: c-api/exceptions.rst:1079
msgid ":exc:`LookupError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:964
+#: c-api/exceptions.rst:1081
msgid ":c:data:`PyExc_MemoryError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:964
+#: c-api/exceptions.rst:1081
msgid ":exc:`MemoryError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:966
+#: c-api/exceptions.rst:1083
msgid ":c:data:`PyExc_ModuleNotFoundError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:966
+#: c-api/exceptions.rst:1083
msgid ":exc:`ModuleNotFoundError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:968
+#: c-api/exceptions.rst:1085
msgid ":c:data:`PyExc_NameError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:968
+#: c-api/exceptions.rst:1085
msgid ":exc:`NameError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:970
+#: c-api/exceptions.rst:1087
msgid ":c:data:`PyExc_NotADirectoryError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:970
+#: c-api/exceptions.rst:1087
msgid ":exc:`NotADirectoryError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:972
+#: c-api/exceptions.rst:1089
msgid ":c:data:`PyExc_NotImplementedError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:972
+#: c-api/exceptions.rst:1089
msgid ":exc:`NotImplementedError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:974
+#: c-api/exceptions.rst:1091
msgid ":c:data:`PyExc_OSError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:974
+#: c-api/exceptions.rst:1091
msgid ":exc:`OSError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:976
+#: c-api/exceptions.rst:1093
msgid ":c:data:`PyExc_OverflowError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:976
+#: c-api/exceptions.rst:1093
msgid ":exc:`OverflowError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:978
+#: c-api/exceptions.rst:1095
msgid ":c:data:`PyExc_PermissionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:978
+#: c-api/exceptions.rst:1095
msgid ":exc:`PermissionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:980
+#: c-api/exceptions.rst:1097
msgid ":c:data:`PyExc_ProcessLookupError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:980
+#: c-api/exceptions.rst:1097
msgid ":exc:`ProcessLookupError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:982
+#: c-api/exceptions.rst:1099
msgid ":c:data:`PyExc_RecursionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:982
+#: c-api/exceptions.rst:1099
msgid ":exc:`RecursionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:984
+#: c-api/exceptions.rst:1101
msgid ":c:data:`PyExc_ReferenceError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:984
+#: c-api/exceptions.rst:1101
msgid ":exc:`ReferenceError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:986
+#: c-api/exceptions.rst:1103
msgid ":c:data:`PyExc_RuntimeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:986
+#: c-api/exceptions.rst:1103
msgid ":exc:`RuntimeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:988
+#: c-api/exceptions.rst:1105
msgid ":c:data:`PyExc_StopAsyncIteration`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:988
+#: c-api/exceptions.rst:1105
msgid ":exc:`StopAsyncIteration`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:990
+#: c-api/exceptions.rst:1107
msgid ":c:data:`PyExc_StopIteration`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:990
+#: c-api/exceptions.rst:1107
msgid ":exc:`StopIteration`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:992
+#: c-api/exceptions.rst:1109
msgid ":c:data:`PyExc_SyntaxError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:992
+#: c-api/exceptions.rst:1109
msgid ":exc:`SyntaxError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:994
+#: c-api/exceptions.rst:1111
msgid ":c:data:`PyExc_SystemError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:994
+#: c-api/exceptions.rst:1111
msgid ":exc:`SystemError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:996
+#: c-api/exceptions.rst:1113
msgid ":c:data:`PyExc_SystemExit`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:996
+#: c-api/exceptions.rst:1113
msgid ":exc:`SystemExit`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:998
+#: c-api/exceptions.rst:1115
msgid ":c:data:`PyExc_TabError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:998
+#: c-api/exceptions.rst:1115
msgid ":exc:`TabError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1000
+#: c-api/exceptions.rst:1117
msgid ":c:data:`PyExc_TimeoutError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1000
+#: c-api/exceptions.rst:1117
msgid ":exc:`TimeoutError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1002
+#: c-api/exceptions.rst:1119
msgid ":c:data:`PyExc_TypeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1002
+#: c-api/exceptions.rst:1119
msgid ":exc:`TypeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1004
+#: c-api/exceptions.rst:1121
msgid ":c:data:`PyExc_UnboundLocalError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1004
+#: c-api/exceptions.rst:1121
msgid ":exc:`UnboundLocalError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1006
+#: c-api/exceptions.rst:1123
msgid ":c:data:`PyExc_UnicodeDecodeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1006
+#: c-api/exceptions.rst:1123
msgid ":exc:`UnicodeDecodeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1008
+#: c-api/exceptions.rst:1125
msgid ":c:data:`PyExc_UnicodeEncodeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1008
+#: c-api/exceptions.rst:1125
msgid ":exc:`UnicodeEncodeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1010
+#: c-api/exceptions.rst:1127
msgid ":c:data:`PyExc_UnicodeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1010
+#: c-api/exceptions.rst:1127
msgid ":exc:`UnicodeError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1012
+#: c-api/exceptions.rst:1129
msgid ":c:data:`PyExc_UnicodeTranslateError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1012
+#: c-api/exceptions.rst:1129
msgid ":exc:`UnicodeTranslateError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1014
+#: c-api/exceptions.rst:1131
msgid ":c:data:`PyExc_ValueError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1014
+#: c-api/exceptions.rst:1131
msgid ":exc:`ValueError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1016
+#: c-api/exceptions.rst:1133
msgid ":c:data:`PyExc_ZeroDivisionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1016
+#: c-api/exceptions.rst:1133
msgid ":exc:`ZeroDivisionError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1019
+#: c-api/exceptions.rst:1136
msgid ""
":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:"
"`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:"
@@ -1354,57 +1454,57 @@ msgid ""
"`PyExc_TimeoutError` were introduced following :pep:`3151`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1029
+#: c-api/exceptions.rst:1146
msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1032
+#: c-api/exceptions.rst:1149
msgid ":c:data:`PyExc_ModuleNotFoundError`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1035
+#: c-api/exceptions.rst:1152
msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1045
-msgid ":c:data:`PyExc_EnvironmentError`"
+#: c-api/exceptions.rst:1162
+msgid ":c:data:`!PyExc_EnvironmentError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1047
-msgid ":c:data:`PyExc_IOError`"
+#: c-api/exceptions.rst:1164
+msgid ":c:data:`!PyExc_IOError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1049
-msgid ":c:data:`PyExc_WindowsError`"
+#: c-api/exceptions.rst:1166
+msgid ":c:data:`!PyExc_WindowsError`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1049
+#: c-api/exceptions.rst:1166
msgid "[2]_"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1052
+#: c-api/exceptions.rst:1169
msgid "These aliases used to be separate exception types."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1055 ../Doc/c-api/exceptions.rst:1116
+#: c-api/exceptions.rst:1233
msgid "Notes:"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1058
+#: c-api/exceptions.rst:1175
msgid "This is a base class for other standard exceptions."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1061
+#: c-api/exceptions.rst:1178
msgid ""
"Only defined on Windows; protect code that uses this by testing that the "
"preprocessor macro ``MS_WINDOWS`` is defined."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1067
+#: c-api/exceptions.rst:1184
msgid "Standard Warning Categories"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1069
+#: c-api/exceptions.rst:1186
msgid ""
"All standard Python warning categories are available as global variables "
"whose names are ``PyExc_`` followed by the Python exception name. These have "
@@ -1412,102 +1512,390 @@ msgid ""
"here are all the variables:"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1090
+#: c-api/exceptions.rst:1207
msgid ":c:data:`PyExc_Warning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1090
+#: c-api/exceptions.rst:1207
msgid ":exc:`Warning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1090
+#: c-api/exceptions.rst:1207
msgid "[3]_"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1092
+#: c-api/exceptions.rst:1209
msgid ":c:data:`PyExc_BytesWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1092
+#: c-api/exceptions.rst:1209
msgid ":exc:`BytesWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1094
+#: c-api/exceptions.rst:1211
msgid ":c:data:`PyExc_DeprecationWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1094
+#: c-api/exceptions.rst:1211
msgid ":exc:`DeprecationWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1096
+#: c-api/exceptions.rst:1213
msgid ":c:data:`PyExc_FutureWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1096
+#: c-api/exceptions.rst:1213
msgid ":exc:`FutureWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1098
+#: c-api/exceptions.rst:1215
msgid ":c:data:`PyExc_ImportWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1098
+#: c-api/exceptions.rst:1215
msgid ":exc:`ImportWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1100
+#: c-api/exceptions.rst:1217
msgid ":c:data:`PyExc_PendingDeprecationWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1100
+#: c-api/exceptions.rst:1217
msgid ":exc:`PendingDeprecationWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1102
+#: c-api/exceptions.rst:1219
msgid ":c:data:`PyExc_ResourceWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1102
+#: c-api/exceptions.rst:1219
msgid ":exc:`ResourceWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1104
+#: c-api/exceptions.rst:1221
msgid ":c:data:`PyExc_RuntimeWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1104
+#: c-api/exceptions.rst:1221
msgid ":exc:`RuntimeWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1106
+#: c-api/exceptions.rst:1223
msgid ":c:data:`PyExc_SyntaxWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1106
+#: c-api/exceptions.rst:1223
msgid ":exc:`SyntaxWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1108
+#: c-api/exceptions.rst:1225
msgid ":c:data:`PyExc_UnicodeWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1108
+#: c-api/exceptions.rst:1225
msgid ":exc:`UnicodeWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1110
+#: c-api/exceptions.rst:1227
msgid ":c:data:`PyExc_UserWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1110
+#: c-api/exceptions.rst:1227
msgid ":exc:`UserWarning`"
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1113
+#: c-api/exceptions.rst:1230
msgid ":c:data:`PyExc_ResourceWarning`."
msgstr ""
-#: ../Doc/c-api/exceptions.rst:1119
+#: c-api/exceptions.rst:1236
msgid "This is a base class for other standard warning categories."
msgstr ""
+
+#: c-api/exceptions.rst:183
+msgid "strerror (C function)"
+msgstr ""
+
+#: c-api/exceptions.rst:668 c-api/exceptions.rst:683
+msgid "module"
+msgstr ""
+
+#: c-api/exceptions.rst:668 c-api/exceptions.rst:683
+msgid "signal"
+msgstr ""
+
+#: c-api/exceptions.rst:668
+msgid "SIGINT (C macro)"
+msgstr ""
+
+#: c-api/exceptions.rst:668 c-api/exceptions.rst:683
+msgid "KeyboardInterrupt (built-in exception)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_BaseException (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_Exception (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ArithmeticError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_AssertionError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_AttributeError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_BlockingIOError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_BrokenPipeError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_BufferError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ChildProcessError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ConnectionAbortedError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ConnectionError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ConnectionRefusedError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ConnectionResetError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_EOFError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_FileExistsError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_FileNotFoundError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_FloatingPointError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_GeneratorExit (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ImportError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_IndentationError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_IndexError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_InterruptedError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_IsADirectoryError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_KeyError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_KeyboardInterrupt (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_LookupError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_MemoryError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ModuleNotFoundError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_NameError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_NotADirectoryError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_NotImplementedError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_OSError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_OverflowError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_PermissionError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ProcessLookupError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_RecursionError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ReferenceError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_RuntimeError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_StopAsyncIteration (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_StopIteration (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_SyntaxError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_SystemError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_SystemExit (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_TabError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_TimeoutError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_TypeError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_UnboundLocalError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_UnicodeDecodeError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_UnicodeEncodeError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_UnicodeError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_UnicodeTranslateError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ValueError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:971
+msgid "PyExc_ZeroDivisionError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1154
+msgid "PyExc_EnvironmentError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1154
+msgid "PyExc_IOError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1154
+msgid "PyExc_WindowsError (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_Warning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_BytesWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_DeprecationWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_FutureWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_ImportWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_PendingDeprecationWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_ResourceWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_RuntimeWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_SyntaxWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_UnicodeWarning (C var)"
+msgstr ""
+
+#: c-api/exceptions.rst:1191
+msgid "PyExc_UserWarning (C var)"
+msgstr ""
diff --git a/c-api/file.po b/c-api/file.po
index acfbf38..f35c656 100644
--- a/c-api/file.po
+++ b/c-api/file.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/file.rst:6
+#: c-api/file.rst:6
msgid "File Objects"
msgstr ""
-#: ../Doc/c-api/file.rst:10
+#: c-api/file.rst:10
msgid ""
"These APIs are a minimal emulation of the Python 2 C API for built-in file "
"objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support "
@@ -33,7 +33,7 @@ msgid ""
"`io` APIs instead."
msgstr ""
-#: ../Doc/c-api/file.rst:22
+#: c-api/file.rst:22
msgid ""
"Create a Python file object from the file descriptor of an already opened "
"file *fd*. The arguments *name*, *encoding*, *errors* and *newline* can be "
@@ -43,18 +43,18 @@ msgid ""
"to the :func:`io.open` function documentation."
msgstr ""
-#: ../Doc/c-api/file.rst:31
+#: c-api/file.rst:31
msgid ""
"Since Python streams have their own buffering layer, mixing them with OS-"
"level file descriptors can produce various issues (such as unexpected "
"ordering of data)."
msgstr ""
-#: ../Doc/c-api/file.rst:35
+#: c-api/file.rst:35
msgid "Ignore *name* attribute."
msgstr ""
-#: ../Doc/c-api/file.rst:41
+#: c-api/file.rst:41
msgid ""
"Return the file descriptor associated with *p* as an :c:expr:`int`. If the "
"object is an integer, its value is returned. If not, the object's :meth:"
@@ -63,7 +63,7 @@ msgid ""
"and returns ``-1`` on failure."
msgstr ""
-#: ../Doc/c-api/file.rst:52
+#: c-api/file.rst:52
msgid ""
"Equivalent to ``p.readline([n])``, this function reads one line from the "
"object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase."
@@ -76,59 +76,79 @@ msgid ""
"is reached immediately."
msgstr ""
-#: ../Doc/c-api/file.rst:65
+#: c-api/file.rst:65
msgid ""
"Overrides the normal behavior of :func:`io.open_code` to pass its parameter "
"through the provided handler."
msgstr ""
-#: ../Doc/c-api/file.rst:68
+#: c-api/file.rst:68
+msgid "The *handler* is a function of type:"
+msgstr ""
+
+#: c-api/file.rst:73
msgid ""
-"The handler is a function of type :c:expr:`PyObject *(\\*)(PyObject *path, "
-"void *userData)`, where *path* is guaranteed to be :c:type:`PyUnicodeObject`."
+"Equivalent of :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`, "
+"where *path* is guaranteed to be :c:type:`PyUnicodeObject`."
msgstr ""
-#: ../Doc/c-api/file.rst:71
+#: c-api/file.rst:77
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 ""
-#: ../Doc/c-api/file.rst:75
+#: c-api/file.rst:81
msgid ""
"As this hook is intentionally used during import, avoid importing new "
"modules during its execution unless they are known to be frozen or available "
"in ``sys.modules``."
msgstr ""
-#: ../Doc/c-api/file.rst:79
+#: c-api/file.rst:85
msgid ""
"Once a hook has been set, it cannot be removed or replaced, and later calls "
"to :c:func:`PyFile_SetOpenCodeHook` will fail. On failure, the function "
"returns -1 and sets an exception if the interpreter has been initialized."
msgstr ""
-#: ../Doc/c-api/file.rst:83
+#: c-api/file.rst:89
msgid "This function is safe to call before :c:func:`Py_Initialize`."
msgstr ""
-#: ../Doc/c-api/file.rst:85
+#: c-api/file.rst:91
msgid ""
"Raises an :ref:`auditing event ` ``setopencodehook`` with no "
"arguments."
msgstr ""
-#: ../Doc/c-api/file.rst:95
+#: c-api/file.rst:101
msgid ""
"Write object *obj* to file object *p*. The only supported flag for *flags* "
-"is :const:`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."
+"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."
msgstr ""
-#: ../Doc/c-api/file.rst:103
+#: c-api/file.rst:109
msgid ""
"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on "
"failure; the appropriate exception will be set."
msgstr ""
+
+#: c-api/file.rst:8
+msgid "object"
+msgstr ""
+
+#: c-api/file.rst:8
+msgid "file"
+msgstr ""
+
+#: c-api/file.rst:50
+msgid "EOFError (built-in exception)"
+msgstr ""
+
+#: c-api/file.rst:99
+msgid "Py_PRINT_RAW (C macro)"
+msgstr ""
diff --git a/c-api/float.po b/c-api/float.po
index e5440ec..c944242 100644
--- a/c-api/float.po
+++ b/c-api/float.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,87 +17,87 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/float.rst:6
+#: c-api/float.rst:6
msgid "Floating Point Objects"
msgstr ""
-#: ../Doc/c-api/float.rst:13
+#: c-api/float.rst:13
msgid ""
"This subtype of :c:type:`PyObject` represents a Python floating point object."
msgstr ""
-#: ../Doc/c-api/float.rst:18
+#: c-api/float.rst:18
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python floating point "
"type. This is the same object as :class:`float` in the Python layer."
msgstr ""
-#: ../Doc/c-api/float.rst:24
+#: c-api/float.rst:24
msgid ""
"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:"
"type:`PyFloatObject`. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/float.rst:30
+#: c-api/float.rst:30
msgid ""
"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype "
"of :c:type:`PyFloatObject`. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/float.rst:36
+#: c-api/float.rst:36
msgid ""
"Create a :c:type:`PyFloatObject` object based on the string value in *str*, "
"or ``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/float.rst:42
+#: c-api/float.rst:42
msgid ""
"Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/float.rst:47
+#: c-api/float.rst:47
msgid ""
"Return a C :c:expr:`double` representation of the contents of *pyfloat*. If "
-"*pyfloat* is not a Python floating point object but has a :meth:`__float__` "
-"method, this method will first be called to convert *pyfloat* into a float. "
-"If ``__float__()`` is not defined then it falls back to :meth:`__index__`. "
-"This method returns ``-1.0`` upon failure, so one should call :c:func:"
-"`PyErr_Occurred` to check for errors."
+"*pyfloat* is not a Python floating point object but has a :meth:`~object."
+"__float__` method, this method will first be called to convert *pyfloat* "
+"into a float. If :meth:`!__float__` is not defined then it falls back to :"
+"meth:`~object.__index__`. This method returns ``-1.0`` upon failure, so one "
+"should call :c:func:`PyErr_Occurred` to check for errors."
msgstr ""
-#: ../Doc/c-api/float.rst:54
-msgid "Use :meth:`__index__` if available."
+#: c-api/float.rst:54
+msgid "Use :meth:`~object.__index__` if available."
msgstr ""
-#: ../Doc/c-api/float.rst:60
+#: c-api/float.rst:60
msgid ""
"Return a C :c:expr:`double` representation of the contents of *pyfloat*, but "
"without error checking."
msgstr ""
-#: ../Doc/c-api/float.rst:66
+#: c-api/float.rst:66
msgid ""
"Return a structseq instance which contains information about the precision, "
"minimum and maximum values of a float. It's a thin wrapper around the header "
"file :file:`float.h`."
msgstr ""
-#: ../Doc/c-api/float.rst:73
+#: c-api/float.rst:73
msgid ""
"Return the maximum representable finite float *DBL_MAX* as C :c:expr:"
"`double`."
msgstr ""
-#: ../Doc/c-api/float.rst:78
+#: c-api/float.rst:78
msgid ""
"Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`."
msgstr ""
-#: ../Doc/c-api/float.rst:82
+#: c-api/float.rst:82
msgid "Pack and Unpack functions"
msgstr ""
-#: ../Doc/c-api/float.rst:84
+#: c-api/float.rst:84
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 "
@@ -106,7 +106,7 @@ msgid ""
"the number of bytes in the bytes string."
msgstr ""
-#: ../Doc/c-api/float.rst:90
+#: 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 "
@@ -118,7 +118,7 @@ msgid ""
"an exception."
msgstr ""
-#: ../Doc/c-api/float.rst:99
+#: c-api/float.rst:99
msgid ""
"On non-IEEE platforms with more precision, or larger dynamic range, than "
"IEEE 754 supports, not all values can be packed; on non-IEEE platforms with "
@@ -126,85 +126,93 @@ msgid ""
"What happens in such cases is partly accidental (alas)."
msgstr ""
-#: ../Doc/c-api/float.rst:107
+#: c-api/float.rst:107
msgid "Pack functions"
msgstr ""
-#: ../Doc/c-api/float.rst:109
+#: c-api/float.rst:109
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:data:`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."
+"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."
msgstr ""
-#: ../Doc/c-api/float.rst:116
+#: c-api/float.rst:116
msgid ""
"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, "
"most likely :exc:`OverflowError`)."
msgstr ""
-#: ../Doc/c-api/float.rst:119
+#: c-api/float.rst:119
msgid "There are two problems on non-IEEE platforms:"
msgstr ""
-#: ../Doc/c-api/float.rst:121
+#: c-api/float.rst:121
msgid "What this does is undefined if *x* is a NaN or infinity."
msgstr ""
-#: ../Doc/c-api/float.rst:122
+#: c-api/float.rst:122
msgid "``-0.0`` and ``+0.0`` produce the same bytes string."
msgstr ""
-#: ../Doc/c-api/float.rst:126
+#: c-api/float.rst:126
msgid "Pack a C double as the IEEE 754 binary16 half-precision format."
msgstr ""
-#: ../Doc/c-api/float.rst:130
+#: c-api/float.rst:130
msgid "Pack a C double as the IEEE 754 binary32 single precision format."
msgstr ""
-#: ../Doc/c-api/float.rst:134
+#: c-api/float.rst:134
msgid "Pack a C double as the IEEE 754 binary64 double precision format."
msgstr ""
-#: ../Doc/c-api/float.rst:138
+#: c-api/float.rst:138
msgid "Unpack functions"
msgstr ""
-#: ../Doc/c-api/float.rst:140
+#: c-api/float.rst:140
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:data:`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 (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."
msgstr ""
-#: ../Doc/c-api/float.rst:147
+#: c-api/float.rst:147
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 ""
-#: ../Doc/c-api/float.rst:151
+#: c-api/float.rst:151
msgid ""
"Note that on a non-IEEE platform this will refuse to unpack a bytes string "
"that represents a NaN or infinity."
msgstr ""
-#: ../Doc/c-api/float.rst:156
+#: c-api/float.rst:156
msgid "Unpack the IEEE 754 binary16 half-precision format as a C double."
msgstr ""
-#: ../Doc/c-api/float.rst:160
+#: c-api/float.rst:160
msgid "Unpack the IEEE 754 binary32 single precision format as a C double."
msgstr ""
-#: ../Doc/c-api/float.rst:164
+#: c-api/float.rst:164
msgid "Unpack the IEEE 754 binary64 double precision format as a C double."
msgstr ""
+
+#: c-api/float.rst:8
+msgid "object"
+msgstr ""
+
+#: c-api/float.rst:8
+msgid "floating point"
+msgstr ""
diff --git a/c-api/frame.po b/c-api/frame.po
index 2abef5f..2bef90e 100644
--- a/c-api/frame.po
+++ b/c-api/frame.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,90 +17,172 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/frame.rst:4
+#: c-api/frame.rst:4
msgid "Frame Objects"
msgstr ""
-#: ../Doc/c-api/frame.rst:8
+#: c-api/frame.rst:8
msgid "The C structure of the objects used to describe frame objects."
msgstr ""
-#: ../Doc/c-api/frame.rst:10
+#: c-api/frame.rst:10
msgid "There are no public members in this structure."
msgstr ""
-#: ../Doc/c-api/frame.rst:12
+#: c-api/frame.rst:12
msgid ""
"The members of this structure were removed from the public C API. Refer to "
"the :ref:`What's New entry ` for details."
msgstr ""
-#: ../Doc/c-api/frame.rst:17
+#: c-api/frame.rst:17
msgid ""
"The :c:func:`PyEval_GetFrame` and :c:func:`PyThreadState_GetFrame` functions "
"can be used to get a frame object."
msgstr ""
-#: ../Doc/c-api/frame.rst:20
+#: c-api/frame.rst:20
msgid "See also :ref:`Reflection `."
msgstr ""
-#: ../Doc/c-api/frame.rst:25
+#: c-api/frame.rst:24
+msgid ""
+"The type of frame objects. It is the same object as :py:class:`types."
+"FrameType` in the Python layer."
+msgstr ""
+
+#: c-api/frame.rst:29
+msgid ""
+"Previously, this type was only available after including ````."
+msgstr ""
+
+#: c-api/frame.rst:34
+msgid "Return non-zero if *obj* is a frame object."
+msgstr ""
+
+#: c-api/frame.rst:38
+msgid ""
+"Previously, this function was only available after including ````."
+msgstr ""
+
+#: c-api/frame.rst:43
msgid "Get the *frame* next outer frame."
msgstr ""
-#: ../Doc/c-api/frame.rst:27
+#: c-api/frame.rst:45
msgid ""
"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer frame."
msgstr ""
-#: ../Doc/c-api/frame.rst:35
-msgid "Get the *frame*'s ``f_builtins`` attribute."
+#: c-api/frame.rst:53
+msgid "Get the *frame*'s :attr:`~frame.f_builtins` attribute."
msgstr ""
-#: ../Doc/c-api/frame.rst:37 ../Doc/c-api/frame.rst:68
+#: c-api/frame.rst:86
msgid "Return a :term:`strong reference`. The result cannot be ``NULL``."
msgstr ""
-#: ../Doc/c-api/frame.rst:44
+#: c-api/frame.rst:62
msgid "Get the *frame* code."
msgstr ""
-#: ../Doc/c-api/frame.rst:46 ../Doc/c-api/frame.rst:86
+#: c-api/frame.rst:130
msgid "Return a :term:`strong reference`."
msgstr ""
-#: ../Doc/c-api/frame.rst:48
+#: c-api/frame.rst:66
msgid "The result (frame code) cannot be ``NULL``."
msgstr ""
-#: ../Doc/c-api/frame.rst:55
+#: c-api/frame.rst:73
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 "
"exception, even if the return value is ``NULL``."
msgstr ""
-#: ../Doc/c-api/frame.rst:59
+#: c-api/frame.rst:77
msgid "Return a :term:`strong reference`, or ``NULL``."
msgstr ""
-#: ../Doc/c-api/frame.rst:66
-msgid "Get the *frame*'s ``f_globals`` attribute."
+#: c-api/frame.rst:84
+msgid "Get the *frame*'s :attr:`~frame.f_globals` attribute."
msgstr ""
-#: ../Doc/c-api/frame.rst:75
-msgid "Get the *frame*'s ``f_lasti`` attribute."
+#: c-api/frame.rst:93
+msgid "Get the *frame*'s :attr:`~frame.f_lasti` attribute."
msgstr ""
-#: ../Doc/c-api/frame.rst:77
+#: c-api/frame.rst:95
msgid "Returns -1 if ``frame.f_lasti`` is ``None``."
msgstr ""
-#: ../Doc/c-api/frame.rst:84
-msgid "Get the *frame*'s ``f_locals`` attribute (:class:`dict`)."
+#: c-api/frame.rst:102
+msgid "Get the variable *name* of *frame*."
msgstr ""
-#: ../Doc/c-api/frame.rst:93
+#: c-api/frame.rst:104
+msgid "Return a :term:`strong reference` to the variable value on success."
+msgstr ""
+
+#: c-api/frame.rst:105
+msgid ""
+"Raise :exc:`NameError` and return ``NULL`` if the variable does not exist."
+msgstr ""
+
+#: c-api/frame.rst:106
+msgid "Raise an exception and return ``NULL`` on error."
+msgstr ""
+
+#: c-api/frame.rst:108
+msgid "*name* type must be a :class:`str`."
+msgstr ""
+
+#: c-api/frame.rst:115
+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
+msgid ""
+"Get the *frame*'s :attr:`~frame.f_locals` attribute. If the frame refers to "
+"an :term:`optimized scope`, this returns a write-through proxy object that "
+"allows modifying the locals. In all other cases (classes, modules, :func:"
+"`exec`, :func:`eval`) it returns the mapping representing the frame locals "
+"directly (as described for :func:`locals`)."
+msgstr ""
+
+#: c-api/frame.rst:134
+msgid "As part of :pep:`667`, return a proxy object for optimized scopes."
+msgstr ""
+
+#: c-api/frame.rst:140
msgid "Return the line number that *frame* is currently executing."
msgstr ""
+
+#: c-api/frame.rst:145
+msgid "Internal Frames"
+msgstr ""
+
+#: c-api/frame.rst:147
+msgid "Unless using :pep:`523`, you will not need this."
+msgstr ""
+
+#: c-api/frame.rst:151
+msgid "The interpreter's internal frame representation."
+msgstr ""
+
+#: c-api/frame.rst:157
+msgid "Return a :term:`strong reference` to the code object for the frame."
+msgstr ""
+
+#: c-api/frame.rst:164
+msgid "Return the byte offset into the last executed instruction."
+msgstr ""
+
+#: c-api/frame.rst:171
+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 1905a8d..8f71c20 100644
--- a/c-api/function.po
+++ b/c-api/function.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,112 +17,213 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/function.rst:6
+#: c-api/function.rst:6
msgid "Function Objects"
msgstr ""
-#: ../Doc/c-api/function.rst:10
+#: c-api/function.rst:10
msgid "There are a few functions specific to Python functions."
msgstr ""
-#: ../Doc/c-api/function.rst:15
+#: c-api/function.rst:15
msgid "The C structure used for functions."
msgstr ""
-#: ../Doc/c-api/function.rst:22
+#: c-api/function.rst:22
msgid ""
"This is an instance of :c:type:`PyTypeObject` and represents the Python "
"function type. It is exposed to Python programmers as ``types."
"FunctionType``."
msgstr ""
-#: ../Doc/c-api/function.rst:28
+#: c-api/function.rst:28
msgid ""
"Return true if *o* is a function object (has type :c:data:"
"`PyFunction_Type`). The parameter must not be ``NULL``. This function "
"always succeeds."
msgstr ""
-#: ../Doc/c-api/function.rst:34
+#: c-api/function.rst:34
msgid ""
"Return a new function object associated with the code object *code*. "
"*globals* must be a dictionary with the global variables accessible to the "
"function."
msgstr ""
-#: ../Doc/c-api/function.rst:37
+#: c-api/function.rst:37
msgid ""
-"The function's docstring and name are retrieved from the code object. "
-"*__module__* is retrieved from *globals*. The argument defaults, annotations "
-"and closure are set to ``NULL``. *__qualname__* is set to the same value as "
-"the code object's ``co_qualname`` field."
+"The function's docstring and name are retrieved from the code object. :attr:"
+"`~function.__module__` is retrieved from *globals*. The argument defaults, "
+"annotations and closure are set to ``NULL``. :attr:`~function.__qualname__` "
+"is set to the same value as the code object's :attr:`~codeobject."
+"co_qualname` field."
msgstr ""
-#: ../Doc/c-api/function.rst:45
+#: c-api/function.rst:46
msgid ""
-"As :c:func:`PyFunction_New`, but also allows setting the function object's "
-"``__qualname__`` attribute. *qualname* should be a unicode object or "
-"``NULL``; if ``NULL``, the ``__qualname__`` attribute is set to the same "
-"value as the code object's ``co_qualname`` field."
+"As :c:func:`PyFunction_New`, but also allows setting the function object's :"
+"attr:`~function.__qualname__` attribute. *qualname* should be a unicode "
+"object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute is set "
+"to the same value as the code object's :attr:`~codeobject.co_qualname` field."
msgstr ""
-#: ../Doc/c-api/function.rst:55
+#: c-api/function.rst:57
msgid "Return the code object associated with the function object *op*."
msgstr ""
-#: ../Doc/c-api/function.rst:60
+#: c-api/function.rst:62
msgid "Return the globals dictionary associated with the function object *op*."
msgstr ""
-#: ../Doc/c-api/function.rst:65
+#: c-api/function.rst:67
msgid ""
-"Return a :term:`borrowed reference` to the *__module__* attribute of the "
-"function object *op*. It can be *NULL*."
+"Return a :term:`borrowed reference` to the :attr:`~function.__module__` "
+"attribute of the :ref:`function object ` *op*. It can be "
+"*NULL*."
msgstr ""
-#: ../Doc/c-api/function.rst:68
+#: c-api/function.rst:71
msgid ""
-"This is normally a string containing the module name, but can be set to any "
-"other object by Python code."
+"This is normally a :class:`string ` containing the module name, but can "
+"be set to any other object by Python code."
msgstr ""
-#: ../Doc/c-api/function.rst:74
+#: c-api/function.rst:77
msgid ""
"Return the argument default values of the function object *op*. This can be "
"a tuple of arguments or ``NULL``."
msgstr ""
-#: ../Doc/c-api/function.rst:80
+#: c-api/function.rst:83
msgid ""
"Set the argument default values for the function object *op*. *defaults* "
"must be ``Py_None`` or a tuple."
msgstr ""
-#: ../Doc/c-api/function.rst:83 ../Doc/c-api/function.rst:97
-#: ../Doc/c-api/function.rst:111
+#: c-api/function.rst:109 c-api/function.rst:123
msgid "Raises :exc:`SystemError` and returns ``-1`` on failure."
msgstr ""
-#: ../Doc/c-api/function.rst:88
+#: c-api/function.rst:91
+msgid "Set the vectorcall field of a given function object *func*."
+msgstr ""
+
+#: c-api/function.rst:93
+msgid ""
+"Warning: extensions using this API must preserve the behavior of the "
+"unaltered (default) vectorcall function!"
+msgstr ""
+
+#: c-api/function.rst:100
msgid ""
"Return the closure associated with the function object *op*. This can be "
"``NULL`` or a tuple of cell objects."
msgstr ""
-#: ../Doc/c-api/function.rst:94
+#: c-api/function.rst:106
msgid ""
"Set the closure associated with the function object *op*. *closure* must be "
"``Py_None`` or a tuple of cell objects."
msgstr ""
-#: ../Doc/c-api/function.rst:102
+#: c-api/function.rst:114
msgid ""
"Return the annotations of the function object *op*. This can be a mutable "
"dictionary or ``NULL``."
msgstr ""
-#: ../Doc/c-api/function.rst:108
+#: c-api/function.rst:120
msgid ""
"Set the annotations for the function object *op*. *annotations* must be a "
"dictionary or ``Py_None``."
msgstr ""
+
+#: c-api/function.rst:128
+msgid ""
+"Register *callback* as a function watcher for the current interpreter. "
+"Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In "
+"case of error (e.g. no more watcher IDs available), return ``-1`` and set an "
+"exception."
+msgstr ""
+
+#: c-api/function.rst:138
+msgid ""
+"Clear watcher identified by *watcher_id* previously returned from :c:func:"
+"`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on "
+"success, or ``-1`` and set an exception on error (e.g. if the given "
+"*watcher_id* was never registered.)"
+msgstr ""
+
+#: c-api/function.rst:148
+msgid ""
+"Enumeration of possible function watcher events: - "
+"``PyFunction_EVENT_CREATE`` - ``PyFunction_EVENT_DESTROY`` - "
+"``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - "
+"``PyFunction_EVENT_MODIFY_KWDEFAULTS``"
+msgstr ""
+
+#: c-api/function.rst:160
+msgid "Type of a function watcher callback function."
+msgstr ""
+
+#: c-api/function.rst:162
+msgid ""
+"If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` "
+"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a :term:"
+"`borrowed reference` to the new value that is about to be stored in *func* "
+"for the attribute that is being modified."
+msgstr ""
+
+#: c-api/function.rst:167
+msgid ""
+"The callback may inspect but must not modify *func*; doing so could have "
+"unpredictable effects, including infinite recursion."
+msgstr ""
+
+#: c-api/function.rst:170
+msgid ""
+"If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked "
+"after `func` has been fully initialized. Otherwise, the callback is invoked "
+"before the modification to *func* takes place, so the prior state of *func* "
+"can be inspected. The runtime is permitted to optimize away the creation of "
+"function objects when possible. In such cases no event will be emitted. "
+"Although this creates the possibility of an observable difference of runtime "
+"behavior depending on optimization decisions, it does not change the "
+"semantics of the Python code being executed."
+msgstr ""
+
+#: c-api/function.rst:179
+msgid ""
+"If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the "
+"callback to the about-to-be-destroyed function will resurrect it, preventing "
+"it from being freed at this time. When the resurrected object is destroyed "
+"later, any watcher callbacks active at that time will be called again."
+msgstr ""
+
+#: c-api/function.rst:184
+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:188
+msgid ""
+"There may already be a pending exception set on entry to the callback. In "
+"this case, the callback should return ``0`` with the same exception still "
+"set. This means the callback may not call any other API that can set an "
+"exception unless it saves and clears the exception state first, and restores "
+"it before returning."
+msgstr ""
+
+#: c-api/function.rst:8
+msgid "object"
+msgstr ""
+
+#: c-api/function.rst:8
+msgid "function"
+msgstr ""
+
+#: c-api/function.rst:20
+msgid "MethodType (in module types)"
+msgstr ""
diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po
index 6b9c3a5..12b0103 100644
--- a/c-api/gcsupport.po
+++ b/c-api/gcsupport.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/gcsupport.rst:6
+#: c-api/gcsupport.rst:6
msgid "Supporting Cyclic Garbage Collection"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:8
+#: c-api/gcsupport.rst:8
msgid ""
"Python's support for detecting and collecting garbage which involves "
"circular references requires support from object types which are "
@@ -31,63 +31,67 @@ msgid ""
"explicit support for garbage collection."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:15
+#: c-api/gcsupport.rst:15
msgid ""
"To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of "
-"the type object must include the :const:`Py_TPFLAGS_HAVE_GC` and provide an "
-"implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If "
+"the type object must include the :c:macro:`Py_TPFLAGS_HAVE_GC` and provide "
+"an implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If "
"instances of the type are mutable, a :c:member:`~PyTypeObject.tp_clear` "
"implementation must also be provided."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:24
+#: c-api/gcsupport.rst:21
+msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`"
+msgstr ""
+
+#: c-api/gcsupport.rst:22
msgid ""
"Objects with a type with this flag set must conform with the rules "
"documented here. For convenience these objects will be referred to as "
"container objects."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:28
+#: c-api/gcsupport.rst:26
msgid "Constructors for container types must conform to two rules:"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:30
+#: c-api/gcsupport.rst:28
msgid ""
-"The memory for the object must be allocated using :c:func:`PyObject_GC_New` "
-"or :c:func:`PyObject_GC_NewVar`."
+"The memory for the object must be allocated using :c:macro:`PyObject_GC_New` "
+"or :c:macro:`PyObject_GC_NewVar`."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:33
+#: c-api/gcsupport.rst:31
msgid ""
"Once all the fields which may contain references to other containers are "
"initialized, it must call :c:func:`PyObject_GC_Track`."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:36
+#: c-api/gcsupport.rst:34
msgid ""
"Similarly, the deallocator for the object must conform to a similar pair of "
"rules:"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:39
+#: c-api/gcsupport.rst:37
msgid ""
"Before fields which refer to other containers are invalidated, :c:func:"
"`PyObject_GC_UnTrack` must be called."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:42
+#: c-api/gcsupport.rst:40
msgid ""
"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:45
+#: c-api/gcsupport.rst:43
msgid ""
"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :"
"c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its "
"subclass or subclasses."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:49
+#: c-api/gcsupport.rst:47
msgid ""
"When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call "
"it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the "
@@ -95,29 +99,57 @@ msgid ""
"tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:"
"`~PyTypeObject.tp_clear` fields if the type inherits from a class that "
"implements the garbage collector protocol and the child class does *not* "
-"include the :const:`Py_TPFLAGS_HAVE_GC` flag."
+"include the :c:macro:`Py_TPFLAGS_HAVE_GC` flag."
+msgstr ""
+
+#: c-api/gcsupport.rst:57
+msgid ""
+"Analogous to :c:macro:`PyObject_New` but for container objects with the :c:"
+"macro:`Py_TPFLAGS_HAVE_GC` flag set."
+msgstr ""
+
+#: c-api/gcsupport.rst:62
+msgid ""
+"Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :"
+"c:macro:`Py_TPFLAGS_HAVE_GC` flag set."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:59
+#: c-api/gcsupport.rst:67
msgid ""
-"Analogous to :c:func:`PyObject_New` but for container objects with the :"
-"const:`Py_TPFLAGS_HAVE_GC` flag set."
+"Analogous to :c:macro:`PyObject_GC_New` but allocates *extra_size* bytes at "
+"the end of the object (at offset :c:member:`~PyTypeObject.tp_basicsize`). "
+"The allocated memory is initialized to zeros, except for the :c:type:`Python "
+"object header `."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:65
+#: c-api/gcsupport.rst:73
msgid ""
-"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :"
-"const:`Py_TPFLAGS_HAVE_GC` flag set."
+"The extra data will be deallocated with the object, but otherwise it is not "
+"managed by Python."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:71
+#: c-api/gcsupport.rst:77
msgid ""
-"Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the "
-"resized object or ``NULL`` on failure. *op* must not be tracked by the "
-"collector yet."
+"The function is marked as unstable because the final mechanism for reserving "
+"extra data after an instance is not yet decided. For allocating a variable "
+"number of fields, prefer using :c:type:`PyVarObject` and :c:member:"
+"`~PyTypeObject.tp_itemsize` instead."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:77
+#: c-api/gcsupport.rst:88
+msgid ""
+"Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the "
+"resized object of type ``TYPE*`` (refers to any C type) or ``NULL`` on "
+"failure."
+msgstr ""
+
+#: c-api/gcsupport.rst:92
+msgid ""
+"*op* must be of type :c:expr:`PyVarObject *` and must not be tracked by the "
+"collector yet. *newsize* must be of type :c:type:`Py_ssize_t`."
+msgstr ""
+
+#: c-api/gcsupport.rst:99
msgid ""
"Adds the object *op* to the set of container objects tracked by the "
"collector. The collector can run at unexpected times so objects must be "
@@ -126,45 +158,45 @@ msgid ""
"usually near the end of the constructor."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:86
+#: c-api/gcsupport.rst:108
msgid ""
"Returns non-zero if the object implements the garbage collector protocol, "
"otherwise returns 0."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:89
+#: c-api/gcsupport.rst:111
msgid ""
"The object cannot be tracked by the garbage collector if this function "
"returns 0."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:94
+#: c-api/gcsupport.rst:116
msgid ""
"Returns 1 if the object type of *op* implements the GC protocol and *op* is "
"being currently tracked by the garbage collector and 0 otherwise."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:97
+#: c-api/gcsupport.rst:119
msgid "This is analogous to the Python function :func:`gc.is_tracked`."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:104
+#: c-api/gcsupport.rst:126
msgid ""
"Returns 1 if the object type of *op* implements the GC protocol and *op* has "
"been already finalized by the garbage collector and 0 otherwise."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:107
+#: c-api/gcsupport.rst:129
msgid "This is analogous to the Python function :func:`gc.is_finalized`."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:114
+#: c-api/gcsupport.rst:136
msgid ""
-"Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:"
-"func:`PyObject_GC_NewVar`."
+"Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :"
+"c:macro:`PyObject_GC_NewVar`."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:120
+#: c-api/gcsupport.rst:142
msgid ""
"Remove the object *op* from the set of container objects tracked by the "
"collector. Note that :c:func:`PyObject_GC_Track` can be called again on "
@@ -174,19 +206,19 @@ msgid ""
"handler become invalid."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:129
+#: c-api/gcsupport.rst:151
msgid ""
-"The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros "
+"The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros "
"have been removed from the public C API."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:132
+#: c-api/gcsupport.rst:154
msgid ""
"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function "
"parameter of this type:"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:137
+#: c-api/gcsupport.rst:159
msgid ""
"Type of the visitor function passed to the :c:member:`~PyTypeObject."
"tp_traverse` handler. The function should be called with an object to "
@@ -196,13 +228,13 @@ msgid ""
"users will need to write their own visitor functions."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:144
+#: c-api/gcsupport.rst:166
msgid ""
"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following "
"type:"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:149
+#: c-api/gcsupport.rst:171
msgid ""
"Traversal function for a container object. Implementations must call the "
"*visit* function for each object directly contained by *self*, with the "
@@ -212,7 +244,7 @@ msgid ""
"returned immediately."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:156
+#: c-api/gcsupport.rst:178
msgid ""
"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:"
"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:"
@@ -220,20 +252,20 @@ msgid ""
"exactly *visit* and *arg*:"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:163
+#: c-api/gcsupport.rst:185
msgid ""
"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and "
"*arg*. If *visit* returns a non-zero value, then return it. Using this "
"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:176
+#: c-api/gcsupport.rst:198
msgid ""
"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:"
"`inquiry` type, or ``NULL`` if the object is immutable."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:182
+#: c-api/gcsupport.rst:204
msgid ""
"Drop references that may have created reference cycles. Immutable objects "
"do not have to define this method since they can never directly create "
@@ -243,23 +275,23 @@ msgid ""
"in a reference cycle."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:191
+#: c-api/gcsupport.rst:213
msgid "Controlling the Garbage Collector State"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:193
+#: c-api/gcsupport.rst:215
msgid ""
"The C-API provides the following functions for controlling garbage "
"collection runs."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:198
+#: c-api/gcsupport.rst:220
msgid ""
"Perform a full garbage collection, if the garbage collector is enabled. "
"(Note that :func:`gc.collect` runs it unconditionally.)"
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:201
+#: c-api/gcsupport.rst:223
msgid ""
"Returns the number of collected + unreachable objects which cannot be "
"collected. If the garbage collector is disabled or already collecting, "
@@ -267,20 +299,58 @@ msgid ""
"data:`sys.unraisablehook`. This function does not raise exceptions."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:211
+#: c-api/gcsupport.rst:233
msgid ""
"Enable the garbage collector: similar to :func:`gc.enable`. Returns the "
"previous state, 0 for disabled and 1 for enabled."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:219
+#: c-api/gcsupport.rst:241
msgid ""
"Disable the garbage collector: similar to :func:`gc.disable`. Returns the "
"previous state, 0 for disabled and 1 for enabled."
msgstr ""
-#: ../Doc/c-api/gcsupport.rst:227
+#: c-api/gcsupport.rst:249
msgid ""
"Query the state of the garbage collector: similar to :func:`gc.isenabled`. "
"Returns the current state, 0 for disabled and 1 for enabled."
msgstr ""
+
+#: c-api/gcsupport.rst:256
+msgid "Querying Garbage Collector State"
+msgstr ""
+
+#: c-api/gcsupport.rst:258
+msgid ""
+"The C-API provides the following interface for querying information about "
+"the garbage collector."
+msgstr ""
+
+#: c-api/gcsupport.rst:263
+msgid ""
+"Run supplied *callback* on all live GC-capable objects. *arg* is passed "
+"through to all invocations of *callback*."
+msgstr ""
+
+#: c-api/gcsupport.rst:267
+msgid ""
+"If new objects are (de)allocated by the callback it is undefined if they "
+"will be visited."
+msgstr ""
+
+#: c-api/gcsupport.rst:270
+msgid ""
+"Garbage collection is disabled during operation. Explicitly running a "
+"collection in the callback may lead to undefined behaviour e.g. visiting the "
+"same objects multiple times or not at all."
+msgstr ""
+
+#: c-api/gcsupport.rst:278
+msgid ""
+"Type of the visitor function to be passed to :c:func:"
+"`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to "
+"``PyUnstable_GC_VisitObjects``. Return ``0`` to continue iteration, return "
+"``1`` to stop iteration. Other return values are reserved for now so "
+"behavior on returning anything else is undefined."
+msgstr ""
diff --git a/c-api/gen.po b/c-api/gen.po
index adf3334..7f4f490 100644
--- a/c-api/gen.po
+++ b/c-api/gen.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/gen.rst:6
+#: c-api/gen.rst:6
msgid "Generator Objects"
msgstr ""
-#: ../Doc/c-api/gen.rst:8
+#: c-api/gen.rst:8
msgid ""
"Generator objects are what Python uses to implement generator iterators. "
"They are normally created by iterating over a function that yields values, "
@@ -29,34 +29,34 @@ msgid ""
"`PyGen_NewWithQualName`."
msgstr ""
-#: ../Doc/c-api/gen.rst:15
+#: c-api/gen.rst:15
msgid "The C structure used for generator objects."
msgstr ""
-#: ../Doc/c-api/gen.rst:20
+#: c-api/gen.rst:20
msgid "The type object corresponding to generator objects."
msgstr ""
-#: ../Doc/c-api/gen.rst:25
+#: c-api/gen.rst:25
msgid ""
"Return true if *ob* is a generator object; *ob* must not be ``NULL``. This "
"function always succeeds."
msgstr ""
-#: ../Doc/c-api/gen.rst:31
+#: c-api/gen.rst:31
msgid ""
"Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be "
"``NULL``. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/gen.rst:37
+#: c-api/gen.rst:37
msgid ""
"Create and return a new generator object based on the *frame* object. A "
"reference to *frame* is stolen by this function. The argument must not be "
"``NULL``."
msgstr ""
-#: ../Doc/c-api/gen.rst:43
+#: c-api/gen.rst:43
msgid ""
"Create and return a new generator object based on the *frame* object, with "
"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference "
diff --git a/c-api/hash.po b/c-api/hash.po
new file mode 100644
index 0000000..78b4566
--- /dev/null
+++ b/c-api/hash.po
@@ -0,0 +1,97 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2001-2024, Python Software Foundation
+# This file is distributed under the same license as the Python package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: Python 3.12\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-05-30 08:10+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/hash.rst:4
+msgid "PyHash API"
+msgstr ""
+
+#: c-api/hash.rst:6
+msgid ""
+"See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`."
+msgstr ""
+
+#: c-api/hash.rst:10
+msgid "Hash value type: signed integer."
+msgstr ""
+
+#: c-api/hash.rst:16
+msgid "Hash value type: unsigned integer."
+msgstr ""
+
+#: c-api/hash.rst:22
+msgid ""
+"The `Mersenne prime `_ ``P = "
+"2**n -1``, used for numeric hash scheme."
+msgstr ""
+
+#: c-api/hash.rst:28
+msgid "The exponent ``n`` of ``P`` in :c:macro:`PyHASH_MODULUS`."
+msgstr ""
+
+#: c-api/hash.rst:34
+msgid "The hash value returned for a positive infinity."
+msgstr ""
+
+#: c-api/hash.rst:40
+msgid "The multiplier used for the imaginary part of a complex number."
+msgstr ""
+
+#: c-api/hash.rst:46
+msgid "Hash function definition used by :c:func:`PyHash_GetFuncDef`."
+msgstr ""
+
+#: c-api/hash.rst:54
+msgid "Hash function name (UTF-8 encoded string)."
+msgstr ""
+
+#: c-api/hash.rst:58
+msgid "Internal size of the hash value in bits."
+msgstr ""
+
+#: c-api/hash.rst:62
+msgid "Size of seed input in bits."
+msgstr ""
+
+#: c-api/hash.rst:69
+msgid "Get the hash function definition."
+msgstr ""
+
+#: c-api/hash.rst:72
+msgid ":pep:`456` \"Secure and interchangeable hash algorithm\"."
+msgstr ""
+
+#: c-api/hash.rst:79
+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:82
+msgid "The function cannot fail: it cannot return ``-1``."
+msgstr ""
+
+#: c-api/hash.rst:88
+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:93
+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 c80514d..7bb2e2e 100644
--- a/c-api/import.po
+++ b/c-api/import.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,34 +17,21 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/import.rst:6
+#: c-api/import.rst:6
msgid "Importing Modules"
msgstr ""
-#: ../Doc/c-api/import.rst:16
+#: c-api/import.rst:16
msgid ""
-"This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below, "
-"leaving the *globals* and *locals* arguments set to ``NULL`` and *level* set "
-"to 0. When the *name* argument contains a dot (when it specifies a "
-"submodule of a package), the *fromlist* argument is set to the list "
-"``['*']`` so that the return value is the named module rather than the top-"
-"level package containing it as would otherwise be the case. (Unfortunately, "
-"this has an additional side effect when *name* in fact specifies a "
-"subpackage instead of a submodule: the submodules specified in the package's "
-"``__all__`` variable are loaded.) Return a new reference to the imported "
-"module, or ``NULL`` with an exception set on failure. A failing import of a "
-"module doesn't leave the module in :data:`sys.modules`."
+"This is a wrapper around :c:func:`PyImport_Import()` which takes a :c:expr:"
+"`const char *` as an argument instead of a :c:expr:`PyObject *`."
msgstr ""
-#: ../Doc/c-api/import.rst:28 ../Doc/c-api/import.rst:89
-msgid "This function always uses absolute imports."
-msgstr ""
-
-#: ../Doc/c-api/import.rst:33
+#: c-api/import.rst:21
msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`."
msgstr ""
-#: ../Doc/c-api/import.rst:35
+#: 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-"
@@ -52,13 +39,17 @@ msgid ""
"needed anymore."
msgstr ""
-#: ../Doc/c-api/import.rst:46
+#: c-api/import.rst:30
+msgid "Use :c:func:`PyImport_ImportModule` instead."
+msgstr ""
+
+#: c-api/import.rst:37
msgid ""
"Import a module. This is best described by referring to the built-in Python "
"function :func:`__import__`."
msgstr ""
-#: ../Doc/c-api/import.rst:49 ../Doc/c-api/import.rst:65
+#: c-api/import.rst:56
msgid ""
"The return value is a new reference to the imported module or top-level "
"package, or ``NULL`` with an exception set on failure. Like for :func:"
@@ -66,30 +57,30 @@ msgid ""
"is normally the top-level package, unless a non-empty *fromlist* was given."
msgstr ""
-#: ../Doc/c-api/import.rst:55
+#: c-api/import.rst:46
msgid ""
"Failing imports remove incomplete module objects, like with :c:func:"
"`PyImport_ImportModule`."
msgstr ""
-#: ../Doc/c-api/import.rst:61
+#: c-api/import.rst:52
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 ""
-#: ../Doc/c-api/import.rst:75
+#: c-api/import.rst:66
msgid ""
"Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a "
"UTF-8 encoded string instead of a Unicode object."
msgstr ""
-#: ../Doc/c-api/import.rst:78
+#: c-api/import.rst:69
msgid "Negative values for *level* are no longer accepted."
msgstr ""
-#: ../Doc/c-api/import.rst:83
+#: c-api/import.rst:74
msgid ""
"This is a higher-level interface that calls the current \"import hook "
"function\" (with an explicit *level* of 0, meaning absolute import). It "
@@ -98,99 +89,135 @@ msgid ""
"hooks are installed in the current environment."
msgstr ""
-#: ../Doc/c-api/import.rst:94
+#: c-api/import.rst:80
+msgid "This function always uses absolute imports."
+msgstr ""
+
+#: c-api/import.rst:85
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 ""
-#: ../Doc/c-api/import.rst:100
+#: c-api/import.rst:91
+msgid "Return the module object corresponding to a module name."
+msgstr ""
+
+#: c-api/import.rst:93
+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
msgid ""
-"Return the module object corresponding to a module name. 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. Return ``NULL`` with an exception set on failure."
+"Return a :term:`strong reference` to the module on success. Return ``NULL`` "
+"with an exception set on failure."
+msgstr ""
+
+#: c-api/import.rst:100
+msgid "The module name *name* is decoded from UTF-8."
msgstr ""
-#: ../Doc/c-api/import.rst:107
+#: c-api/import.rst:102
msgid ""
"This function does not load or import the module; if the module wasn't "
"already loaded, you will get an empty module object. Use :c:func:"
-"`PyImport_ImportModule` or one of its variants to import a module. Package "
+"`PyImport_ImportModule` or one of its variants to import a module. Package "
"structures implied by a dotted name for *name* are not created if not "
"already present."
msgstr ""
-#: ../Doc/c-api/import.rst:117
+#: c-api/import.rst:113
+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
msgid ""
-"Similar to :c:func:`PyImport_AddModuleObject`, but the name is a UTF-8 "
-"encoded string instead of a Unicode object."
+"Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed "
+"reference`."
msgstr ""
-#: ../Doc/c-api/import.rst:125
+#: c-api/import.rst:129
msgid ""
"Given a module name (possibly of the form ``package.module``) and a code "
"object read from a Python bytecode file or obtained from the built-in "
"function :func:`compile`, load the module. Return a new reference to the "
"module object, or ``NULL`` with an exception set if an error occurred. "
-"*name* is removed from :attr:`sys.modules` in error cases, even if *name* "
-"was already in :attr:`sys.modules` on entry to :c:func:"
+"*name* is removed from :data:`sys.modules` in error cases, even if *name* "
+"was already in :data:`sys.modules` on entry to :c:func:"
"`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :"
-"attr:`sys.modules` is dangerous, as imports of such modules have no way to "
+"data:`sys.modules` is dangerous, as imports of such modules have no way to "
"know that the module object is an unknown (and probably damaged with respect "
"to the module author's intents) state."
msgstr ""
-#: ../Doc/c-api/import.rst:135
+#: c-api/import.rst:139
msgid ""
"The module's :attr:`__spec__` and :attr:`__loader__` will be set, if not set "
"already, with the appropriate values. The spec's loader will be set to the "
-"module's ``__loader__`` (if set) and to an instance of :class:"
-"`SourceFileLoader` otherwise."
+"module's ``__loader__`` (if set) and to an instance of :class:`~importlib."
+"machinery.SourceFileLoader` otherwise."
msgstr ""
-#: ../Doc/c-api/import.rst:140
+#: c-api/import.rst:144
msgid ""
-"The module's :attr:`__file__` attribute will be set to the code object's :c:"
-"member:`co_filename`. If applicable, :attr:`__cached__` will also be set."
+"The module's :attr:`__file__` attribute will be set to the code object's :"
+"attr:`~codeobject.co_filename`. If applicable, :attr:`__cached__` will also "
+"be set."
msgstr ""
-#: ../Doc/c-api/import.rst:144
+#: c-api/import.rst:148
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 ""
-#: ../Doc/c-api/import.rst:147
+#: c-api/import.rst:151
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 ""
-#: ../Doc/c-api/import.rst:150
+#: c-api/import.rst:154
msgid ""
"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:"
"`PyImport_ExecCodeModuleWithPathnames`."
msgstr ""
-#: ../Doc/c-api/import.rst:156
+#: c-api/import.rst:157
+msgid ""
+"The setting of :attr:`__cached__` and :attr:`__loader__` is deprecated. See :"
+"class:`~importlib.machinery.ModuleSpec` for alternatives."
+msgstr ""
+
+#: c-api/import.rst:165
msgid ""
"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute "
"of the module object is set to *pathname* if it is non-``NULL``."
msgstr ""
-#: ../Doc/c-api/import.rst:159
+#: c-api/import.rst:168
msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`."
msgstr ""
-#: ../Doc/c-api/import.rst:164
+#: c-api/import.rst:173
msgid ""
"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__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."
msgstr ""
-#: ../Doc/c-api/import.rst:173
+#: c-api/import.rst:179
+msgid ""
+"Setting :attr:`__cached__` is deprecated. See :class:`~importlib.machinery."
+"ModuleSpec` for alternatives."
+msgstr ""
+
+#: c-api/import.rst:186
msgid ""
"Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and "
"*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out "
@@ -198,46 +225,50 @@ msgid ""
"set to ``NULL``."
msgstr ""
-#: ../Doc/c-api/import.rst:179
+#: c-api/import.rst:192
msgid ""
-"Uses :func:`imp.source_from_cache()` in calculating the source path if only "
+"Uses :func:`!imp.source_from_cache()` in calculating the source path if only "
"the bytecode path is provided."
msgstr ""
-#: ../Doc/c-api/import.rst:186
+#: c-api/import.rst:195
+msgid "No longer uses the removed :mod:`!imp` module."
+msgstr ""
+
+#: c-api/import.rst:201
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 ""
-#: ../Doc/c-api/import.rst:190
+#: c-api/import.rst:205
msgid "Return value of ``-1`` upon failure."
msgstr ""
-#: ../Doc/c-api/import.rst:196
+#: c-api/import.rst:211
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 ""
-#: ../Doc/c-api/import.rst:204
+#: c-api/import.rst:219
msgid ""
"Return the dictionary used for the module administration (a.k.a. ``sys."
"modules``). Note that this is a per-interpreter variable."
msgstr ""
-#: ../Doc/c-api/import.rst:209
+#: c-api/import.rst:224
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 ""
-#: ../Doc/c-api/import.rst:217
+#: c-api/import.rst:232
msgid ""
-"Return a finder object for a :data:`sys.path`/:attr:`pkg.__path__` item "
+"Return a finder object for a :data:`sys.path`/:attr:`!pkg.__path__` item "
"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` "
"dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook "
"is found that can handle the path item. Return ``None`` if no hook could; "
@@ -246,7 +277,7 @@ msgid ""
"path_importer_cache`. Return a new reference to the finder object."
msgstr ""
-#: ../Doc/c-api/import.rst:228
+#: c-api/import.rst:243
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 "
@@ -255,17 +286,17 @@ msgid ""
"the module if it was already imported.)"
msgstr ""
-#: ../Doc/c-api/import.rst:236
+#: c-api/import.rst:251
msgid "The ``__file__`` attribute is no longer set on the module."
msgstr ""
-#: ../Doc/c-api/import.rst:242
+#: c-api/import.rst:257
msgid ""
"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a "
"UTF-8 encoded string instead of a Unicode object."
msgstr ""
-#: ../Doc/c-api/import.rst:250
+#: c-api/import.rst:265
msgid ""
"This is the structure type definition for frozen module descriptors, as "
"generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the "
@@ -273,13 +304,13 @@ msgid ""
"h`, is::"
msgstr ""
-#: ../Doc/c-api/import.rst:262
+#: c-api/import.rst:277
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 ""
-#: ../Doc/c-api/import.rst:268
+#: c-api/import.rst:283
msgid ""
"This pointer is initialized to point to an array of :c:struct:`_frozen` "
"records, terminated by one whose members are all ``NULL`` or zero. When a "
@@ -288,7 +319,7 @@ msgid ""
"frozen modules."
msgstr ""
-#: ../Doc/c-api/import.rst:276
+#: c-api/import.rst:291
msgid ""
"Add a single module to the existing table of built-in modules. This is a "
"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning "
@@ -298,30 +329,68 @@ msgid ""
"before :c:func:`Py_Initialize`."
msgstr ""
-#: ../Doc/c-api/import.rst:286
+#: c-api/import.rst:301
msgid ""
-"Structure describing a single entry in the list of built-in modules. Each "
-"of these structures gives the name and initialization function for a module "
-"built into the interpreter. The name is an ASCII encoded string. Programs "
-"which embed Python may use an array of these structures in conjunction with :"
-"c:func:`PyImport_ExtendInittab` to provide additional built-in modules. The "
-"structure is defined in :file:`Include/import.h` as::"
+"Structure describing a single entry in the list of built-in modules. "
+"Programs which embed Python may use an array of these structures in "
+"conjunction with :c:func:`PyImport_ExtendInittab` to provide additional "
+"built-in modules. The structure consists of two members:"
+msgstr ""
+
+#: c-api/import.rst:309
+msgid "The module name, as an ASCII encoded string."
+msgstr ""
+
+#: c-api/import.rst:313
+msgid "Initialization function for a module built into the interpreter."
msgstr ""
-#: ../Doc/c-api/import.rst:301
+#: c-api/import.rst:318
msgid ""
"Add a collection of modules to the table of built-in modules. The *newtab* "
-"array must end with a sentinel entry which contains ``NULL`` for the :attr:"
-"`name` field; failure to provide the sentinel value can result in a memory "
-"fault. Returns ``0`` on success or ``-1`` if insufficient memory could be "
-"allocated to extend the internal table. In the event of failure, no modules "
-"are added to the internal table. This must be called before :c:func:"
-"`Py_Initialize`."
+"array must end with a sentinel entry which contains ``NULL`` for the :c:"
+"member:`~_inittab.name` field; failure to provide the sentinel value can "
+"result in a memory fault. Returns ``0`` on success or ``-1`` if insufficient "
+"memory could be allocated to extend the internal table. In the event of "
+"failure, no modules are added to the internal table. This must be called "
+"before :c:func:`Py_Initialize`."
msgstr ""
-#: ../Doc/c-api/import.rst:308
+#: c-api/import.rst:325
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:11
+msgid "package variable"
+msgstr ""
+
+#: c-api/import.rst:11
+msgid "__all__"
+msgstr ""
+
+#: c-api/import.rst:11
+msgid "__all__ (package variable)"
+msgstr ""
+
+#: c-api/import.rst:11
+msgid "modules (in module sys)"
+msgstr ""
+
+#: c-api/import.rst:127
+msgid "built-in function"
+msgstr ""
+
+#: c-api/import.rst:35
+msgid "__import__"
+msgstr ""
+
+#: c-api/import.rst:127
+msgid "compile"
+msgstr ""
+
+#: c-api/import.rst:263
+msgid "freeze utility"
+msgstr ""
diff --git a/c-api/index.po b/c-api/index.po
index fac794b..9e9825a 100644
--- a/c-api/index.po
+++ b/c-api/index.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/index.rst:5
+#: c-api/index.rst:5
msgid "Python/C API Reference Manual"
msgstr ""
-#: ../Doc/c-api/index.rst:7
+#: c-api/index.rst:7
msgid ""
"This manual documents the API used by C and C++ programmers who want to "
"write extension modules or embed Python. It is a companion to :ref:"
diff --git a/c-api/init.po b/c-api/init.po
index ff3db1d..2d4287e 100644
--- a/c-api/init.po
+++ b/c-api/init.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,19 +17,19 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/init.rst:8
+#: c-api/init.rst:8
msgid "Initialization, Finalization, and Threads"
msgstr ""
-#: ../Doc/c-api/init.rst:10
+#: c-api/init.rst:10
msgid "See also :ref:`Python Initialization Configuration `."
msgstr ""
-#: ../Doc/c-api/init.rst:15
+#: c-api/init.rst:15
msgid "Before Python Initialization"
msgstr ""
-#: ../Doc/c-api/init.rst:17
+#: c-api/init.rst:17
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 "
@@ -37,132 +37,116 @@ msgid ""
"`."
msgstr ""
-#: ../Doc/c-api/init.rst:22
+#: c-api/init.rst:22
msgid ""
"The following functions can be safely called before Python is initialized:"
msgstr ""
-#: ../Doc/c-api/init.rst:24
+#: c-api/init.rst:24
msgid "Configuration functions:"
msgstr ""
-#: ../Doc/c-api/init.rst:26
+#: c-api/init.rst:26
msgid ":c:func:`PyImport_AppendInittab`"
msgstr ""
-#: ../Doc/c-api/init.rst:27
+#: c-api/init.rst:27
msgid ":c:func:`PyImport_ExtendInittab`"
msgstr ""
-#: ../Doc/c-api/init.rst:28
-msgid ":c:func:`PyInitFrozenExtensions`"
+#: c-api/init.rst:28
+msgid ":c:func:`!PyInitFrozenExtensions`"
msgstr ""
-#: ../Doc/c-api/init.rst:29
+#: c-api/init.rst:29
msgid ":c:func:`PyMem_SetAllocator`"
msgstr ""
-#: ../Doc/c-api/init.rst:30
+#: c-api/init.rst:30
msgid ":c:func:`PyMem_SetupDebugHooks`"
msgstr ""
-#: ../Doc/c-api/init.rst:31
+#: c-api/init.rst:31
msgid ":c:func:`PyObject_SetArenaAllocator`"
msgstr ""
-#: ../Doc/c-api/init.rst:32
-msgid ":c:func:`Py_SetPath`"
-msgstr ""
-
-#: ../Doc/c-api/init.rst:33
+#: c-api/init.rst:32
msgid ":c:func:`Py_SetProgramName`"
msgstr ""
-#: ../Doc/c-api/init.rst:34
+#: c-api/init.rst:33
msgid ":c:func:`Py_SetPythonHome`"
msgstr ""
-#: ../Doc/c-api/init.rst:35
-msgid ":c:func:`Py_SetStandardStreamEncoding`"
-msgstr ""
-
-#: ../Doc/c-api/init.rst:36
-msgid ":c:func:`PySys_AddWarnOption`"
-msgstr ""
-
-#: ../Doc/c-api/init.rst:37
-msgid ":c:func:`PySys_AddXOption`"
-msgstr ""
-
-#: ../Doc/c-api/init.rst:38
+#: c-api/init.rst:34
msgid ":c:func:`PySys_ResetWarnOptions`"
msgstr ""
-#: ../Doc/c-api/init.rst:40
+#: c-api/init.rst:36
msgid "Informative functions:"
msgstr ""
-#: ../Doc/c-api/init.rst:42
+#: c-api/init.rst:38
msgid ":c:func:`Py_IsInitialized`"
msgstr ""
-#: ../Doc/c-api/init.rst:43
+#: c-api/init.rst:39
msgid ":c:func:`PyMem_GetAllocator`"
msgstr ""
-#: ../Doc/c-api/init.rst:44
+#: c-api/init.rst:40
msgid ":c:func:`PyObject_GetArenaAllocator`"
msgstr ""
-#: ../Doc/c-api/init.rst:45
+#: c-api/init.rst:41
msgid ":c:func:`Py_GetBuildInfo`"
msgstr ""
-#: ../Doc/c-api/init.rst:46
+#: c-api/init.rst:42
msgid ":c:func:`Py_GetCompiler`"
msgstr ""
-#: ../Doc/c-api/init.rst:47
+#: c-api/init.rst:43
msgid ":c:func:`Py_GetCopyright`"
msgstr ""
-#: ../Doc/c-api/init.rst:48
+#: c-api/init.rst:44
msgid ":c:func:`Py_GetPlatform`"
msgstr ""
-#: ../Doc/c-api/init.rst:49
+#: c-api/init.rst:45
msgid ":c:func:`Py_GetVersion`"
msgstr ""
-#: ../Doc/c-api/init.rst:51
+#: c-api/init.rst:47
msgid "Utilities:"
msgstr ""
-#: ../Doc/c-api/init.rst:53
+#: c-api/init.rst:49
msgid ":c:func:`Py_DecodeLocale`"
msgstr ""
-#: ../Doc/c-api/init.rst:55
+#: c-api/init.rst:51
msgid "Memory allocators:"
msgstr ""
-#: ../Doc/c-api/init.rst:57
+#: c-api/init.rst:53
msgid ":c:func:`PyMem_RawMalloc`"
msgstr ""
-#: ../Doc/c-api/init.rst:58
+#: c-api/init.rst:54
msgid ":c:func:`PyMem_RawRealloc`"
msgstr ""
-#: ../Doc/c-api/init.rst:59
+#: c-api/init.rst:55
msgid ":c:func:`PyMem_RawCalloc`"
msgstr ""
-#: ../Doc/c-api/init.rst:60
+#: c-api/init.rst:56
msgid ":c:func:`PyMem_RawFree`"
msgstr ""
-#: ../Doc/c-api/init.rst:64
+#: c-api/init.rst:60
msgid ""
"The following functions **should not be called** before :c:func:"
"`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:"
@@ -171,18 +155,18 @@ msgid ""
"`Py_GetProgramName` and :c:func:`PyEval_InitThreads`."
msgstr ""
-#: ../Doc/c-api/init.rst:74
+#: c-api/init.rst:70
msgid "Global configuration variables"
msgstr ""
-#: ../Doc/c-api/init.rst:76
+#: c-api/init.rst:72
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 ""
-#: ../Doc/c-api/init.rst:80
+#: c-api/init.rst:76
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:"
@@ -190,138 +174,222 @@ msgid ""
"2."
msgstr ""
-#: ../Doc/c-api/init.rst:86
+#: c-api/init.rst:82
+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:86
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 ""
-#: ../Doc/c-api/init.rst:90
+#: c-api/init.rst:90
msgid "Set by the :option:`-b` option."
msgstr ""
-#: ../Doc/c-api/init.rst:94
+#: c-api/init.rst:96
+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:100
msgid ""
"Turn on parser debugging output (for expert only, depending on compilation "
"options)."
msgstr ""
-#: ../Doc/c-api/init.rst:97
+#: c-api/init.rst:103
msgid ""
"Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment "
"variable."
msgstr ""
-#: ../Doc/c-api/init.rst:102
+#: c-api/init.rst:110
+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:114
msgid ""
"If set to non-zero, Python won't try to write ``.pyc`` files on the import "
"of source modules."
msgstr ""
-#: ../Doc/c-api/init.rst:105
+#: c-api/init.rst:117
msgid ""
"Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` "
"environment variable."
msgstr ""
-#: ../Doc/c-api/init.rst:110
+#: c-api/init.rst:124
+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:128
msgid ""
"Suppress error messages when calculating the module search path in :c:func:"
"`Py_GetPath`."
msgstr ""
-#: ../Doc/c-api/init.rst:113
+#: c-api/init.rst:131
msgid "Private flag used by ``_freeze_module`` and ``frozenmain`` programs."
msgstr ""
-#: ../Doc/c-api/init.rst:117
+#: c-api/init.rst:137
+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:142
msgid ""
"Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to "
"a non-empty string."
msgstr ""
-#: ../Doc/c-api/init.rst:120
+#: c-api/init.rst:145
msgid ""
"If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment "
"variable to initialize the secret hash seed."
msgstr ""
-#: ../Doc/c-api/init.rst:125
+#: c-api/init.rst:152
+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:156
msgid ""
-"Ignore all :envvar:`PYTHON*` environment variables, e.g. :envvar:"
+"Ignore all :envvar:`!PYTHON*` environment variables, e.g. :envvar:"
"`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set."
msgstr ""
-#: ../Doc/c-api/init.rst:128
+#: c-api/init.rst:159
msgid "Set by the :option:`-E` and :option:`-I` options."
msgstr ""
-#: ../Doc/c-api/init.rst:132
+#: c-api/init.rst:165
+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/init.rst:169
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 ""
-#: ../Doc/c-api/init.rst:136
+#: c-api/init.rst:173
msgid ""
"Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment "
"variable."
msgstr ""
-#: ../Doc/c-api/init.rst:141
+#: c-api/init.rst:180
+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:184
msgid "Set by the :option:`-i` option."
msgstr ""
-#: ../Doc/c-api/init.rst:145
+#: c-api/init.rst:190
+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:194
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 ""
-#: ../Doc/c-api/init.rst:148
+#: c-api/init.rst:197
msgid "Set by the :option:`-I` option."
msgstr ""
-#: ../Doc/c-api/init.rst:154
+#: c-api/init.rst:205
+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:209
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 ""
-#: ../Doc/c-api/init.rst:158
+#: c-api/init.rst:213
msgid ""
"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment "
"variable is set to a non-empty string."
msgstr ""
-#: ../Doc/c-api/init.rst:161
+#: c-api/init.rst:216
msgid "See :pep:`529` for more details."
msgstr ""
-#: ../Doc/c-api/init.rst:163 ../Doc/c-api/init.rst:175
+#: c-api/init.rst:236
msgid ":ref:`Availability `: Windows."
msgstr ""
-#: ../Doc/c-api/init.rst:167
+#: c-api/init.rst:224
msgid ""
-"If the flag is non-zero, use :class:`io.FileIO` instead of :class:"
-"`WindowsConsoleIO` for :mod:`sys` standard streams."
+"This API is kept for backward compatibility: setting :c:member:`PyConfig."
+"legacy_windows_stdio` should be used instead, see :ref:`Python "
+"Initialization Configuration `."
msgstr ""
-#: ../Doc/c-api/init.rst:170
+#: c-api/init.rst:228
+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:231
msgid ""
"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable "
"is set to a non-empty string."
msgstr ""
-#: ../Doc/c-api/init.rst:173
+#: c-api/init.rst:234
msgid "See :pep:`528` for more details."
msgstr ""
-#: ../Doc/c-api/init.rst:179
+#: c-api/init.rst:242
+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:246
msgid ""
"Disable the import of the module :mod:`site` and the site-dependent "
"manipulations of :data:`sys.path` that it entails. Also disable these "
@@ -329,48 +397,83 @@ msgid ""
"main` if you want them to be triggered)."
msgstr ""
-#: ../Doc/c-api/init.rst:184
+#: c-api/init.rst:251
msgid "Set by the :option:`-S` option."
msgstr ""
-#: ../Doc/c-api/init.rst:188
+#: c-api/init.rst:257
+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:261
msgid ""
"Don't add the :data:`user site-packages directory ` to :data:"
"`sys.path`."
msgstr ""
-#: ../Doc/c-api/init.rst:191
+#: c-api/init.rst:264
msgid ""
"Set by the :option:`-s` and :option:`-I` options, and the :envvar:"
"`PYTHONNOUSERSITE` environment variable."
msgstr ""
-#: ../Doc/c-api/init.rst:196
+#: c-api/init.rst:271
+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:275
msgid ""
"Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment "
"variable."
msgstr ""
-#: ../Doc/c-api/init.rst:201
+#: c-api/init.rst:282
+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:286
msgid ""
"Don't display the copyright and version messages even in interactive mode."
msgstr ""
-#: ../Doc/c-api/init.rst:203
+#: c-api/init.rst:288
msgid "Set by the :option:`-q` option."
msgstr ""
-#: ../Doc/c-api/init.rst:209
+#: c-api/init.rst:296
+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/init.rst:300
msgid "Force the stdout and stderr streams to be unbuffered."
msgstr ""
-#: ../Doc/c-api/init.rst:211
+#: c-api/init.rst:302
msgid ""
"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` "
"environment variable."
msgstr ""
-#: ../Doc/c-api/init.rst:216
+#: c-api/init.rst:309
+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/init.rst:313
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 "
@@ -378,54 +481,67 @@ msgid ""
"for a module. Also provides information on module cleanup at exit."
msgstr ""
-#: ../Doc/c-api/init.rst:221
+#: c-api/init.rst:318
msgid ""
"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment "
"variable."
msgstr ""
-#: ../Doc/c-api/init.rst:226
+#: c-api/init.rst:325
msgid "Initializing and finalizing the interpreter"
msgstr ""
-#: ../Doc/c-api/init.rst:244
+#: c-api/init.rst:340
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 ""
-#: ../Doc/c-api/init.rst:248
+#: c-api/init.rst:344
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 :c:func:`PySys_SetArgvEx` for that. This is a no-op when "
+"``sys.argv``; use the new :c:type:`PyConfig` API of the :ref:`Python "
+"Initialization Configuration ` 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 ""
-#: ../Doc/c-api/init.rst:257
+#: c-api/init.rst:368
+msgid ""
+"Use the :c:func:`Py_InitializeFromConfig` function to customize the :ref:"
+"`Python Initialization Configuration `."
+msgstr ""
+
+#: c-api/init.rst:358
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 ""
-#: ../Doc/c-api/init.rst:263
+#: c-api/init.rst:364
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 might be useful when Python is embedded."
msgstr ""
-#: ../Doc/c-api/init.rst:270
+#: c-api/init.rst:374
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 ""
-#: ../Doc/c-api/init.rst:277
+#: c-api/init.rst:381
+msgid ""
+"Return true (non-zero) if the main Python interpreter is :term:`shutting "
+"down `. Return false (zero) otherwise."
+msgstr ""
+
+#: c-api/init.rst:389
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:"
@@ -437,7 +553,7 @@ msgid ""
"(flushing buffered data), ``-1`` is returned."
msgstr ""
-#: ../Doc/c-api/init.rst:286
+#: c-api/init.rst:398
msgid ""
"This function is provided for a number of reasons. An embedding application "
"might want to restart Python without having to restart the application "
@@ -448,89 +564,45 @@ msgid ""
"Python before exiting from the application."
msgstr ""
-#: ../Doc/c-api/init.rst:294
+#: c-api/init.rst:406
msgid ""
"**Bugs and caveats:** The destruction of modules and objects in modules is "
-"done in random order; this may cause destructors (:meth:`__del__` methods) "
-"to fail when they depend on other objects (even functions) or modules. "
-"Dynamically loaded extension modules loaded by Python are not unloaded. "
-"Small amounts of memory allocated by the Python interpreter may not be freed "
-"(if you find a leak, please report it). Memory tied up in circular "
-"references between objects is not freed. Some memory allocated by extension "
-"modules may not be freed. Some extensions may not work properly if their "
-"initialization routine is called more than once; this can happen if an "
-"application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` more "
-"than once."
+"done in random order; this may cause destructors (:meth:`~object.__del__` "
+"methods) to fail when they depend on other objects (even functions) or "
+"modules. Dynamically loaded extension modules loaded by Python are not "
+"unloaded. Small amounts of memory allocated by the Python interpreter may "
+"not be freed (if you find a leak, please report it). Memory tied up in "
+"circular references between objects is not freed. Some memory allocated by "
+"extension modules may not be freed. Some extensions may not work properly "
+"if their initialization routine is called more than once; this can happen if "
+"an application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` "
+"more than once."
msgstr ""
-#: ../Doc/c-api/init.rst:305
+#: c-api/init.rst:417
msgid ""
"Raises an :ref:`auditing event ` ``cpython."
"_PySys_ClearAuditHooks`` with no arguments."
msgstr ""
-#: ../Doc/c-api/init.rst:311
+#: c-api/init.rst:423
msgid ""
"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that "
"disregards the return value."
msgstr ""
-#: ../Doc/c-api/init.rst:316
+#: c-api/init.rst:428
msgid "Process-wide parameters"
msgstr ""
-#: ../Doc/c-api/init.rst:326
-msgid ""
-"This API is kept for backward compatibility: setting :c:member:`PyConfig."
-"stdio_encoding` and :c:member:`PyConfig.stdio_errors` should be used "
-"instead, see :ref:`Python Initialization Configuration `."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:331
-msgid ""
-"This function should be called before :c:func:`Py_Initialize`, if it is "
-"called at all. It specifies which encoding and error handling to use with "
-"standard IO, with the same meanings as in :func:`str.encode`."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:335
-msgid ""
-"It overrides :envvar:`PYTHONIOENCODING` values, and allows embedding code to "
-"control IO encoding when the environment variable does not work."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:338
-msgid ""
-"*encoding* and/or *errors* may be ``NULL`` to use :envvar:`PYTHONIOENCODING` "
-"and/or default values (depending on other settings)."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:342
-msgid ""
-"Note that :data:`sys.stderr` always uses the \"backslashreplace\" error "
-"handler, regardless of this (or any other) setting."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:345
-msgid ""
-"If :c:func:`Py_FinalizeEx` is called, this function will need to be called "
-"again in order to affect subsequent calls to :c:func:`Py_Initialize`."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:348
-msgid ""
-"Returns ``0`` if successful, a nonzero value on error (e.g. calling after "
-"the interpreter has already been initialized)."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:363
+#: c-api/init.rst:438
msgid ""
"This API is kept for backward compatibility: setting :c:member:`PyConfig."
"program_name` should be used instead, see :ref:`Python Initialization "
"Configuration `."
msgstr ""
-#: ../Doc/c-api/init.rst:367
+#: c-api/init.rst:442
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 "
@@ -544,54 +616,56 @@ msgid ""
"this storage."
msgstr ""
-#: ../Doc/c-api/init.rst:378 ../Doc/c-api/init.rst:529
-#: ../Doc/c-api/init.rst:644 ../Doc/c-api/init.rst:680
-#: ../Doc/c-api/init.rst:706
+#: c-api/init.rst:692 c-api/init.rst:754
msgid ""
"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:"
"`wchar_*` string."
msgstr ""
-#: ../Doc/c-api/init.rst:388
+#: c-api/init.rst:461
msgid ""
-"Return the program name set with :c:func:`Py_SetProgramName`, or the "
+"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 ""
-#: ../Doc/c-api/init.rst:392 ../Doc/c-api/init.rst:411
-#: ../Doc/c-api/init.rst:452 ../Doc/c-api/init.rst:471
-#: ../Doc/c-api/init.rst:495 ../Doc/c-api/init.rst:718
+#: c-api/init.rst:487 c-api/init.rst:552 c-api/init.rst:766
msgid ""
"This function should not be called before :c:func:`Py_Initialize`, otherwise "
"it returns ``NULL``."
msgstr ""
-#: ../Doc/c-api/init.rst:395 ../Doc/c-api/init.rst:414
-#: ../Doc/c-api/init.rst:455 ../Doc/c-api/init.rst:474
-#: ../Doc/c-api/init.rst:500 ../Doc/c-api/init.rst:721
+#: c-api/init.rst:490 c-api/init.rst:555 c-api/init.rst:769
msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`."
msgstr ""
-#: ../Doc/c-api/init.rst:401
+#: c-api/init.rst:559
+msgid "Get :data:`sys.executable` instead."
+msgstr ""
+
+#: c-api/init.rst:477
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:func:`Py_SetProgramName` and some environment variables; for "
+"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 ``--prefix`` argument to "
-"the :program:`configure` script at build time. The value is available to "
-"Python code as ``sys.prefix``. It is only useful on Unix. See also the next "
-"function."
+"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.prefix``. It is only useful on Unix. See "
+"also the next function."
msgstr ""
-#: ../Doc/c-api/init.rst:420
+#: c-api/init.rst:494
+msgid "Get :data:`sys.prefix` instead."
+msgstr ""
+
+#: c-api/init.rst:499
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:func:`Py_SetProgramName` and some environment variables; for "
+"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:"
@@ -601,7 +675,7 @@ msgid ""
"on Unix."
msgstr ""
-#: ../Doc/c-api/init.rst:430
+#: c-api/init.rst:509
msgid ""
"Background: The exec-prefix differs from the prefix when platform dependent "
"files (such as executables and shared libraries) are installed in a "
@@ -610,7 +684,7 @@ msgid ""
"independent may be installed in :file:`/usr/local`."
msgstr ""
-#: ../Doc/c-api/init.rst:436
+#: c-api/init.rst:515
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 "
@@ -624,7 +698,7 @@ msgid ""
"independent from the Python version by which they were compiled!)."
msgstr ""
-#: ../Doc/c-api/init.rst:447
+#: c-api/init.rst:526
msgid ""
"System administrators will know how to configure the :program:`mount` or :"
"program:`automount` programs to share :file:`/usr/local` between platforms "
@@ -632,19 +706,23 @@ msgid ""
"platform."
msgstr ""
-#: ../Doc/c-api/init.rst:465
+#: c-api/init.rst:538
+msgid "Get :data:`sys.exec_prefix` instead."
+msgstr ""
+
+#: c-api/init.rst:546
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:func:`Py_SetProgramName` above). The returned string points "
+"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 ""
-#: ../Doc/c-api/init.rst:485
+#: c-api/init.rst:568
msgid ""
"Return the default module search path; this is computed from the program "
-"name (set by :c:func:`Py_SetProgramName` above) and some environment "
+"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 "
@@ -654,52 +732,17 @@ msgid ""
"for loading modules."
msgstr ""
-#: ../Doc/c-api/init.rst:511
-msgid ""
-"This API is kept for backward compatibility: setting :c:member:`PyConfig."
-"module_search_paths` and :c:member:`PyConfig.module_search_paths_set` should "
-"be used instead, see :ref:`Python Initialization Configuration `."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:516
-msgid ""
-"Set the default module search path. If this function is called before :c:"
-"func:`Py_Initialize`, then :c:func:`Py_GetPath` won't attempt to compute a "
-"default search path but uses the one provided instead. This is useful if "
-"Python is embedded by an application that has full knowledge of the location "
-"of all modules. The path components should be separated by the platform "
-"dependent delimiter character, which is ``':'`` on Unix and macOS, ``';'`` "
-"on Windows."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:524
-msgid ""
-"This also causes :data:`sys.executable` to be set to the program full path "
-"(see :c:func:`Py_GetProgramFullPath`) and for :data:`sys.prefix` and :data:"
-"`sys.exec_prefix` to be empty. It is up to the caller to modify these if "
-"required after calling :c:func:`Py_Initialize`."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:532
-msgid ""
-"The path argument is copied internally, so the caller may free it after the "
-"call completes."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:535
-msgid ""
-"The program full path is now used for :data:`sys.executable`, instead of the "
-"program name."
+#: c-api/init.rst:587
+msgid "Get :data:`sys.path` instead."
msgstr ""
-#: ../Doc/c-api/init.rst:544
+#: c-api/init.rst:592
msgid ""
"Return the version of this Python interpreter. This is a string that looks "
"something like ::"
msgstr ""
-#: ../Doc/c-api/init.rst:551
+#: c-api/init.rst:599
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 "
@@ -708,11 +751,11 @@ msgid ""
"version`."
msgstr ""
-#: ../Doc/c-api/init.rst:556
+#: c-api/init.rst:604
msgid "See also the :c:var:`Py_Version` constant."
msgstr ""
-#: ../Doc/c-api/init.rst:563
+#: c-api/init.rst:611
msgid ""
"Return the platform identifier for the current platform. On Unix, this is "
"formed from the \"official\" name of the operating system, converted to "
@@ -723,42 +766,42 @@ msgid ""
"available to Python code as ``sys.platform``."
msgstr ""
-#: ../Doc/c-api/init.rst:574
+#: c-api/init.rst:622
msgid ""
"Return the official copyright string for the current Python version, for "
"example"
msgstr ""
-#: ../Doc/c-api/init.rst:576
+#: c-api/init.rst:624
msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``"
msgstr ""
-#: ../Doc/c-api/init.rst:580
+#: c-api/init.rst:628
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 ""
-#: ../Doc/c-api/init.rst:586
+#: c-api/init.rst:634
msgid ""
"Return an indication of the compiler used to build the current Python "
"version, in square brackets, for example::"
msgstr ""
-#: ../Doc/c-api/init.rst:593 ../Doc/c-api/init.rst:607
+#: c-api/init.rst:655
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 ""
-#: ../Doc/c-api/init.rst:600
+#: c-api/init.rst:648
msgid ""
"Return information about the sequence number and build date and time of the "
"current Python interpreter instance, for example ::"
msgstr ""
-#: ../Doc/c-api/init.rst:619
+#: c-api/init.rst:667
msgid ""
"This API is kept for backward compatibility: setting :c:member:`PyConfig."
"argv`, :c:member:`PyConfig.parse_argv` and :c:member:`PyConfig.safe_path` "
@@ -766,7 +809,7 @@ msgid ""
"config>`."
msgstr ""
-#: ../Doc/c-api/init.rst:624
+#: c-api/init.rst:672
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 "
@@ -777,81 +820,80 @@ msgid ""
"fatal condition is signalled using :c:func:`Py_FatalError`."
msgstr ""
-#: ../Doc/c-api/init.rst:632
+#: c-api/init.rst:680
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 ""
-#: ../Doc/c-api/init.rst:636
+#: c-api/init.rst:684
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 ""
-#: ../Doc/c-api/init.rst:639
+#: c-api/init.rst:687
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 ""
-#: ../Doc/c-api/init.rst:647 ../Doc/c-api/init.rst:683
+#: c-api/init.rst:731
msgid ""
"See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` "
"members of the :ref:`Python Initialization Configuration `."
msgstr ""
-#: ../Doc/c-api/init.rst:651
+#: c-api/init.rst:699
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 "
-"`_."
+"and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`."
msgstr ""
-#: ../Doc/c-api/init.rst:656
+#: c-api/init.rst:704
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 ""
-#: ../Doc/c-api/init.rst:672
+#: c-api/init.rst:720
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 ""
-#: ../Doc/c-api/init.rst:676
+#: c-api/init.rst:724
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 ""
-#: ../Doc/c-api/init.rst:686
+#: c-api/init.rst:734
msgid "The *updatepath* value depends on :option:`-I`."
msgstr ""
-#: ../Doc/c-api/init.rst:693
+#: c-api/init.rst:741
msgid ""
"This API is kept for backward compatibility: setting :c:member:`PyConfig."
"home` should be used instead, see :ref:`Python Initialization Configuration "
"`."
msgstr ""
-#: ../Doc/c-api/init.rst:697
+#: c-api/init.rst:745
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 ""
-#: ../Doc/c-api/init.rst:701
+#: c-api/init.rst:749
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 "
@@ -859,18 +901,24 @@ msgid ""
"this storage."
msgstr ""
-#: ../Doc/c-api/init.rst:714
+#: c-api/init.rst:762
+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:774
msgid ""
-"Return the default \"home\", that is, the value set by a previous call to :c:"
-"func:`Py_SetPythonHome`, or the value of the :envvar:`PYTHONHOME` "
-"environment variable if it is set."
+"Get :c:member:`PyConfig.home` or :envvar:`PYTHONHOME` environment variable "
+"instead."
msgstr ""
-#: ../Doc/c-api/init.rst:728
+#: c-api/init.rst:780
msgid "Thread State and the Global Interpreter Lock"
msgstr ""
-#: ../Doc/c-api/init.rst:735
+#: c-api/init.rst:787
msgid ""
"The Python interpreter is not fully thread-safe. In order to support multi-"
"threaded Python programs, there's a global lock, called the :term:`global "
@@ -882,7 +930,7 @@ msgid ""
"once instead of twice."
msgstr ""
-#: ../Doc/c-api/init.rst:745
+#: c-api/init.rst:797
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 "
@@ -892,7 +940,7 @@ msgid ""
"a file, so that other Python threads can run in the meantime."
msgstr ""
-#: ../Doc/c-api/init.rst:756
+#: c-api/init.rst:807
msgid ""
"The Python interpreter keeps some thread-specific bookkeeping information "
"inside a data structure called :c:type:`PyThreadState`. There's also one "
@@ -900,32 +948,32 @@ msgid ""
"retrieved using :c:func:`PyThreadState_Get`."
msgstr ""
-#: ../Doc/c-api/init.rst:762
+#: c-api/init.rst:813
msgid "Releasing the GIL from extension code"
msgstr ""
-#: ../Doc/c-api/init.rst:764
+#: c-api/init.rst:815
msgid ""
"Most extension code manipulating the :term:`GIL` has the following simple "
"structure::"
msgstr ""
-#: ../Doc/c-api/init.rst:773
+#: c-api/init.rst:824
msgid "This is so common that a pair of macros exists to simplify it::"
msgstr ""
-#: ../Doc/c-api/init.rst:783
+#: c-api/init.rst:834
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 ""
-#: ../Doc/c-api/init.rst:787
+#: c-api/init.rst:838
msgid "The block above expands to the following code::"
msgstr ""
-#: ../Doc/c-api/init.rst:799
+#: c-api/init.rst:850
msgid ""
"Here is how these functions work: the global interpreter lock is used to "
"protect the pointer to the current thread state. When releasing the lock "
@@ -936,7 +984,7 @@ msgid ""
"state, the lock must be acquired before storing the thread state pointer."
msgstr ""
-#: ../Doc/c-api/init.rst:808
+#: c-api/init.rst:859
msgid ""
"Calling system I/O functions is the most common use case for releasing the "
"GIL, but it can also be useful before calling long-running computations "
@@ -946,11 +994,11 @@ msgid ""
"compressing or hashing data."
msgstr ""
-#: ../Doc/c-api/init.rst:819
+#: c-api/init.rst:870
msgid "Non-Python created threads"
msgstr ""
-#: ../Doc/c-api/init.rst:821
+#: c-api/init.rst:872
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 "
@@ -960,7 +1008,7 @@ msgid ""
"for them."
msgstr ""
-#: ../Doc/c-api/init.rst:828
+#: c-api/init.rst:879
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 "
@@ -971,14 +1019,14 @@ msgid ""
"finally free the thread state data structure."
msgstr ""
-#: ../Doc/c-api/init.rst:836
+#: c-api/init.rst:887
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 ""
-#: ../Doc/c-api/init.rst:850
+#: c-api/init.rst:901
msgid ""
"Note that the ``PyGILState_*`` functions assume there is only one global "
"interpreter (created automatically by :c:func:`Py_Initialize`). Python "
@@ -987,11 +1035,11 @@ msgid ""
"``PyGILState_*`` API is unsupported."
msgstr ""
-#: ../Doc/c-api/init.rst:860
+#: c-api/init.rst:911
msgid "Cautions about fork()"
msgstr ""
-#: ../Doc/c-api/init.rst:862
+#: c-api/init.rst:913
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 "
@@ -1000,7 +1048,7 @@ msgid ""
"CPython's runtime."
msgstr ""
-#: ../Doc/c-api/init.rst:868
+#: c-api/init.rst:919
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` "
@@ -1008,7 +1056,7 @@ msgid ""
"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 "
+"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 "
@@ -1017,7 +1065,7 @@ msgid ""
"locks, but is not always able to."
msgstr ""
-#: ../Doc/c-api/init.rst:883
+#: c-api/init.rst:934
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 "
@@ -1030,17 +1078,17 @@ msgid ""
"called immediately after."
msgstr ""
-#: ../Doc/c-api/init.rst:896
+#: c-api/init.rst:947
msgid "High-level API"
msgstr ""
-#: ../Doc/c-api/init.rst:898
+#: c-api/init.rst:949
msgid ""
"These are the most commonly used types and functions when writing C "
"extension code, or when embedding the Python interpreter:"
msgstr ""
-#: ../Doc/c-api/init.rst:903
+#: c-api/init.rst:954
msgid ""
"This data structure represents the state shared by a number of cooperating "
"threads. Threads belonging to the same interpreter share their module "
@@ -1048,7 +1096,7 @@ msgid ""
"in this structure."
msgstr ""
-#: ../Doc/c-api/init.rst:908
+#: c-api/init.rst:959
msgid ""
"Threads belonging to different interpreters initially share nothing, except "
"process state like available memory, open file descriptors and such. The "
@@ -1056,49 +1104,41 @@ msgid ""
"which interpreter they belong."
msgstr ""
-#: ../Doc/c-api/init.rst:916
+#: c-api/init.rst:967
msgid ""
"This data structure represents the state of a single thread. The only "
-"public data member is :attr:`interp` (:c:expr:`PyInterpreterState *`), which "
-"points to this thread's interpreter state."
+"public data member is:"
+msgstr ""
+
+#: c-api/init.rst:972
+msgid "This thread's interpreter state."
msgstr ""
-#: ../Doc/c-api/init.rst:929
+#: c-api/init.rst:983
msgid "Deprecated function which does nothing."
msgstr ""
-#: ../Doc/c-api/init.rst:931
+#: c-api/init.rst:985
msgid ""
"In Python 3.6 and older, this function created the GIL if it didn't exist."
msgstr ""
-#: ../Doc/c-api/init.rst:933
+#: c-api/init.rst:987
msgid "The function now does nothing."
msgstr ""
-#: ../Doc/c-api/init.rst:936
+#: c-api/init.rst:990
msgid ""
"This function is now called by :c:func:`Py_Initialize()`, so you don't have "
"to call it yourself anymore."
msgstr ""
-#: ../Doc/c-api/init.rst:940
+#: c-api/init.rst:994
msgid ""
"This function cannot be called before :c:func:`Py_Initialize()` anymore."
msgstr ""
-#: ../Doc/c-api/init.rst:950
-msgid ""
-"Returns a non-zero value if :c:func:`PyEval_InitThreads` has been called. "
-"This function can be called without holding the GIL, and therefore can be "
-"used to avoid calls to the locking API when running single-threaded."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:954
-msgid "The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:962
+#: c-api/init.rst:1004
msgid ""
"Release the global interpreter lock (if it has been created) and reset the "
"thread state to ``NULL``, returning the previous thread state (which is not "
@@ -1106,7 +1146,7 @@ msgid ""
"acquired it."
msgstr ""
-#: ../Doc/c-api/init.rst:970
+#: c-api/init.rst:1012
msgid ""
"Acquire the global interpreter lock (if it has been created) and set the "
"thread state to *tstate*, which must not be ``NULL``. If the lock has been "
@@ -1114,37 +1154,53 @@ msgid ""
"ensues."
msgstr ""
-#: ../Doc/c-api/init.rst:976 ../Doc/c-api/init.rst:1022
-#: ../Doc/c-api/init.rst:1304 ../Doc/c-api/init.rst:1342
+#: c-api/init.rst:1077 c-api/init.rst:1359
msgid ""
"Calling this function from a thread when the runtime is finalizing will "
"terminate the thread, even if the thread was not created by Python. You can "
-"use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the "
+"use :c:func:`Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the "
"interpreter is in process of being finalized before calling this function to "
"avoid unwanted termination."
msgstr ""
-#: ../Doc/c-api/init.rst:984
+#: c-api/init.rst:1026
msgid ""
"Return the current thread state. The global interpreter lock must be held. "
"When the current thread state is ``NULL``, this issues a fatal error (so "
"that the caller needn't check for ``NULL``)."
msgstr ""
-#: ../Doc/c-api/init.rst:991
+#: c-api/init.rst:1030
+msgid "See also :c:func:`PyThreadState_GetUnchecked`."
+msgstr ""
+
+#: c-api/init.rst:1035
+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:1039
+msgid ""
+"In Python 3.5 to 3.12, the function was private and known as "
+"``_PyThreadState_UncheckedGet()``."
+msgstr ""
+
+#: c-api/init.rst:1046
msgid ""
"Swap the current thread state with the thread state given by the argument "
"*tstate*, which may be ``NULL``. The global interpreter lock must be held "
"and is not released."
msgstr ""
-#: ../Doc/c-api/init.rst:996
+#: c-api/init.rst:1051
msgid ""
"The following functions use thread-local storage, and are not compatible "
"with sub-interpreters:"
msgstr ""
-#: ../Doc/c-api/init.rst:1001
+#: c-api/init.rst:1056
msgid ""
"Ensure that the current thread is ready to call the Python C API regardless "
"of the current state of Python, or of the global interpreter lock. This may "
@@ -1157,7 +1213,7 @@ msgid ""
"is acceptable."
msgstr ""
-#: ../Doc/c-api/init.rst:1011
+#: c-api/init.rst:1066
msgid ""
"The return value is an opaque \"handle\" to the thread state when :c:func:"
"`PyGILState_Ensure` was called, and must be passed to :c:func:"
@@ -1167,13 +1223,13 @@ msgid ""
"func:`PyGILState_Release`."
msgstr ""
-#: ../Doc/c-api/init.rst:1018
+#: c-api/init.rst:1073
msgid ""
"When the function returns, the current thread will hold the GIL and be able "
"to call arbitrary Python code. Failure is a fatal error."
msgstr ""
-#: ../Doc/c-api/init.rst:1030
+#: c-api/init.rst:1085
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:"
@@ -1181,13 +1237,13 @@ msgid ""
"caller, hence the use of the GILState API)."
msgstr ""
-#: ../Doc/c-api/init.rst:1035
+#: c-api/init.rst:1090
msgid ""
"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:"
"func:`PyGILState_Release` on the same thread."
msgstr ""
-#: ../Doc/c-api/init.rst:1041
+#: c-api/init.rst:1096
msgid ""
"Get the current thread state for this thread. May return ``NULL`` if no "
"GILState API has been used on the current thread. Note that the main thread "
@@ -1195,7 +1251,7 @@ msgid ""
"made on the main thread. This is mainly a helper/diagnostic function."
msgstr ""
-#: ../Doc/c-api/init.rst:1049
+#: c-api/init.rst:1104
msgid ""
"Return ``1`` if the current thread is holding the GIL and ``0`` otherwise. "
"This function can be called from any thread at any time. Only if it has had "
@@ -1206,13 +1262,13 @@ msgid ""
"otherwise behave differently."
msgstr ""
-#: ../Doc/c-api/init.rst:1061
+#: c-api/init.rst:1116
msgid ""
"The following macros are normally used without a trailing semicolon; look "
"for example usage in the Python source distribution."
msgstr ""
-#: ../Doc/c-api/init.rst:1067
+#: c-api/init.rst:1122
msgid ""
"This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();"
"``. Note that it contains an opening brace; it must be matched with a "
@@ -1220,7 +1276,7 @@ msgid ""
"discussion of this macro."
msgstr ""
-#: ../Doc/c-api/init.rst:1075
+#: c-api/init.rst:1130
msgid ""
"This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it "
"contains a closing brace; it must be matched with an earlier :c:macro:"
@@ -1228,91 +1284,91 @@ msgid ""
"macro."
msgstr ""
-#: ../Doc/c-api/init.rst:1083
+#: c-api/init.rst:1138
msgid ""
"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :"
"c:macro:`Py_END_ALLOW_THREADS` without the closing brace."
msgstr ""
-#: ../Doc/c-api/init.rst:1089
+#: c-api/init.rst:1144
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 ""
-#: ../Doc/c-api/init.rst:1095
+#: c-api/init.rst:1150
msgid "Low-level API"
msgstr ""
-#: ../Doc/c-api/init.rst:1097
+#: c-api/init.rst:1152
msgid ""
"All of the following functions must be called after :c:func:`Py_Initialize`."
msgstr ""
-#: ../Doc/c-api/init.rst:1099
+#: c-api/init.rst:1154
msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`."
msgstr ""
-#: ../Doc/c-api/init.rst:1105
+#: c-api/init.rst:1160
msgid ""
"Create a new interpreter state object. The global interpreter lock need not "
"be held, but may be held if it is necessary to serialize calls to this "
"function."
msgstr ""
-#: ../Doc/c-api/init.rst:1109
+#: c-api/init.rst:1164
msgid ""
"Raises an :ref:`auditing event ` ``cpython."
"PyInterpreterState_New`` with no arguments."
msgstr ""
-#: ../Doc/c-api/init.rst:1114
+#: c-api/init.rst:1169
msgid ""
"Reset all information in an interpreter state object. The global "
"interpreter lock must be held."
msgstr ""
-#: ../Doc/c-api/init.rst:1117
+#: c-api/init.rst:1172
msgid ""
"Raises an :ref:`auditing event ` ``cpython."
"PyInterpreterState_Clear`` with no arguments."
msgstr ""
-#: ../Doc/c-api/init.rst:1122
+#: c-api/init.rst:1177
msgid ""
"Destroy an interpreter state object. The global interpreter lock need not "
"be held. The interpreter state must have been reset with a previous call "
"to :c:func:`PyInterpreterState_Clear`."
msgstr ""
-#: ../Doc/c-api/init.rst:1129
+#: c-api/init.rst:1184
msgid ""
"Create a new thread state object belonging to the given interpreter object. "
"The global interpreter lock need not be held, but may be held if it is "
"necessary to serialize calls to this function."
msgstr ""
-#: ../Doc/c-api/init.rst:1136
+#: c-api/init.rst:1191
msgid ""
"Reset all information in a thread state object. The global interpreter lock "
"must be held."
msgstr ""
-#: ../Doc/c-api/init.rst:1139
+#: c-api/init.rst:1194
msgid ""
"This function now calls the :c:member:`PyThreadState.on_delete` callback. "
"Previously, that happened in :c:func:`PyThreadState_Delete`."
msgstr ""
-#: ../Doc/c-api/init.rst:1146
+#: c-api/init.rst:1201
msgid ""
"Destroy a thread state object. The global interpreter lock need not be "
"held. The thread state must have been reset with a previous call to :c:func:"
"`PyThreadState_Clear`."
msgstr ""
-#: ../Doc/c-api/init.rst:1153
+#: c-api/init.rst:1208
msgid ""
"Destroy the current thread state and release the global interpreter lock. "
"Like :c:func:`PyThreadState_Delete`, the global interpreter lock need not be "
@@ -1320,119 +1376,118 @@ msgid ""
"`PyThreadState_Clear`."
msgstr ""
-#: ../Doc/c-api/init.rst:1161
+#: c-api/init.rst:1216
msgid "Get the current frame of the Python thread state *tstate*."
msgstr ""
-#: ../Doc/c-api/init.rst:1163
+#: c-api/init.rst:1218
msgid ""
"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently "
"executing."
msgstr ""
-#: ../Doc/c-api/init.rst:1166
+#: c-api/init.rst:1221
msgid "See also :c:func:`PyEval_GetFrame`."
msgstr ""
-#: ../Doc/c-api/init.rst:1168 ../Doc/c-api/init.rst:1177
-#: ../Doc/c-api/init.rst:1186
+#: c-api/init.rst:1232 c-api/init.rst:1241
msgid "*tstate* must not be ``NULL``."
msgstr ""
-#: ../Doc/c-api/init.rst:1175
+#: c-api/init.rst:1230
msgid ""
"Get the unique thread state identifier of the Python thread state *tstate*."
msgstr ""
-#: ../Doc/c-api/init.rst:1184
+#: c-api/init.rst:1239
msgid "Get the interpreter of the Python thread state *tstate*."
msgstr ""
-#: ../Doc/c-api/init.rst:1193
+#: c-api/init.rst:1248
msgid "Suspend tracing and profiling in the Python thread state *tstate*."
msgstr ""
-#: ../Doc/c-api/init.rst:1195
+#: c-api/init.rst:1250
msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function."
msgstr ""
-#: ../Doc/c-api/init.rst:1202
+#: c-api/init.rst:1257
msgid ""
"Resume tracing and profiling in the Python thread state *tstate* suspended "
"by the :c:func:`PyThreadState_EnterTracing` function."
msgstr ""
-#: ../Doc/c-api/init.rst:1205
+#: c-api/init.rst:1260
msgid ""
"See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions."
msgstr ""
-#: ../Doc/c-api/init.rst:1213
+#: c-api/init.rst:1268
msgid "Get the current interpreter."
msgstr ""
-#: ../Doc/c-api/init.rst:1215
+#: c-api/init.rst:1270
msgid ""
"Issue a fatal error if there no current Python thread state or no current "
"interpreter. It cannot return NULL."
msgstr ""
-#: ../Doc/c-api/init.rst:1218 ../Doc/c-api/init.rst:1228
+#: c-api/init.rst:1283
msgid "The caller must hold the GIL."
msgstr ""
-#: ../Doc/c-api/init.rst:1225
+#: c-api/init.rst:1280
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 ""
-#: ../Doc/c-api/init.rst:1235
+#: c-api/init.rst:1290
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 ""
-#: ../Doc/c-api/init.rst:1239
+#: c-api/init.rst:1294
msgid ""
"This is not a replacement for :c:func:`PyModule_GetState()`, which "
"extensions should use to store interpreter-specific state information."
msgstr ""
-#: ../Doc/c-api/init.rst:1246
+#: c-api/init.rst:1301
msgid "Type of a frame evaluation function."
msgstr ""
-#: ../Doc/c-api/init.rst:1248
+#: c-api/init.rst:1303
msgid ""
"The *throwflag* parameter is used by the ``throw()`` method of generators: "
"if non-zero, handle the current exception."
msgstr ""
-#: ../Doc/c-api/init.rst:1251
+#: c-api/init.rst:1306
msgid "The function now takes a *tstate* parameter."
msgstr ""
-#: ../Doc/c-api/init.rst:1254
+#: c-api/init.rst:1309
msgid ""
"The *frame* parameter changed from ``PyFrameObject*`` to "
"``_PyInterpreterFrame*``."
msgstr ""
-#: ../Doc/c-api/init.rst:1259
+#: c-api/init.rst:1314
msgid "Get the frame evaluation function."
msgstr ""
-#: ../Doc/c-api/init.rst:1261 ../Doc/c-api/init.rst:1269
+#: c-api/init.rst:1324
msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"."
msgstr ""
-#: ../Doc/c-api/init.rst:1267
+#: c-api/init.rst:1322
msgid "Set the frame evaluation function."
msgstr ""
-#: ../Doc/c-api/init.rst:1276
+#: c-api/init.rst:1331
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 "
@@ -1441,45 +1496,45 @@ msgid ""
"raised and the caller should assume no current thread state is available."
msgstr ""
-#: ../Doc/c-api/init.rst:1285
+#: c-api/init.rst:1340
msgid ""
"Asynchronously raise an exception in a thread. The *id* argument is the "
"thread id of the target thread; *exc* is the exception object to be raised. "
"This function does not steal any references to *exc*. To prevent naive "
"misuse, you must write your own C extension to call this. Must be called "
"with the GIL held. Returns the number of thread states modified; this is "
-"normally one, but will be zero if the thread id isn't found. If *exc* is :"
-"const:`NULL`, the pending exception (if any) for the thread is cleared. This "
+"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 ""
-#: ../Doc/c-api/init.rst:1293
+#: c-api/init.rst:1348
msgid ""
"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:"
"`unsigned long`."
msgstr ""
-#: ../Doc/c-api/init.rst:1299
+#: c-api/init.rst:1354
msgid ""
"Acquire the global interpreter lock and set the current thread state to "
"*tstate*, which must not be ``NULL``. The lock must have been created "
"earlier. If this thread already has the lock, deadlock ensues."
msgstr ""
-#: ../Doc/c-api/init.rst:1310 ../Doc/c-api/init.rst:1348
+#: c-api/init.rst:1365
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 ""
-#: ../Doc/c-api/init.rst:1315
+#: c-api/init.rst:1370
msgid ""
":c:func:`PyEval_RestoreThread` is a higher-level function which is always "
"available (even when threads have not been initialized)."
msgstr ""
-#: ../Doc/c-api/init.rst:1321
+#: c-api/init.rst:1376
msgid ""
"Reset the current thread state to ``NULL`` and release the global "
"interpreter lock. The lock must have been created earlier and must be held "
@@ -1488,41 +1543,17 @@ msgid ""
"isn't, a fatal error is reported."
msgstr ""
-#: ../Doc/c-api/init.rst:1327
+#: c-api/init.rst:1382
msgid ""
":c:func:`PyEval_SaveThread` is a higher-level function which is always "
"available (even when threads have not been initialized)."
msgstr ""
-#: ../Doc/c-api/init.rst:1333
-msgid ""
-"Acquire the global interpreter lock. The lock must have been created "
-"earlier. If this thread already has the lock, a deadlock ensues."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:1336
-msgid ""
-"This function does not update the current thread state. Please use :c:func:"
-"`PyEval_RestoreThread` or :c:func:`PyEval_AcquireThread` instead."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:1356
-msgid ""
-"Release the global interpreter lock. The lock must have been created "
-"earlier."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:1358
-msgid ""
-"This function does not update the current thread state. Please use :c:func:"
-"`PyEval_SaveThread` or :c:func:`PyEval_ReleaseThread` instead."
-msgstr ""
-
-#: ../Doc/c-api/init.rst:1367
+#: c-api/init.rst:1389
msgid "Sub-interpreter support"
msgstr ""
-#: ../Doc/c-api/init.rst:1369
+#: c-api/init.rst:1391
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 "
@@ -1530,7 +1561,7 @@ msgid ""
"to do that."
msgstr ""
-#: ../Doc/c-api/init.rst:1374
+#: c-api/init.rst:1396
msgid ""
"The \"main\" interpreter is the first one created when the runtime "
"initializes. It is usually the only Python interpreter in a process. Unlike "
@@ -1541,14 +1572,115 @@ msgid ""
"returns a pointer to its state."
msgstr ""
-#: ../Doc/c-api/init.rst:1381
+#: c-api/init.rst:1403
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 ""
-#: ../Doc/c-api/init.rst:1395
+#: c-api/init.rst:1409
+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:1415
+msgid "Structure fields:"
+msgstr ""
+
+#: c-api/init.rst:1419
+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:1423
+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:1431
+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:1435
+msgid ""
+"Note that the :mod:`subprocess` module still works when fork is disallowed."
+msgstr ""
+
+#: c-api/init.rst:1440
+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:1445
+msgid ""
+"Note that the :mod:`subprocess` module still works when exec is disallowed."
+msgstr ""
+
+#: c-api/init.rst:1450
+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:1456
+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:1463
+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:1470
+msgid ""
+"This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig."
+"use_main_obmalloc` is ``0``."
+msgstr ""
+
+#: c-api/init.rst:1475
+msgid ""
+"This determines the operation of the GIL for the sub-interpreter. It may be "
+"one of the following:"
+msgstr ""
+
+#: c-api/init.rst:1482
+msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)."
+msgstr ""
+
+#: c-api/init.rst:1486
+msgid "Use (share) the main interpreter's GIL."
+msgstr ""
+
+#: c-api/init.rst:1490
+msgid "Use the sub-interpreter's own GIL."
+msgstr ""
+
+#: c-api/init.rst:1492
+msgid ""
+"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:"
+"`PyInterpreterConfig.use_main_obmalloc` must be ``0``."
+msgstr ""
+
+#: c-api/init.rst:1506
msgid ""
"Create a new sub-interpreter. This is an (almost) totally separate "
"environment for the execution of Python code. In particular, the new "
@@ -1561,25 +1693,54 @@ msgid ""
"underlying file descriptors)."
msgstr ""
-#: ../Doc/c-api/init.rst:1405
+#: c-api/init.rst:1516
+msgid ""
+"The given *config* controls the options with which the interpreter is "
+"initialized."
+msgstr ""
+
+#: c-api/init.rst:1519
+msgid ""
+"Upon success, *tstate_p* will be set to the first thread state created in "
+"the new sub-interpreter. This thread state is made in the current thread "
+"state. Note that no actual thread is created; see the discussion of thread "
+"states below. If creation of the new interpreter is unsuccessful, "
+"*tstate_p* is set to ``NULL``; no exception is set since the exception state "
+"is stored in the current thread state and there may not be a current thread "
+"state."
+msgstr ""
+
+#: c-api/init.rst:1528
+msgid ""
+"Like all other Python/C API functions, the global interpreter lock must be "
+"held before calling this function and is still held when it returns. "
+"Likewise a current thread state must be set on entry. On success, the "
+"returned thread state will be set as current. If the sub-interpreter is "
+"created with its own GIL then the GIL of the calling interpreter will be "
+"released. When the function returns, the new interpreter's GIL will be held "
+"by the current thread and the previously interpreter's GIL will remain "
+"released here."
+msgstr ""
+
+#: c-api/init.rst:1539
+msgid ""
+"Sub-interpreters are most effective when isolated from each other, with "
+"certain functionality restricted::"
+msgstr ""
+
+#: c-api/init.rst:1553
msgid ""
-"The return value points to the first thread state created in the new sub-"
-"interpreter. This thread state is made in the current thread state. Note "
-"that no actual thread is created; see the discussion of thread states "
-"below. If creation of the new interpreter is unsuccessful, ``NULL`` is "
-"returned; no exception is set since the exception state is stored in the "
-"current thread state and there may not be a current thread state. (Like all "
-"other Python/C API functions, the global interpreter lock must be held "
-"before calling this function and is still held when it returns; however, "
-"unlike most other Python/C API functions, there needn't be a current thread "
-"state on entry.)"
+"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 ""
-#: ../Doc/c-api/init.rst:1420
+#: c-api/init.rst:1562
msgid "Extension modules are shared between (sub-)interpreters as follows:"
msgstr ""
-#: ../Doc/c-api/init.rst:1422
+#: c-api/init.rst:1564
msgid ""
"For modules using multi-phase initialization, e.g. :c:func:"
"`PyModule_FromDefAndSpec`, a separate module object is created and "
@@ -1587,7 +1748,7 @@ msgid ""
"are shared between these module objects."
msgstr ""
-#: ../Doc/c-api/init.rst:1428
+#: c-api/init.rst:1570
msgid ""
"For modules using single-phase initialization, e.g. :c:func:"
"`PyModule_Create`, the first time a particular extension is imported, it is "
@@ -1599,7 +1760,7 @@ msgid ""
"might cause unwanted behavior (see `Bugs and caveats`_ below)."
msgstr ""
-#: ../Doc/c-api/init.rst:1439
+#: c-api/init.rst:1581
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:"
@@ -1609,23 +1770,84 @@ msgid ""
"shared between these modules."
msgstr ""
-#: ../Doc/c-api/init.rst:1453
+#: c-api/init.rst:1601
+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:1613
msgid ""
"Destroy the (sub-)interpreter represented by the given thread state. The "
"given thread state must be the current thread state. See the discussion of "
"thread states below. When the call returns, the current thread state is "
"``NULL``. All thread states associated with this interpreter are "
-"destroyed. (The global interpreter lock must be held before calling this "
-"function and is still held when it returns.) :c:func:`Py_FinalizeEx` will "
-"destroy all sub-interpreters that haven't been explicitly destroyed at that "
-"point."
+"destroyed. The global interpreter lock used by the target interpreter must "
+"be held before calling this function. No GIL is held when it returns."
+msgstr ""
+
+#: c-api/init.rst:1621
+msgid ""
+":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been "
+"explicitly destroyed at that point."
+msgstr ""
+
+#: c-api/init.rst:1626
+msgid "A Per-Interpreter GIL"
msgstr ""
-#: ../Doc/c-api/init.rst:1463
+#: c-api/init.rst:1628
+msgid ""
+"Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter "
+"that is completely isolated from other interpreters, including having its "
+"own GIL. The most important benefit of this isolation is that such an "
+"interpreter can execute Python code without being blocked by other "
+"interpreters or blocking any others. Thus a single Python process can truly "
+"take advantage of multiple CPU cores when running Python code. The "
+"isolation also encourages a different approach to concurrency than that of "
+"just using threads. (See :pep:`554`.)"
+msgstr ""
+
+#: c-api/init.rst:1638
+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:1649
+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:1654
+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:1665
msgid "Bugs and caveats"
msgstr ""
-#: ../Doc/c-api/init.rst:1465
+#: c-api/init.rst:1667
msgid ""
"Because sub-interpreters (and the main interpreter) are part of the same "
"process, the insulation between them isn't perfect --- for example, using "
@@ -1638,7 +1860,7 @@ msgid ""
"should be avoided if possible."
msgstr ""
-#: ../Doc/c-api/init.rst:1475
+#: c-api/init.rst:1677
msgid ""
"Special care should be taken to avoid sharing user-defined functions, "
"methods, instances or classes between sub-interpreters, since import "
@@ -1647,7 +1869,7 @@ msgid ""
"objects from which the above are reachable."
msgstr ""
-#: ../Doc/c-api/init.rst:1481
+#: c-api/init.rst:1683
msgid ""
"Also note that combining this functionality with ``PyGILState_*`` APIs is "
"delicate, because these APIs assume a bijection between Python thread states "
@@ -1659,25 +1881,25 @@ msgid ""
"created threads will probably be broken when using sub-interpreters."
msgstr ""
-#: ../Doc/c-api/init.rst:1492
+#: c-api/init.rst:1694
msgid "Asynchronous Notifications"
msgstr ""
-#: ../Doc/c-api/init.rst:1494
+#: c-api/init.rst:1696
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 ""
-#: ../Doc/c-api/init.rst:1503
+#: c-api/init.rst:1703
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 ""
-#: ../Doc/c-api/init.rst:1507
+#: c-api/init.rst:1707
msgid ""
"When successfully queued, *func* will be *eventually* called from the main "
"interpreter thread with the argument *arg*. It will be called "
@@ -1685,17 +1907,17 @@ msgid ""
"these conditions met:"
msgstr ""
-#: ../Doc/c-api/init.rst:1512
+#: c-api/init.rst:1712
msgid "on a :term:`bytecode` boundary;"
msgstr ""
-#: ../Doc/c-api/init.rst:1513
+#: c-api/init.rst:1713
msgid ""
"with the main thread holding the :term:`global interpreter lock` (*func* can "
"therefore use the full C API)."
msgstr ""
-#: ../Doc/c-api/init.rst:1516
+#: c-api/init.rst:1716
msgid ""
"*func* must return ``0`` on success, or ``-1`` on failure with an exception "
"set. *func* won't be interrupted to perform another asynchronous "
@@ -1703,20 +1925,20 @@ msgid ""
"if the global interpreter lock is released."
msgstr ""
-#: ../Doc/c-api/init.rst:1521
+#: c-api/init.rst:1721
msgid ""
"This function doesn't need a current thread state to run, and it doesn't "
"need the global interpreter lock."
msgstr ""
-#: ../Doc/c-api/init.rst:1524
+#: c-api/init.rst:1724
msgid ""
"To call this function in a subinterpreter, the caller must hold the GIL. "
"Otherwise, the function *func* can be scheduled to be called from the wrong "
"interpreter."
msgstr ""
-#: ../Doc/c-api/init.rst:1529
+#: c-api/init.rst:1729
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 "
@@ -1726,7 +1948,7 @@ msgid ""
"`PyGILState API`."
msgstr ""
-#: ../Doc/c-api/init.rst:1536
+#: c-api/init.rst:1738
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 "
@@ -1734,18 +1956,18 @@ msgid ""
"scheduled calls."
msgstr ""
-#: ../Doc/c-api/init.rst:1547
+#: c-api/init.rst:1747
msgid "Profiling and Tracing"
msgstr ""
-#: ../Doc/c-api/init.rst:1552
+#: c-api/init.rst:1752
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 ""
-#: ../Doc/c-api/init.rst:1556
+#: c-api/init.rst:1756
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 "
@@ -1755,77 +1977,76 @@ msgid ""
"reported to the Python-level trace functions in previous versions."
msgstr ""
-#: ../Doc/c-api/init.rst:1566
+#: c-api/init.rst:1766
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 :const:`PyTrace_CALL`, :const:"
-"`PyTrace_EXCEPTION`, :const:`PyTrace_LINE`, :const:`PyTrace_RETURN`, :const:"
-"`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION`, :const:`PyTrace_C_RETURN`, "
-"or :const:`PyTrace_OPCODE`, and *arg* depends on the value of *what*:"
+"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 ""
-#: ../Doc/c-api/init.rst:1575
+#: c-api/init.rst:1775
msgid "Value of *what*"
msgstr ""
-#: ../Doc/c-api/init.rst:1575
+#: c-api/init.rst:1775
msgid "Meaning of *arg*"
msgstr ""
-#: ../Doc/c-api/init.rst:1577
-msgid ":const:`PyTrace_CALL`"
+#: c-api/init.rst:1777
+msgid ":c:data:`PyTrace_CALL`"
msgstr ""
-#: ../Doc/c-api/init.rst:1577 ../Doc/c-api/init.rst:1582
-#: ../Doc/c-api/init.rst:1593
+#: c-api/init.rst:1782 c-api/init.rst:1793
msgid "Always :c:data:`Py_None`."
msgstr ""
-#: ../Doc/c-api/init.rst:1579
-msgid ":const:`PyTrace_EXCEPTION`"
+#: c-api/init.rst:1779
+msgid ":c:data:`PyTrace_EXCEPTION`"
msgstr ""
-#: ../Doc/c-api/init.rst:1579
+#: c-api/init.rst:1779
msgid "Exception information as returned by :func:`sys.exc_info`."
msgstr ""
-#: ../Doc/c-api/init.rst:1582
-msgid ":const:`PyTrace_LINE`"
+#: c-api/init.rst:1782
+msgid ":c:data:`PyTrace_LINE`"
msgstr ""
-#: ../Doc/c-api/init.rst:1584
-msgid ":const:`PyTrace_RETURN`"
+#: c-api/init.rst:1784
+msgid ":c:data:`PyTrace_RETURN`"
msgstr ""
-#: ../Doc/c-api/init.rst:1584
+#: c-api/init.rst:1784
msgid ""
"Value being returned to the caller, or ``NULL`` if caused by an exception."
msgstr ""
-#: ../Doc/c-api/init.rst:1587
-msgid ":const:`PyTrace_C_CALL`"
+#: c-api/init.rst:1787
+msgid ":c:data:`PyTrace_C_CALL`"
msgstr ""
-#: ../Doc/c-api/init.rst:1587 ../Doc/c-api/init.rst:1589
-#: ../Doc/c-api/init.rst:1591
+#: c-api/init.rst:1789 c-api/init.rst:1791
msgid "Function object being called."
msgstr ""
-#: ../Doc/c-api/init.rst:1589
-msgid ":const:`PyTrace_C_EXCEPTION`"
+#: c-api/init.rst:1789
+msgid ":c:data:`PyTrace_C_EXCEPTION`"
msgstr ""
-#: ../Doc/c-api/init.rst:1591
-msgid ":const:`PyTrace_C_RETURN`"
+#: c-api/init.rst:1791
+msgid ":c:data:`PyTrace_C_RETURN`"
msgstr ""
-#: ../Doc/c-api/init.rst:1593
-msgid ":const:`PyTrace_OPCODE`"
+#: c-api/init.rst:1793
+msgid ":c:data:`PyTrace_OPCODE`"
msgstr ""
-#: ../Doc/c-api/init.rst:1598
+#: c-api/init.rst:1798
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 "
@@ -1834,7 +2055,7 @@ msgid ""
"the corresponding frame."
msgstr ""
-#: ../Doc/c-api/init.rst:1607
+#: c-api/init.rst:1807
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 "
@@ -1846,121 +2067,202 @@ msgid ""
"profiler."
msgstr ""
-#: ../Doc/c-api/init.rst:1618
+#: c-api/init.rst:1818
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:`f_trace_lines` to "
-"*0* on that frame."
+"reported. It may be disabled for a frame by setting :attr:`~frame."
+"f_trace_lines` to *0* on that frame."
msgstr ""
-#: ../Doc/c-api/init.rst:1625
+#: c-api/init.rst:1826
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a call is about to return."
msgstr ""
-#: ../Doc/c-api/init.rst:1631
+#: c-api/init.rst:1832
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function is about to be called."
msgstr ""
-#: ../Doc/c-api/init.rst:1637
+#: c-api/init.rst:1838
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function has raised an exception."
msgstr ""
-#: ../Doc/c-api/init.rst:1643
+#: c-api/init.rst:1844
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function has returned."
msgstr ""
-#: ../Doc/c-api/init.rst:1649
+#: c-api/init.rst:1850
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:`f_trace_opcodes` to *1* on the frame."
+"attr:`~frame.f_trace_opcodes` to *1* on the frame."
msgstr ""
-#: ../Doc/c-api/init.rst:1657
+#: c-api/init.rst:1858
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 :const:"
-"`PyTrace_LINE` :const:`PyTrace_OPCODE` and :const:`PyTrace_EXCEPTION`."
+"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 ""
-#: ../Doc/c-api/init.rst:1664
+#: c-api/init.rst:1865
msgid "See also the :func:`sys.setprofile` function."
msgstr ""
-#: ../Doc/c-api/init.rst:1666 ../Doc/c-api/init.rst:1680
+#: c-api/init.rst:1874 c-api/init.rst:1900
msgid "The caller must hold the :term:`GIL`."
msgstr ""
-#: ../Doc/c-api/init.rst:1671
+#: c-api/init.rst:1871
+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:1876
+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:1884
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 :const:`PyTrace_C_CALL`, :const:"
-"`PyTrace_C_EXCEPTION` or :const:`PyTrace_C_RETURN` as a value for the *what* "
-"parameter."
+"`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 ""
-#: ../Doc/c-api/init.rst:1678
+#: c-api/init.rst:1891
msgid "See also the :func:`sys.settrace` function."
msgstr ""
-#: ../Doc/c-api/init.rst:1686
+#: c-api/init.rst:1897
+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:1902
+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:1908
+msgid "Reference tracing"
+msgstr ""
+
+#: c-api/init.rst:1914
+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:1924
+msgid ""
+"The value for the *event* parameter to :c:type:`PyRefTracer` functions when "
+"a Python object has been created."
+msgstr ""
+
+#: c-api/init.rst:1929
+msgid ""
+"The value for the *event* parameter to :c:type:`PyRefTracer` functions when "
+"a Python object has been destroyed."
+msgstr ""
+
+#: c-api/init.rst:1934
+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:1940
+msgid ""
+"Not that tracer functions **must not** create Python objects inside or "
+"otherwise the call will be re-entrant. The tracer also **must not** clear "
+"any existing exception or set an exception. The GIL will be held every time "
+"the tracer function is called."
+msgstr ""
+
+#: c-api/init.rst:1956
+msgid "The GIL must be held when calling this function."
+msgstr ""
+
+#: c-api/init.rst:1951
+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:1963
msgid "Advanced Debugger Support"
msgstr ""
-#: ../Doc/c-api/init.rst:1691
+#: c-api/init.rst:1968
msgid ""
"These functions are only intended to be used by advanced debugging tools."
msgstr ""
-#: ../Doc/c-api/init.rst:1696
+#: c-api/init.rst:1973
msgid ""
"Return the interpreter state object at the head of the list of all such "
"objects."
msgstr ""
-#: ../Doc/c-api/init.rst:1701
+#: c-api/init.rst:1978
msgid "Return the main interpreter state object."
msgstr ""
-#: ../Doc/c-api/init.rst:1706
+#: c-api/init.rst:1983
msgid ""
"Return the next interpreter state object after *interp* from the list of all "
"such objects."
msgstr ""
-#: ../Doc/c-api/init.rst:1712
+#: c-api/init.rst:1989
msgid ""
"Return the pointer to the first :c:type:`PyThreadState` object in the list "
"of threads associated with the interpreter *interp*."
msgstr ""
-#: ../Doc/c-api/init.rst:1718
+#: c-api/init.rst:1995
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 ""
-#: ../Doc/c-api/init.rst:1725
+#: c-api/init.rst:2002
msgid "Thread Local Storage Support"
msgstr ""
-#: ../Doc/c-api/init.rst:1729
+#: c-api/init.rst:2006
msgid ""
"The Python interpreter provides low-level support for thread-local storage "
"(TLS) which wraps the underlying native TLS implementation to support the "
@@ -1970,19 +2272,19 @@ msgid ""
"thread."
msgstr ""
-#: ../Doc/c-api/init.rst:1736
+#: c-api/init.rst:2013
msgid ""
"The GIL does *not* need to be held when calling these functions; they supply "
"their own locking."
msgstr ""
-#: ../Doc/c-api/init.rst:1739
+#: c-api/init.rst:2016
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 ""
-#: ../Doc/c-api/init.rst:1743
+#: c-api/init.rst:2020
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 "
@@ -1990,22 +2292,22 @@ msgid ""
"don't do refcount operations on them either."
msgstr ""
-#: ../Doc/c-api/init.rst:1751
+#: c-api/init.rst:2028
msgid "Thread Specific Storage (TSS) API"
msgstr ""
-#: ../Doc/c-api/init.rst:1753
+#: c-api/init.rst:2030
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 ""
-#: ../Doc/c-api/init.rst:1759
+#: c-api/init.rst:2036
msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)"
msgstr ""
-#: ../Doc/c-api/init.rst:1764
+#: c-api/init.rst:2041
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 "
@@ -2013,52 +2315,52 @@ msgid ""
"public members in this structure."
msgstr ""
-#: ../Doc/c-api/init.rst:1769
+#: c-api/init.rst:2046
msgid ""
"When :ref:`Py_LIMITED_API ` is not defined, static allocation of "
"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed."
msgstr ""
-#: ../Doc/c-api/init.rst:1775
+#: c-api/init.rst:2052
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 ""
-#: ../Doc/c-api/init.rst:1780
+#: c-api/init.rst:2057
msgid "Dynamic Allocation"
msgstr ""
-#: ../Doc/c-api/init.rst:1782
+#: c-api/init.rst:2059
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 ""
-#: ../Doc/c-api/init.rst:1789
+#: c-api/init.rst:2066
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 ""
-#: ../Doc/c-api/init.rst:1796
+#: c-api/init.rst:2073
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 ""
-#: ../Doc/c-api/init.rst:1802
+#: c-api/init.rst:2079
msgid ""
"A freed key becomes a dangling pointer. You should reset the key to ``NULL``."
msgstr ""
-#: ../Doc/c-api/init.rst:1807
+#: c-api/init.rst:2084
msgid "Methods"
msgstr ""
-#: ../Doc/c-api/init.rst:1809
+#: c-api/init.rst:2086
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 "
@@ -2066,13 +2368,13 @@ msgid ""
"func:`PyThread_tss_create`."
msgstr ""
-#: ../Doc/c-api/init.rst:1817
+#: c-api/init.rst:2094
msgid ""
"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized "
"by :c:func:`PyThread_tss_create`."
msgstr ""
-#: ../Doc/c-api/init.rst:1823
+#: c-api/init.rst:2100
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 "
@@ -2081,7 +2383,7 @@ msgid ""
"no-op and immediately returns success."
msgstr ""
-#: ../Doc/c-api/init.rst:1832
+#: c-api/init.rst:2109
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 "
@@ -2090,31 +2392,31 @@ msgid ""
"key -- calling it on an already destroyed key is a no-op."
msgstr ""
-#: ../Doc/c-api/init.rst:1841
+#: c-api/init.rst:2118
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 ""
-#: ../Doc/c-api/init.rst:1848
+#: c-api/init.rst:2125
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 ""
-#: ../Doc/c-api/init.rst:1856
+#: c-api/init.rst:2133
msgid "Thread Local Storage (TLS) API"
msgstr ""
-#: ../Doc/c-api/init.rst:1858
+#: c-api/init.rst:2135
msgid ""
"This API is superseded by :ref:`Thread Specific Storage (TSS) API `."
msgstr ""
-#: ../Doc/c-api/init.rst:1863
+#: c-api/init.rst:2140
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 "
@@ -2123,8 +2425,160 @@ msgid ""
"platforms."
msgstr ""
-#: ../Doc/c-api/init.rst:1868
+#: c-api/init.rst:2145
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:330
+msgid "PyEval_InitThreads()"
+msgstr ""
+
+#: c-api/init.rst:330
+msgid "modules (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:564
+msgid "path (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:564 c-api/init.rst:1498 c-api/init.rst:1593
+msgid "module"
+msgstr ""
+
+#: c-api/init.rst:1498 c-api/init.rst:1593
+msgid "builtins"
+msgstr ""
+
+#: c-api/init.rst:1498 c-api/init.rst:1593
+msgid "__main__"
+msgstr ""
+
+#: c-api/init.rst:1498 c-api/init.rst:1593
+msgid "sys"
+msgstr ""
+
+#: c-api/init.rst:564
+msgid "search"
+msgstr ""
+
+#: c-api/init.rst:564
+msgid "path"
+msgstr ""
+
+#: c-api/init.rst:1558 c-api/init.rst:1611
+msgid "Py_FinalizeEx (C function)"
+msgstr ""
+
+#: c-api/init.rst:433
+msgid "Py_Initialize()"
+msgstr ""
+
+#: c-api/init.rst:662
+msgid "main()"
+msgstr ""
+
+#: c-api/init.rst:433
+msgid "Py_GetPath()"
+msgstr ""
+
+#: c-api/init.rst:543
+msgid "executable (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:639 c-api/init.rst:653
+msgid "version (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:609
+msgid "platform (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:626
+msgid "copyright (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:662
+msgid "Py_FatalError()"
+msgstr ""
+
+#: c-api/init.rst:662
+msgid "argv (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:782
+msgid "global interpreter lock"
+msgstr ""
+
+#: c-api/init.rst:782
+msgid "interpreter lock"
+msgstr ""
+
+#: c-api/init.rst:782
+msgid "lock, interpreter"
+msgstr ""
+
+#: c-api/init.rst:795
+msgid "setswitchinterval (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:804
+msgid "PyThreadState (C type)"
+msgstr ""
+
+#: c-api/init.rst:830
+msgid "Py_BEGIN_ALLOW_THREADS (C macro)"
+msgstr ""
+
+#: c-api/init.rst:830
+msgid "Py_END_ALLOW_THREADS (C macro)"
+msgstr ""
+
+#: c-api/init.rst:846
+msgid "PyEval_RestoreThread (C function)"
+msgstr ""
+
+#: c-api/init.rst:846
+msgid "PyEval_SaveThread (C function)"
+msgstr ""
+
+#: c-api/init.rst:977
+msgid "PyEval_AcquireThread()"
+msgstr ""
+
+#: c-api/init.rst:977
+msgid "PyEval_ReleaseThread()"
+msgstr ""
+
+#: c-api/init.rst:977
+msgid "PyEval_SaveThread()"
+msgstr ""
+
+#: c-api/init.rst:977
+msgid "PyEval_RestoreThread()"
+msgstr ""
+
+#: c-api/init.rst:999
+msgid "_thread"
+msgstr ""
+
+#: c-api/init.rst:1593
+msgid "stdout (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:1593
+msgid "stderr (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:1593
+msgid "stdin (in module sys)"
+msgstr ""
+
+#: c-api/init.rst:1558
+msgid "Py_Initialize (C function)"
+msgstr ""
+
+#: c-api/init.rst:1588
+msgid "close (in module os)"
+msgstr ""
diff --git a/c-api/init_config.po b/c-api/init_config.po
index 29fc3fd..eb2bbee 100644
--- a/c-api/init_config.po
+++ b/c-api/init_config.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,22 +17,22 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/init_config.rst:7
+#: c-api/init_config.rst:7
msgid "Python Initialization Configuration"
msgstr ""
-#: ../Doc/c-api/init_config.rst:11
+#: c-api/init_config.rst:11
msgid ""
"Python can be initialized with :c:func:`Py_InitializeFromConfig` and the :c:"
"type:`PyConfig` structure. It can be preinitialized with :c:func:"
"`Py_PreInitialize` and the :c:type:`PyPreConfig` structure."
msgstr ""
-#: ../Doc/c-api/init_config.rst:15
+#: c-api/init_config.rst:15
msgid "There are two kinds of configuration:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:17
+#: c-api/init_config.rst:17
msgid ""
"The :ref:`Python Configuration ` can be used to build a "
"customized Python which behaves as the regular Python. For example, "
@@ -40,7 +40,7 @@ msgid ""
"Python."
msgstr ""
-#: ../Doc/c-api/init_config.rst:22
+#: c-api/init_config.rst:22
msgid ""
"The :ref:`Isolated Configuration ` can be used to embed "
"Python into an application. It isolates Python from the system. For example, "
@@ -48,344 +48,356 @@ msgid ""
"no signal handler is registered."
msgstr ""
-#: ../Doc/c-api/init_config.rst:27
+#: c-api/init_config.rst:27
msgid ""
"The :c:func:`Py_RunMain` function can be used to write a customized Python "
"program."
msgstr ""
-#: ../Doc/c-api/init_config.rst:30
+#: c-api/init_config.rst:30
msgid ""
"See also :ref:`Initialization, Finalization, and Threads `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:33
+#: c-api/init_config.rst:33
msgid ":pep:`587` \"Python Initialization Configuration\"."
msgstr ""
-#: ../Doc/c-api/init_config.rst:37
+#: c-api/init_config.rst:37
msgid "Example"
msgstr ""
-#: ../Doc/c-api/init_config.rst:39
+#: c-api/init_config.rst:39
msgid "Example of customized Python always running in isolated mode::"
msgstr ""
-#: ../Doc/c-api/init_config.rst:76
+#: c-api/init_config.rst:76
msgid "PyWideStringList"
msgstr ""
-#: ../Doc/c-api/init_config.rst:80
+#: c-api/init_config.rst:80
msgid "List of ``wchar_t*`` strings."
msgstr ""
-#: ../Doc/c-api/init_config.rst:82
+#: c-api/init_config.rst:82
msgid ""
"If *length* is non-zero, *items* must be non-``NULL`` and all strings must "
"be non-``NULL``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:85
+#: c-api/init_config.rst:87
msgid "Methods:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:89
+#: c-api/init_config.rst:91
msgid "Append *item* to *list*."
msgstr ""
-#: ../Doc/c-api/init_config.rst:91 ../Doc/c-api/init_config.rst:102
+#: c-api/init_config.rst:104
msgid "Python must be preinitialized to call this function."
msgstr ""
-#: ../Doc/c-api/init_config.rst:95
+#: c-api/init_config.rst:97
msgid "Insert *item* into *list* at *index*."
msgstr ""
-#: ../Doc/c-api/init_config.rst:97
+#: c-api/init_config.rst:99
msgid ""
"If *index* is greater than or equal to *list* length, append *item* to "
"*list*."
msgstr ""
-#: ../Doc/c-api/init_config.rst:100
+#: c-api/init_config.rst:102
msgid "*index* must be greater than or equal to ``0``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:104 ../Doc/c-api/init_config.rst:124
-#: ../Doc/c-api/init_config.rst:225 ../Doc/c-api/init_config.rst:530
+#: c-api/init_config.rst:128 c-api/init_config.rst:554
msgid "Structure fields:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:108
+#: c-api/init_config.rst:112
msgid "List length."
msgstr ""
-#: ../Doc/c-api/init_config.rst:112
+#: c-api/init_config.rst:116
msgid "List items."
msgstr ""
-#: ../Doc/c-api/init_config.rst:115
+#: c-api/init_config.rst:119
msgid "PyStatus"
msgstr ""
-#: ../Doc/c-api/init_config.rst:119
+#: c-api/init_config.rst:123
msgid ""
"Structure to store an initialization function status: success, error or exit."
msgstr ""
-#: ../Doc/c-api/init_config.rst:122
+#: c-api/init_config.rst:126
msgid "For an error, it can store the C function name which created the error."
msgstr ""
-#: ../Doc/c-api/init_config.rst:128
+#: c-api/init_config.rst:132
msgid "Exit code. Argument passed to ``exit()``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:132
+#: c-api/init_config.rst:136
msgid "Error message."
msgstr ""
-#: ../Doc/c-api/init_config.rst:136
+#: c-api/init_config.rst:140
msgid "Name of the function which created an error, can be ``NULL``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:138
+#: c-api/init_config.rst:144
msgid "Functions to create a status:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:142
+#: c-api/init_config.rst:148
msgid "Success."
msgstr ""
-#: ../Doc/c-api/init_config.rst:146
+#: c-api/init_config.rst:152
msgid "Initialization error with a message."
msgstr ""
-#: ../Doc/c-api/init_config.rst:148
+#: c-api/init_config.rst:154
msgid "*err_msg* must not be ``NULL``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:152
+#: c-api/init_config.rst:158
msgid "Memory allocation failure (out of memory)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:156
+#: c-api/init_config.rst:162
msgid "Exit Python with the specified exit code."
msgstr ""
-#: ../Doc/c-api/init_config.rst:158
+#: c-api/init_config.rst:164
msgid "Functions to handle a status:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:162
+#: c-api/init_config.rst:168
msgid ""
"Is the status an error or an exit? If true, the exception must be handled; "
"by calling :c:func:`Py_ExitStatusException` for example."
msgstr ""
-#: ../Doc/c-api/init_config.rst:167
+#: c-api/init_config.rst:173
msgid "Is the result an error?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:171
+#: c-api/init_config.rst:177
msgid "Is the result an exit?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:175
+#: c-api/init_config.rst:181
msgid ""
"Call ``exit(exitcode)`` if *status* is an exit. Print the error message and "
"exit with a non-zero exit code if *status* is an error. Must only be called "
"if ``PyStatus_Exception(status)`` is non-zero."
msgstr ""
-#: ../Doc/c-api/init_config.rst:180
+#: c-api/init_config.rst:186
msgid ""
"Internally, Python uses macros which set ``PyStatus.func``, whereas "
"functions to create a status set ``func`` to ``NULL``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:183
+#: c-api/init_config.rst:189
msgid "Example::"
msgstr ""
-#: ../Doc/c-api/init_config.rst:207
+#: c-api/init_config.rst:213
msgid "PyPreConfig"
msgstr ""
-#: ../Doc/c-api/init_config.rst:211
+#: c-api/init_config.rst:217
msgid "Structure used to preinitialize Python."
msgstr ""
-#: ../Doc/c-api/init_config.rst:213
+#: c-api/init_config.rst:221
msgid "Function to initialize a preconfiguration:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:217
+#: c-api/init_config.rst:225
msgid ""
"Initialize the preconfiguration with :ref:`Python Configuration `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:222
+#: c-api/init_config.rst:230
msgid ""
"Initialize the preconfiguration with :ref:`Isolated Configuration `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:229
+#: c-api/init_config.rst:239
msgid "Name of the Python memory allocators:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:231
+#: c-api/init_config.rst:241
msgid ""
"``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use "
"defaults)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:233
+#: c-api/init_config.rst:243
msgid ""
"``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators "
"`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:235
+#: c-api/init_config.rst:245
msgid ""
"``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:238
+#: c-api/init_config.rst:248
msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library."
msgstr ""
-#: ../Doc/c-api/init_config.rst:239
+#: c-api/init_config.rst:249
msgid ""
"``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with :"
"ref:`debug hooks `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:241
+#: c-api/init_config.rst:251
msgid ""
"``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator "
"`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:243
+#: c-api/init_config.rst:253
msgid ""
"``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory "
"allocator ` with :ref:`debug hooks `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:247
+#: c-api/init_config.rst:256
+msgid ""
+"``PYMEM_ALLOCATOR_MIMALLOC`` (``6``): use ``mimalloc``, a fast malloc "
+"replacement."
+msgstr ""
+
+#: c-api/init_config.rst:258
+msgid ""
+"``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` (``7``): use ``mimalloc``, a fast malloc "
+"replacement with :ref:`debug hooks `."
+msgstr ""
+
+#: c-api/init_config.rst:262
msgid ""
"``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not "
"supported if Python is :option:`configured using --without-pymalloc <--"
"without-pymalloc>`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:251
+#: c-api/init_config.rst:266
+msgid ""
+"``PYMEM_ALLOCATOR_MIMALLOC`` and ``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` are not "
+"supported if Python is :option:`configured using --without-mimalloc <--"
+"without-mimalloc>` or if the underlying atomic support isn't available."
+msgstr ""
+
+#: c-api/init_config.rst:271
msgid "See :ref:`Memory Management `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:253
+#: c-api/init_config.rst:273
msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:257
-msgid "Set the LC_CTYPE locale to the user preferred locale?"
+#: c-api/init_config.rst:277
+msgid "Set the LC_CTYPE locale to the user preferred locale."
msgstr ""
-#: ../Doc/c-api/init_config.rst:259
+#: c-api/init_config.rst:279
msgid ""
"If equals to ``0``, set :c:member:`~PyPreConfig.coerce_c_locale` and :c:"
"member:`~PyPreConfig.coerce_c_locale_warn` members to ``0``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:262 ../Doc/c-api/init_config.rst:273
+#: c-api/init_config.rst:293
msgid "See the :term:`locale encoding`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:264 ../Doc/c-api/init_config.rst:319
-#: ../Doc/c-api/init_config.rst:670
+#: c-api/init_config.rst:339 c-api/init_config.rst:710
msgid "Default: ``1`` in Python config, ``0`` in isolated config."
msgstr ""
-#: ../Doc/c-api/init_config.rst:268
+#: c-api/init_config.rst:288
msgid "If equals to ``2``, coerce the C locale."
msgstr ""
-#: ../Doc/c-api/init_config.rst:270
+#: c-api/init_config.rst:290
msgid ""
"If equals to ``1``, read the LC_CTYPE locale to decide if it should be "
"coerced."
msgstr ""
-#: ../Doc/c-api/init_config.rst:275 ../Doc/c-api/init_config.rst:281
+#: c-api/init_config.rst:301
msgid "Default: ``-1`` in Python config, ``0`` in isolated config."
msgstr ""
-#: ../Doc/c-api/init_config.rst:279
+#: c-api/init_config.rst:299
msgid "If non-zero, emit a warning if the C locale is coerced."
msgstr ""
-#: ../Doc/c-api/init_config.rst:285
+#: c-api/init_config.rst:305
msgid ""
":ref:`Python Development Mode `: see :c:member:`PyConfig.dev_mode`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:288 ../Doc/c-api/init_config.rst:679
-#: ../Doc/c-api/init_config.rst:721 ../Doc/c-api/init_config.rst:1150
+#: c-api/init_config.rst:719 c-api/init_config.rst:1244
msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode."
msgstr ""
-#: ../Doc/c-api/init_config.rst:292
+#: c-api/init_config.rst:312
msgid "Isolated mode: see :c:member:`PyConfig.isolated`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:294 ../Doc/c-api/init_config.rst:846
+#: c-api/init_config.rst:921
msgid "Default: ``0`` in Python mode, ``1`` in isolated mode."
msgstr ""
-#: ../Doc/c-api/init_config.rst:298
+#: c-api/init_config.rst:318
msgid "If non-zero:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:300
+#: c-api/init_config.rst:320
msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``,"
msgstr ""
-#: ../Doc/c-api/init_config.rst:301
+#: c-api/init_config.rst:321
msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``,"
msgstr ""
-#: ../Doc/c-api/init_config.rst:302
+#: c-api/init_config.rst:322
msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:304
+#: c-api/init_config.rst:324
msgid ""
"Initialized the from :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment "
"variable value."
msgstr ""
-#: ../Doc/c-api/init_config.rst:307 ../Doc/c-api/init_config.rst:859
+#: c-api/init_config.rst:935
msgid ""
"Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for "
"Windows specific code."
msgstr ""
-#: ../Doc/c-api/init_config.rst:310 ../Doc/c-api/init_config.rst:618
-#: ../Doc/c-api/init_config.rst:625 ../Doc/c-api/init_config.rst:692
-#: ../Doc/c-api/init_config.rst:801 ../Doc/c-api/init_config.rst:815
-#: ../Doc/c-api/init_config.rst:829 ../Doc/c-api/init_config.rst:862
-#: ../Doc/c-api/init_config.rst:876 ../Doc/c-api/init_config.rst:936
-#: ../Doc/c-api/init_config.rst:985 ../Doc/c-api/init_config.rst:1045
-#: ../Doc/c-api/init_config.rst:1085 ../Doc/c-api/init_config.rst:1114
-#: ../Doc/c-api/init_config.rst:1187
+#: c-api/init_config.rst:658 c-api/init_config.rst:732
+#: c-api/init_config.rst:857 c-api/init_config.rst:938
+#: c-api/init_config.rst:1012 c-api/init_config.rst:1126
+#: c-api/init_config.rst:1209 c-api/init_config.rst:1298
msgid "Default: ``0``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:314
+#: c-api/init_config.rst:334
msgid ""
"If non-zero, :c:func:`Py_PreInitializeFromArgs` and :c:func:"
"`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the same way "
@@ -393,95 +405,93 @@ msgid ""
"Arguments `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:323
+#: c-api/init_config.rst:343
msgid ""
"Use :ref:`environment variables `? See :c:member:`PyConfig."
"use_environment`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:326 ../Doc/c-api/init_config.rst:1161
+#: c-api/init_config.rst:1272
msgid "Default: ``1`` in Python config and ``0`` in isolated config."
msgstr ""
-#: ../Doc/c-api/init_config.rst:330
+#: c-api/init_config.rst:350
msgid "If non-zero, enable the :ref:`Python UTF-8 Mode `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:332
+#: c-api/init_config.rst:352
msgid ""
"Set to ``0`` or ``1`` by the :option:`-X utf8 <-X>` command line option and "
"the :envvar:`PYTHONUTF8` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:335
+#: c-api/init_config.rst:355
msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:337
+#: c-api/init_config.rst:357
msgid "Default: ``-1`` in Python config and ``0`` in isolated config."
msgstr ""
-#: ../Doc/c-api/init_config.rst:343
+#: c-api/init_config.rst:363
msgid "Preinitialize Python with PyPreConfig"
msgstr ""
-#: ../Doc/c-api/init_config.rst:345
+#: c-api/init_config.rst:365
msgid "The preinitialization of Python:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:347
+#: c-api/init_config.rst:367
msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)"
msgstr ""
-#: ../Doc/c-api/init_config.rst:348
+#: c-api/init_config.rst:368
msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)"
msgstr ""
-#: ../Doc/c-api/init_config.rst:349
+#: c-api/init_config.rst:369
msgid ""
"Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig."
"utf8_mode`)"
msgstr ""
-#: ../Doc/c-api/init_config.rst:352
+#: c-api/init_config.rst:372
msgid ""
"The current preconfiguration (``PyPreConfig`` type) is stored in "
"``_PyRuntime.preconfig``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:355
+#: c-api/init_config.rst:375
msgid "Functions to preinitialize Python:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:359 ../Doc/c-api/init_config.rst:365
-#: ../Doc/c-api/init_config.rst:374
+#: c-api/init_config.rst:385 c-api/init_config.rst:394
msgid "Preinitialize Python from *preconfig* preconfiguration."
msgstr ""
-#: ../Doc/c-api/init_config.rst:361 ../Doc/c-api/init_config.rst:370
-#: ../Doc/c-api/init_config.rst:379
+#: c-api/init_config.rst:390 c-api/init_config.rst:399
msgid "*preconfig* must not be ``NULL``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:367
+#: c-api/init_config.rst:387
msgid ""
"Parse *argv* command line arguments (bytes strings) if :c:member:"
"`~PyPreConfig.parse_argv` of *preconfig* is non-zero."
msgstr ""
-#: ../Doc/c-api/init_config.rst:376
+#: c-api/init_config.rst:396
msgid ""
"Parse *argv* command line arguments (wide strings) if :c:member:"
"`~PyPreConfig.parse_argv` of *preconfig* is non-zero."
msgstr ""
-#: ../Doc/c-api/init_config.rst:381 ../Doc/c-api/init_config.rst:1249
+#: c-api/init_config.rst:1360
msgid ""
"The caller is responsible to handle exceptions (error or exit) using :c:func:"
"`PyStatus_Exception` and :c:func:`Py_ExitStatusException`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:384
+#: c-api/init_config.rst:404
msgid ""
"For :ref:`Python Configuration ` (:c:func:"
"`PyPreConfig_InitPythonConfig`), if Python is initialized with command line "
@@ -491,7 +501,7 @@ msgid ""
"`Python UTF-8 Mode `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:391
+#: c-api/init_config.rst:411
msgid ""
"``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and "
"before :c:func:`Py_InitializeFromConfig` to install a custom memory "
@@ -499,7 +509,7 @@ msgid ""
"`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:396
+#: c-api/init_config.rst:416
msgid ""
"Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not "
"be used before the Python preinitialization, whereas calling directly "
@@ -507,90 +517,89 @@ msgid ""
"not be called before the Python preinitialization."
msgstr ""
-#: ../Doc/c-api/init_config.rst:401
+#: c-api/init_config.rst:421
msgid ""
"Example using the preinitialization to enable the :ref:`Python UTF-8 Mode "
"`::"
msgstr ""
-#: ../Doc/c-api/init_config.rst:423
+#: c-api/init_config.rst:443
msgid "PyConfig"
msgstr ""
-#: ../Doc/c-api/init_config.rst:427
+#: c-api/init_config.rst:447
msgid "Structure containing most parameters to configure Python."
msgstr ""
-#: ../Doc/c-api/init_config.rst:429
+#: c-api/init_config.rst:449
msgid ""
"When done, the :c:func:`PyConfig_Clear` function must be used to release the "
"configuration memory."
msgstr ""
-#: ../Doc/c-api/init_config.rst:432
+#: c-api/init_config.rst:454
msgid "Structure methods:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:436
+#: c-api/init_config.rst:458
msgid ""
"Initialize configuration with the :ref:`Python Configuration `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:441
+#: c-api/init_config.rst:463
msgid ""
"Initialize configuration with the :ref:`Isolated Configuration `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:446
+#: c-api/init_config.rst:468
msgid "Copy the wide character string *str* into ``*config_str``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:448 ../Doc/c-api/init_config.rst:455
-#: ../Doc/c-api/init_config.rst:462 ../Doc/c-api/init_config.rst:470
-#: ../Doc/c-api/init_config.rst:476 ../Doc/c-api/init_config.rst:493
+#: c-api/init_config.rst:477 c-api/init_config.rst:492
+#: c-api/init_config.rst:515
msgid ":ref:`Preinitialize Python ` if needed."
msgstr ""
-#: ../Doc/c-api/init_config.rst:452
+#: c-api/init_config.rst:474
msgid ""
"Decode *str* using :c:func:`Py_DecodeLocale` and set the result into "
"``*config_str``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:459
+#: c-api/init_config.rst:481
msgid ""
"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) "
"from the *argv* list of wide character strings."
msgstr ""
-#: ../Doc/c-api/init_config.rst:466
+#: c-api/init_config.rst:488
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 ""
-#: ../Doc/c-api/init_config.rst:474
+#: c-api/init_config.rst:496
msgid "Set the list of wide strings *list* to *length* and *items*."
msgstr ""
-#: ../Doc/c-api/init_config.rst:480
+#: c-api/init_config.rst:502
msgid "Read all Python configuration."
msgstr ""
-#: ../Doc/c-api/init_config.rst:482
+#: c-api/init_config.rst:504
msgid "Fields which are already initialized are left unchanged."
msgstr ""
-#: ../Doc/c-api/init_config.rst:484
+#: c-api/init_config.rst:506
msgid ""
"Fields for :ref:`path configuration ` are no longer "
"calculated or modified when calling this function, as of Python 3.11."
msgstr ""
-#: ../Doc/c-api/init_config.rst:487 ../Doc/c-api/init_config.rst:965
+#: c-api/init_config.rst:1041
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 "
@@ -599,25 +608,25 @@ msgid ""
"as Python options."
msgstr ""
-#: ../Doc/c-api/init_config.rst:495
+#: c-api/init_config.rst:517
msgid ""
"The :c:member:`PyConfig.argv` arguments are now only parsed once, :c:member:"
"`PyConfig.parse_argv` is set to ``2`` after arguments are parsed, and "
"arguments are only parsed if :c:member:`PyConfig.parse_argv` equals ``1``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:501
+#: c-api/init_config.rst:523
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 ""
-#: ../Doc/c-api/init_config.rst:509
+#: c-api/init_config.rst:531
msgid "Release configuration memory."
msgstr ""
-#: ../Doc/c-api/init_config.rst:511
+#: c-api/init_config.rst:533
msgid ""
"Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. "
"In that case, the Python preinitialization configuration (:c:type:"
@@ -626,436 +635,451 @@ msgid ""
"before calling a :c:type:`PyConfig` method:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:517
+#: c-api/init_config.rst:539
msgid ":c:member:`PyConfig.dev_mode`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:518
+#: c-api/init_config.rst:540
msgid ":c:member:`PyConfig.isolated`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:519
+#: c-api/init_config.rst:541
msgid ":c:member:`PyConfig.parse_argv`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:520
+#: c-api/init_config.rst:542
msgid ":c:member:`PyConfig.use_environment`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:522
+#: c-api/init_config.rst:544
msgid ""
"Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` "
"is used, this method must be called before other methods, since the "
"preinitialization configuration depends on command line arguments (if :c:"
-"member:`parse_argv` is non-zero)."
+"member:`~PyConfig.parse_argv` is non-zero)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:527
+#: c-api/init_config.rst:549
msgid ""
"The caller of these methods is responsible to handle exceptions (error or "
"exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:534
-msgid "Command line arguments: :data:`sys.argv`."
+#: c-api/init_config.rst:562
+msgid ""
+"Set :data:`sys.argv` command line arguments based on :c:member:`~PyConfig."
+"argv`. These parameters are similar to those passed to the program's :c:"
+"func:`main` function with the difference that the first entry should refer "
+"to the script file to be executed rather than the executable hosting the "
+"Python interpreter. If there isn't a script that will be run, the first "
+"entry in :c:member:`~PyConfig.argv` can be an empty string."
msgstr ""
-#: ../Doc/c-api/init_config.rst:536
+#: c-api/init_config.rst:570
msgid ""
"Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse :c:member:`~PyConfig."
"argv` the same way the regular Python parses Python command line arguments "
"and then to strip Python arguments from :c:member:`~PyConfig.argv`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:541
+#: c-api/init_config.rst:575
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 ""
-#: ../Doc/c-api/init_config.rst:544 ../Doc/c-api/init_config.rst:571
-#: ../Doc/c-api/init_config.rst:583 ../Doc/c-api/init_config.rst:591
-#: ../Doc/c-api/init_config.rst:699 ../Doc/c-api/init_config.rst:708
-#: ../Doc/c-api/init_config.rst:790 ../Doc/c-api/init_config.rst:906
-#: ../Doc/c-api/init_config.rst:1004 ../Doc/c-api/init_config.rst:1022
-#: ../Doc/c-api/init_config.rst:1036 ../Doc/c-api/init_config.rst:1053
-#: ../Doc/c-api/init_config.rst:1066 ../Doc/c-api/init_config.rst:1074
+#: c-api/init_config.rst:605 c-api/init_config.rst:629
+#: c-api/init_config.rst:750 c-api/init_config.rst:982
+#: c-api/init_config.rst:1102 c-api/init_config.rst:1134
+#: c-api/init_config.rst:1155 c-api/init_config.rst:1169
msgid "Default: ``NULL``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:546
+#: c-api/init_config.rst:580
msgid "See also the :c:member:`~PyConfig.orig_argv` member."
msgstr ""
-#: ../Doc/c-api/init_config.rst:550
+#: c-api/init_config.rst:584
msgid ""
"If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path to :"
"data:`sys.path` at startup:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:553
+#: c-api/init_config.rst:587
msgid ""
"If :c:member:`argv[0] ` is equal to ``L\"-m\"`` (``python -m "
"module``), prepend the current working directory."
msgstr ""
-#: ../Doc/c-api/init_config.rst:555
+#: c-api/init_config.rst:589
msgid ""
"If running a script (``python script.py``), prepend the script's directory. "
"If it's a symbolic link, resolve symbolic links."
msgstr ""
-#: ../Doc/c-api/init_config.rst:557
+#: c-api/init_config.rst:591
msgid ""
"Otherwise (``python -c code`` and ``python``), prepend an empty string, "
"which means the current working directory."
msgstr ""
-#: ../Doc/c-api/init_config.rst:560
+#: c-api/init_config.rst:594
msgid ""
"Set to ``1`` by the :option:`-P` command line option and the :envvar:"
"`PYTHONSAFEPATH` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:563
+#: c-api/init_config.rst:597
msgid "Default: ``0`` in Python config, ``1`` in isolated config."
msgstr ""
-#: ../Doc/c-api/init_config.rst:569
+#: c-api/init_config.rst:603
msgid ":data:`sys.base_exec_prefix`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:573 ../Doc/c-api/init_config.rst:585
-#: ../Doc/c-api/init_config.rst:593 ../Doc/c-api/init_config.rst:701
-#: ../Doc/c-api/init_config.rst:710 ../Doc/c-api/init_config.rst:923
-#: ../Doc/c-api/init_config.rst:1006
+#: c-api/init_config.rst:621 c-api/init_config.rst:741
+#: c-api/init_config.rst:999 c-api/init_config.rst:1085
msgid "Part of the :ref:`Python Path Configuration ` output."
msgstr ""
-#: ../Doc/c-api/init_config.rst:577
+#: c-api/init_config.rst:609
+msgid "See also :c:member:`PyConfig.exec_prefix`."
+msgstr ""
+
+#: c-api/init_config.rst:613
msgid "Python base executable: :data:`sys._base_executable`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:579
+#: c-api/init_config.rst:615
msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:581
+#: c-api/init_config.rst:617
msgid "Set from :c:member:`PyConfig.executable` if ``NULL``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:589
+#: c-api/init_config.rst:623
+msgid "See also :c:member:`PyConfig.executable`."
+msgstr ""
+
+#: c-api/init_config.rst:627
msgid ":data:`sys.base_prefix`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:597
+#: c-api/init_config.rst:633
+msgid "See also :c:member:`PyConfig.prefix`."
+msgstr ""
+
+#: c-api/init_config.rst:637
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 ""
-#: ../Doc/c-api/init_config.rst:600
+#: c-api/init_config.rst:640
msgid ""
"Set to ``0`` by the :option:`-u` command line option and the :envvar:"
"`PYTHONUNBUFFERED` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:603
+#: c-api/init_config.rst:643
msgid "stdin is always opened in buffered mode."
msgstr ""
-#: ../Doc/c-api/init_config.rst:605 ../Doc/c-api/init_config.rst:638
-#: ../Doc/c-api/init_config.rst:1102 ../Doc/c-api/init_config.rst:1219
+#: c-api/init_config.rst:678 c-api/init_config.rst:1330
msgid "Default: ``1``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:609
+#: c-api/init_config.rst:649
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 ""
-#: ../Doc/c-api/init_config.rst:613
+#: c-api/init_config.rst:653
msgid ""
"If equal or greater to ``2``, raise a :exc:`BytesWarning` exception in these "
"cases."
msgstr ""
-#: ../Doc/c-api/init_config.rst:616
+#: c-api/init_config.rst:656
msgid "Incremented by the :option:`-b` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:622
+#: c-api/init_config.rst:662
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 ""
-#: ../Doc/c-api/init_config.rst:631
+#: c-api/init_config.rst:671
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 ""
-#: ../Doc/c-api/init_config.rst:635
+#: c-api/init_config.rst:675
msgid ""
"Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable and "
"by the :option:`-X no_debug_ranges <-X>` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:644
+#: c-api/init_config.rst:684
msgid ""
"Control the validation behavior of hash-based ``.pyc`` files: value of the :"
"option:`--check-hash-based-pycs` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:647
+#: c-api/init_config.rst:687
msgid "Valid values:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:649
+#: c-api/init_config.rst:689
msgid ""
"``L\"always\"``: Hash the source file for invalidation regardless of value "
"of the 'check_source' flag."
msgstr ""
-#: ../Doc/c-api/init_config.rst:651
+#: c-api/init_config.rst:691
msgid "``L\"never\"``: Assume that hash-based pycs always are valid."
msgstr ""
-#: ../Doc/c-api/init_config.rst:652
+#: c-api/init_config.rst:692
msgid ""
"``L\"default\"``: The 'check_source' flag in hash-based pycs determines "
"invalidation."
msgstr ""
-#: ../Doc/c-api/init_config.rst:655
+#: c-api/init_config.rst:695
msgid "Default: ``L\"default\"``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:657
+#: c-api/init_config.rst:697
msgid "See also :pep:`552` \"Deterministic pycs\"."
msgstr ""
-#: ../Doc/c-api/init_config.rst:661
+#: c-api/init_config.rst:701
msgid "If non-zero, configure C standard streams:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:663
+#: c-api/init_config.rst:703
msgid ""
"On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr."
msgstr ""
-#: ../Doc/c-api/init_config.rst:665
+#: c-api/init_config.rst:705
msgid ""
"If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of "
"stdin, stdout and stderr streams."
msgstr ""
-#: ../Doc/c-api/init_config.rst:667
+#: c-api/init_config.rst:707
msgid ""
"If :c:member:`~PyConfig.interactive` is non-zero, enable stream buffering on "
"stdin and stdout (only stdout on Windows)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:674
+#: c-api/init_config.rst:714
msgid "If non-zero, enable the :ref:`Python Development Mode `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:676
+#: c-api/init_config.rst:716
msgid ""
"Set to ``1`` by the :option:`-X dev <-X>` option and the :envvar:"
"`PYTHONDEVMODE` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:683
+#: c-api/init_config.rst:723
msgid "Dump Python references?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:685
+#: c-api/init_config.rst:725
msgid "If non-zero, dump all objects which are still alive at exit."
msgstr ""
-#: ../Doc/c-api/init_config.rst:687
+#: c-api/init_config.rst:727
msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:689
+#: c-api/init_config.rst:729
msgid ""
-"Need a special build of Python with the ``Py_TRACE_REFS`` macro defined: see "
-"the :option:`configure --with-trace-refs option <--with-trace-refs>`."
+"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 ""
-#: ../Doc/c-api/init_config.rst:696
+#: c-api/init_config.rst:736
msgid ""
"The site-specific directory prefix where the platform-dependent Python files "
"are installed: :data:`sys.exec_prefix`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:705
+#: c-api/init_config.rst:743
+msgid "See also :c:member:`PyConfig.base_exec_prefix`."
+msgstr ""
+
+#: c-api/init_config.rst:747
msgid ""
"The absolute path of the executable binary for the Python interpreter: :data:"
"`sys.executable`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:714
+#: c-api/init_config.rst:754
+msgid "See also :c:member:`PyConfig.base_executable`."
+msgstr ""
+
+#: c-api/init_config.rst:758
msgid "Enable faulthandler?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:716
+#: c-api/init_config.rst:760
msgid "If non-zero, call :func:`faulthandler.enable` at startup."
msgstr ""
-#: ../Doc/c-api/init_config.rst:718
+#: c-api/init_config.rst:762
msgid ""
"Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:"
"`PYTHONFAULTHANDLER` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:725
+#: c-api/init_config.rst:769
msgid ""
":term:`Filesystem encoding `: :func:"
"`sys.getfilesystemencoding`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:728
+#: c-api/init_config.rst:772
msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default."
msgstr ""
-#: ../Doc/c-api/init_config.rst:730
+#: c-api/init_config.rst:774
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 ""
-#: ../Doc/c-api/init_config.rst:734
+#: c-api/init_config.rst:778
msgid "Default encoding on other platforms:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:736
+#: c-api/init_config.rst:780
msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero."
msgstr ""
-#: ../Doc/c-api/init_config.rst:737
+#: c-api/init_config.rst:781
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 ""
-#: ../Doc/c-api/init_config.rst:740
+#: c-api/init_config.rst:784
msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string."
msgstr ""
-#: ../Doc/c-api/init_config.rst:741
+#: c-api/init_config.rst:785
msgid ""
"Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result."
msgstr ""
-#: ../Doc/c-api/init_config.rst:744
+#: c-api/init_config.rst:788
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 ""
-#: ../Doc/c-api/init_config.rst:747
+#: c-api/init_config.rst:791
msgid "See also the :c:member:`~PyConfig.filesystem_errors` member."
msgstr ""
-#: ../Doc/c-api/init_config.rst:751
+#: c-api/init_config.rst:795
msgid ""
":term:`Filesystem error handler `: :"
"func:`sys.getfilesystemencodeerrors`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:754
+#: c-api/init_config.rst:798
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 ""
-#: ../Doc/c-api/init_config.rst:758
+#: c-api/init_config.rst:802
msgid "On other platforms: use ``\"surrogateescape\"`` by default."
msgstr ""
-#: ../Doc/c-api/init_config.rst:760
+#: c-api/init_config.rst:804
msgid "Supported error handlers:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:762
+#: c-api/init_config.rst:806
msgid "``\"strict\"``"
msgstr ""
-#: ../Doc/c-api/init_config.rst:763
+#: c-api/init_config.rst:807
msgid "``\"surrogateescape\"``"
msgstr ""
-#: ../Doc/c-api/init_config.rst:764
+#: c-api/init_config.rst:808
msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)"
msgstr ""
-#: ../Doc/c-api/init_config.rst:766
+#: c-api/init_config.rst:810
msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member."
msgstr ""
-#: ../Doc/c-api/init_config.rst:771
+#: c-api/init_config.rst:815
msgid "Randomized hash function seed."
msgstr ""
-#: ../Doc/c-api/init_config.rst:773
+#: c-api/init_config.rst:817
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 ""
-#: ../Doc/c-api/init_config.rst:776
+#: c-api/init_config.rst:820
msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:778
+#: c-api/init_config.rst:822
msgid ""
"Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode."
msgstr ""
-#: ../Doc/c-api/init_config.rst:783
-msgid "Python home directory."
-msgstr ""
-
-#: ../Doc/c-api/init_config.rst:785
+#: c-api/init_config.rst:827
msgid ""
-"If :c:func:`Py_SetPythonHome` has been called, use its argument if it is not "
-"``NULL``."
+"Set the default Python \"home\" directory, that is, the location of the "
+"standard Python libraries (see :envvar:`PYTHONHOME`)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:788
+#: c-api/init_config.rst:830
msgid "Set by the :envvar:`PYTHONHOME` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:792 ../Doc/c-api/init_config.rst:888
-#: ../Doc/c-api/init_config.rst:908 ../Doc/c-api/init_config.rst:994
-#: ../Doc/c-api/init_config.rst:1024
+#: c-api/init_config.rst:964 c-api/init_config.rst:1073
+#: c-api/init_config.rst:1104
msgid "Part of the :ref:`Python Path Configuration ` input."
msgstr ""
-#: ../Doc/c-api/init_config.rst:796
+#: c-api/init_config.rst:838
msgid "If non-zero, profile import time."
msgstr ""
-#: ../Doc/c-api/init_config.rst:798
+#: c-api/init_config.rst:840
msgid ""
"Set the ``1`` by the :option:`-X importtime <-X>` option and the :envvar:"
"`PYTHONPROFILEIMPORTTIME` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:805
+#: c-api/init_config.rst:847
msgid "Enter interactive mode after executing a script or a command."
msgstr ""
-#: ../Doc/c-api/init_config.rst:807
+#: c-api/init_config.rst:849
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 "
@@ -1063,111 +1087,155 @@ msgid ""
"a terminal."
msgstr ""
-#: ../Doc/c-api/init_config.rst:812
+#: c-api/init_config.rst:854
msgid ""
"Incremented by the :option:`-i` command line option. Set to ``1`` if the :"
"envvar:`PYTHONINSPECT` environment variable is non-empty."
msgstr ""
-#: ../Doc/c-api/init_config.rst:819
+#: c-api/init_config.rst:861
msgid "Install Python signal handlers?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:821 ../Doc/c-api/init_config.rst:971
-#: ../Doc/c-api/init_config.rst:992 ../Doc/c-api/init_config.rst:1171
+#: c-api/init_config.rst:1047 c-api/init_config.rst:1282
msgid "Default: ``1`` in Python mode, ``0`` in isolated mode."
msgstr ""
-#: ../Doc/c-api/init_config.rst:825
+#: c-api/init_config.rst:867
msgid "If greater than ``0``, enable the interactive mode (REPL)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:827
+#: c-api/init_config.rst:869
msgid "Incremented by the :option:`-i` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:833
+#: c-api/init_config.rst:875
+msgid ""
+"Configures the :ref:`integer string conversion length limitation "
+"`. An initial value of ``-1`` means the value will be "
+"taken from the command line or environment or otherwise default to 4300 (:"
+"data:`sys.int_info.default_max_str_digits`). A value of ``0`` disables the "
+"limitation. Values greater than zero but less than 640 (:data:`sys.int_info."
+"str_digits_check_threshold`) are unsupported and will produce an error."
+msgstr ""
+
+#: c-api/init_config.rst:883
+msgid ""
+"Configured by the :option:`-X int_max_str_digits <-X>` command line flag or "
+"the :envvar:`PYTHONINTMAXSTRDIGITS` environment variable."
+msgstr ""
+
+#: c-api/init_config.rst:886
+msgid ""
+"Default: ``-1`` in Python mode. 4300 (:data:`sys.int_info."
+"default_max_str_digits`) in isolated mode."
+msgstr ""
+
+#: c-api/init_config.rst:893
+msgid ""
+"If the value of :c:member:`~PyConfig.cpu_count` is not ``-1`` then it will "
+"override the return values of :func:`os.cpu_count`, :func:`os."
+"process_cpu_count`, and :func:`multiprocessing.cpu_count`."
+msgstr ""
+
+#: c-api/init_config.rst:897
+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:1259
+msgid "Default: ``-1``."
+msgstr ""
+
+#: c-api/init_config.rst:906
msgid "If greater than ``0``, enable isolated mode:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:835
+#: c-api/init_config.rst:908
msgid ""
"Set :c:member:`~PyConfig.safe_path` to ``1``: don't prepend a potentially "
-"unsafe path to :data:`sys.path` at Python startup."
+"unsafe path to :data:`sys.path` at Python startup, such as the current "
+"directory, the script's directory or an empty string."
msgstr ""
-#: ../Doc/c-api/init_config.rst:838 ../Doc/c-api/init_config.rst:1469
-msgid "Set :c:member:`~PyConfig.use_environment` to ``0``."
+#: c-api/init_config.rst:912
+msgid ""
+"Set :c:member:`~PyConfig.use_environment` to ``0``: ignore ``PYTHON`` "
+"environment variables."
msgstr ""
-#: ../Doc/c-api/init_config.rst:839
+#: c-api/init_config.rst:914
msgid ""
"Set :c:member:`~PyConfig.user_site_directory` to ``0``: don't add the user "
"site directory to :data:`sys.path`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:841
+#: c-api/init_config.rst:916
msgid ""
"Python REPL doesn't import :mod:`readline` nor enable default readline "
"configuration on interactive prompts."
msgstr ""
-#: ../Doc/c-api/init_config.rst:844
+#: c-api/init_config.rst:919
msgid "Set to ``1`` by the :option:`-I` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:848
-msgid "See also :c:member:`PyPreConfig.isolated`."
+#: c-api/init_config.rst:923
+msgid ""
+"See also the :ref:`Isolated Configuration ` and :c:"
+"member:`PyPreConfig.isolated`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:852
+#: c-api/init_config.rst:928
msgid ""
-"If non-zero, use :class:`io.FileIO` instead of :class:`io.WindowsConsoleIO` "
-"for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys.stderr`."
+"If non-zero, use :class:`io.FileIO` instead of :class:`!io."
+"_WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys."
+"stderr`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:856
+#: c-api/init_config.rst:932
msgid ""
"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable "
"is set to a non-empty string."
msgstr ""
-#: ../Doc/c-api/init_config.rst:864
+#: c-api/init_config.rst:940
msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:868
+#: c-api/init_config.rst:944
msgid ""
"If non-zero, dump statistics on :ref:`Python pymalloc memory allocator "
"` at exit."
msgstr ""
-#: ../Doc/c-api/init_config.rst:871
+#: c-api/init_config.rst:947
msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:873
+#: c-api/init_config.rst:949
msgid ""
"The option is ignored if Python is :option:`configured using the --without-"
"pymalloc option <--without-pymalloc>`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:880
+#: c-api/init_config.rst:956
msgid "Platform library directory name: :data:`sys.platlibdir`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:882
+#: c-api/init_config.rst:958
msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:884
+#: c-api/init_config.rst:960
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 ""
-#: ../Doc/c-api/init_config.rst:892
+#: c-api/init_config.rst:968
msgid ""
"This macro is now used on Windows to locate the standard library extension "
"modules, typically under ``DLLs``. However, for compatibility, note that "
@@ -1175,21 +1243,21 @@ msgid ""
"and virtual environments."
msgstr ""
-#: ../Doc/c-api/init_config.rst:901
+#: c-api/init_config.rst:977
msgid ""
"Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:"
-"data:`os.path.pathsep`)."
+"data:`os.pathsep`)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:904
+#: c-api/init_config.rst:980
msgid "Set by the :envvar:`PYTHONPATH` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:913
+#: c-api/init_config.rst:989
msgid "Module search paths: :data:`sys.path`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:915
+#: c-api/init_config.rst:991
msgid ""
"If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, :c:func:"
"`Py_InitializeFromConfig` will replace :c:member:`~PyConfig."
@@ -1197,41 +1265,41 @@ msgid ""
"to ``1``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:920
+#: c-api/init_config.rst:996
msgid ""
"Default: empty list (``module_search_paths``) and ``0`` "
"(``module_search_paths_set``)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:927
+#: c-api/init_config.rst:1003
msgid "Compilation optimization level:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:929
+#: c-api/init_config.rst:1005
msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:930
+#: c-api/init_config.rst:1006
msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:931
+#: c-api/init_config.rst:1007
msgid "``2``: Level 1, strip docstrings."
msgstr ""
-#: ../Doc/c-api/init_config.rst:933
+#: c-api/init_config.rst:1009
msgid ""
"Incremented by the :option:`-O` command line option. Set to the :envvar:"
"`PYTHONOPTIMIZE` environment variable value."
msgstr ""
-#: ../Doc/c-api/init_config.rst:940
+#: c-api/init_config.rst:1016
msgid ""
"The list of the original command line arguments passed to the Python "
"executable: :data:`sys.orig_argv`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:943
+#: c-api/init_config.rst:1019
msgid ""
"If :c:member:`~PyConfig.orig_argv` list is empty and :c:member:`~PyConfig."
"argv` is not a list only containing an empty string, :c:func:`PyConfig_Read` "
@@ -1240,362 +1308,399 @@ msgid ""
"parse_argv` is non-zero)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:950
+#: c-api/init_config.rst:1026
msgid ""
"See also the :c:member:`~PyConfig.argv` member and the :c:func:"
"`Py_GetArgcArgv` function."
msgstr ""
-#: ../Doc/c-api/init_config.rst:953 ../Doc/c-api/init_config.rst:1206
-#: ../Doc/c-api/init_config.rst:1225
+#: c-api/init_config.rst:1317 c-api/init_config.rst:1336
msgid "Default: empty list."
msgstr ""
-#: ../Doc/c-api/init_config.rst:959
+#: c-api/init_config.rst:1035
msgid "Parse command line arguments?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:961
+#: c-api/init_config.rst:1037
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 ""
-#: ../Doc/c-api/init_config.rst:973
+#: c-api/init_config.rst:1049
msgid ""
"The :c:member:`PyConfig.argv` arguments are now only parsed if :c:member:"
"`PyConfig.parse_argv` equals to ``1``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:979
+#: c-api/init_config.rst:1055
msgid ""
"Parser debug mode. If greater than ``0``, turn on parser debugging output "
"(for expert only, depending on compilation options)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:982
+#: c-api/init_config.rst:1058
msgid ""
"Incremented by the :option:`-d` command line option. Set to the :envvar:"
"`PYTHONDEBUG` environment variable value."
msgstr ""
-#: ../Doc/c-api/init_config.rst:989
+#: c-api/init_config.rst:1166
+msgid ""
+"Needs a :ref:`debug build of Python ` (the ``Py_DEBUG`` macro "
+"must be defined)."
+msgstr ""
+
+#: c-api/init_config.rst:1068
msgid ""
"If non-zero, calculation of path configuration is allowed to log warnings "
"into ``stderr``. If equals to ``0``, suppress these warnings."
msgstr ""
-#: ../Doc/c-api/init_config.rst:996
+#: c-api/init_config.rst:1075
msgid "Now also applies on Windows."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1001
+#: c-api/init_config.rst:1080
msgid ""
"The site-specific directory prefix where the platform independent Python "
"files are installed: :data:`sys.prefix`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1010
+#: c-api/init_config.rst:1087
+msgid "See also :c:member:`PyConfig.base_prefix`."
+msgstr ""
+
+#: c-api/init_config.rst:1091
msgid ""
"Program name used to initialize :c:member:`~PyConfig.executable` and in "
"early error messages during Python initialization."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1013
-msgid "If :func:`Py_SetProgramName` has been called, use its argument."
-msgstr ""
-
-#: ../Doc/c-api/init_config.rst:1014
+#: c-api/init_config.rst:1094
msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1015
+#: c-api/init_config.rst:1095
msgid ""
"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:"
"`__PYVENV_LAUNCHER__` environment variable if set."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1017
+#: c-api/init_config.rst:1097
msgid ""
"Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and non-empty."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1019
+#: c-api/init_config.rst:1099
msgid ""
"Otherwise, use ``L\"python\"`` on Windows, or ``L\"python3\"`` on other "
"platforms."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1028
+#: c-api/init_config.rst:1108
msgid ""
"Directory where cached ``.pyc`` files are written: :data:`sys."
"pycache_prefix`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1031
+#: c-api/init_config.rst:1111
msgid ""
"Set by the :option:`-X pycache_prefix=PATH <-X>` command line option and "
-"the :envvar:`PYTHONPYCACHEPREFIX` environment variable."
+"the :envvar:`PYTHONPYCACHEPREFIX` environment variable. The command-line "
+"option takes precedence."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1034
+#: c-api/init_config.rst:1115
msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1040
+#: c-api/init_config.rst:1121
msgid ""
"Quiet mode. If greater than ``0``, don't display the copyright and version "
"at Python startup in interactive mode."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1043
+#: c-api/init_config.rst:1124
msgid "Incremented by the :option:`-q` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1049
+#: c-api/init_config.rst:1130
msgid "Value of the :option:`-c` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1051 ../Doc/c-api/init_config.rst:1072
+#: c-api/init_config.rst:1153
msgid "Used by :c:func:`Py_RunMain`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1057
+#: c-api/init_config.rst:1138
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 ""
-#: ../Doc/c-api/init_config.rst:1061
+#: c-api/init_config.rst:1142
msgid ""
"For example, it is set to ``script.py`` by the ``python3 script.py arg`` "
"command line."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1064
+#: c-api/init_config.rst:1145
msgid "See also the :c:member:`PyConfig.skip_source_first_line` option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1070
+#: c-api/init_config.rst:1151
msgid "Value of the :option:`-m` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1078
-msgid "Show total reference count at exit?"
+#: c-api/init_config.rst:1159
+msgid ""
+"``package.module`` path to module that should be imported before ``site.py`` "
+"is run."
+msgstr ""
+
+#: c-api/init_config.rst:1162
+msgid ""
+"Set by the :option:`-X presite=package.module <-X>` command-line option and "
+"the :envvar:`PYTHON_PRESITE` environment variable. The command-line option "
+"takes precedence."
+msgstr ""
+
+#: c-api/init_config.rst:1173
+msgid ""
+"Show total reference count at exit (excluding :term:`immortal` objects)?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1080
+#: c-api/init_config.rst:1175
msgid "Set to ``1`` by :option:`-X showrefcount <-X>` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1082
+#: c-api/init_config.rst:1177
msgid ""
-"Need a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` "
+"Needs a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` "
"macro must be defined)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1089
+#: c-api/init_config.rst:1184
msgid "Import the :mod:`site` module at startup?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1091
+#: c-api/init_config.rst:1186
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 ""
-#: ../Doc/c-api/init_config.rst:1094
+#: c-api/init_config.rst:1189
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 ""
-#: ../Doc/c-api/init_config.rst:1097
+#: c-api/init_config.rst:1192
msgid "Set to ``0`` by the :option:`-S` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1099
+#: c-api/init_config.rst:1194
msgid ""
-":data:`sys.flags.no_site` is set to the inverted value of :c:member:"
-"`~PyConfig.site_import`."
+":data:`sys.flags.no_site ` is set to the inverted value of :c:"
+"member:`~PyConfig.site_import`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1106
+#: c-api/init_config.rst:1201
msgid ""
"If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` "
"source."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1109
+#: c-api/init_config.rst:1204
msgid ""
"It allows the usage of non-Unix forms of ``#!cmd``. This is intended for a "
"DOS specific hack only."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1112
+#: c-api/init_config.rst:1207
msgid "Set to ``1`` by the :option:`-x` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1119
+#: c-api/init_config.rst:1214
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 ""
-#: ../Doc/c-api/init_config.rst:1123
-msgid ""
-"If :c:func:`Py_SetStandardStreamEncoding` has been called, use its *error* "
-"and *errors* arguments if they are not ``NULL``."
-msgstr ""
-
-#: ../Doc/c-api/init_config.rst:1126
+#: c-api/init_config.rst:1218
msgid ""
"Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1129
+#: c-api/init_config.rst:1221
msgid "Default encoding:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1131
+#: c-api/init_config.rst:1223
msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1132
+#: c-api/init_config.rst:1224
msgid "Otherwise, use the :term:`locale encoding`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1134
+#: c-api/init_config.rst:1226
msgid "Default error handler:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1136
+#: c-api/init_config.rst:1228
msgid "On Windows: use ``\"surrogateescape\"``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1137
+#: c-api/init_config.rst:1229
msgid ""
"``\"surrogateescape\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero, or "
"if the LC_CTYPE locale is \"C\" or \"POSIX\"."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1139
+#: c-api/init_config.rst:1231
msgid "``\"strict\"`` otherwise."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1143
+#: c-api/init_config.rst:1233
+msgid "See also :c:member:`PyConfig.legacy_windows_stdio`."
+msgstr ""
+
+#: c-api/init_config.rst:1237
msgid "Enable tracemalloc?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1145
+#: c-api/init_config.rst:1239
msgid "If non-zero, call :func:`tracemalloc.start` at startup."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1147
+#: c-api/init_config.rst:1241
msgid ""
"Set by :option:`-X tracemalloc=N <-X>` command line option and by the :"
"envvar:`PYTHONTRACEMALLOC` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1154
+#: c-api/init_config.rst:1248
+msgid "Enable compatibility mode with the perf profiler?"
+msgstr ""
+
+#: c-api/init_config.rst:1250
+msgid ""
+"If non-zero, initialize the perf trampoline. See :ref:`perf_profiling` for "
+"more information."
+msgstr ""
+
+#: c-api/init_config.rst:1253
+msgid ""
+"Set by :option:`-X perf <-X>` command-line option and by the :envvar:"
+"`PYTHON_PERF_JIT_SUPPORT` environment variable for perf support with stack "
+"pointers and :option:`-X perf_jit <-X>` command-line option and by the :"
+"envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable for perf support with "
+"DWARF JIT information."
+msgstr ""
+
+#: c-api/init_config.rst:1265
msgid "Use :ref:`environment variables `?"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1156
+#: c-api/init_config.rst:1267
msgid ""
"If equals to zero, ignore the :ref:`environment variables `."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1159
+#: c-api/init_config.rst:1270
msgid "Set to ``0`` by the :option:`-E` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1165
+#: c-api/init_config.rst:1276
msgid "If non-zero, add the user site directory to :data:`sys.path`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1167
+#: c-api/init_config.rst:1278
msgid "Set to ``0`` by the :option:`-s` and :option:`-I` command line options."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1169
+#: c-api/init_config.rst:1280
msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1175
+#: c-api/init_config.rst:1286
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 ""
-#: ../Doc/c-api/init_config.rst:1179
+#: c-api/init_config.rst:1290
msgid ""
-"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."
+"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 ""
-#: ../Doc/c-api/init_config.rst:1183
+#: c-api/init_config.rst:1294
msgid "Incremented by the :option:`-v` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1185
-msgid "Set to the :envvar:`PYTHONVERBOSE` environment variable value."
+#: c-api/init_config.rst:1296
+msgid "Set by the :envvar:`PYTHONVERBOSE` environment variable value."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1191
+#: c-api/init_config.rst:1302
msgid ""
"Options of the :mod:`warnings` module to build warnings filters, lowest to "
"highest priority: :data:`sys.warnoptions`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1194
+#: c-api/init_config.rst:1305
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 ""
-#: ../Doc/c-api/init_config.rst:1199
+#: c-api/init_config.rst:1310
msgid ""
"The :option:`-W` command line options adds its value to :c:member:`~PyConfig."
"warnoptions`, it can be used multiple times."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1202
+#: c-api/init_config.rst:1313
msgid ""
"The :envvar:`PYTHONWARNINGS` environment variable can also be used to add "
"warning options. Multiple options can be specified, separated by commas (``,"
"``)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1210
+#: c-api/init_config.rst:1321
msgid ""
"If equal to ``0``, Python won't try to write ``.pyc`` files on the import of "
"source modules."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1213
+#: c-api/init_config.rst:1324
msgid ""
"Set to ``0`` by the :option:`-B` command line option and the :envvar:"
"`PYTHONDONTWRITEBYTECODE` environment variable."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1216
+#: c-api/init_config.rst:1327
msgid ""
":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:"
"member:`~PyConfig.write_bytecode`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1223
+#: c-api/init_config.rst:1334
msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1227
+#: c-api/init_config.rst:1338
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 "
@@ -1603,29 +1708,29 @@ msgid ""
"c:member:`~PyConfig.argv`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1232
+#: c-api/init_config.rst:1343
msgid ""
"The :c:member:`~PyConfig.xoptions` options are parsed to set other options: "
"see the :option:`-X` command line option."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1237
+#: c-api/init_config.rst:1348
msgid "The ``show_alloc_count`` field has been removed."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1241
+#: c-api/init_config.rst:1352
msgid "Initialization with PyConfig"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1243
+#: c-api/init_config.rst:1354
msgid "Function to initialize Python:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1247
+#: c-api/init_config.rst:1358
msgid "Initialize Python from *config* configuration."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1252
+#: c-api/init_config.rst:1363
msgid ""
"If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:"
"func:`PyImport_ExtendInittab` are used, they must be set or called after "
@@ -1634,17 +1739,17 @@ msgid ""
"`PyImport_ExtendInittab` must be called before each Python initialization."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1259
+#: c-api/init_config.rst:1370
msgid ""
"The current configuration (``PyConfig`` type) is stored in "
"``PyInterpreterState.config``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1262
+#: c-api/init_config.rst:1373
msgid "Example setting the program name::"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1290
+#: c-api/init_config.rst:1401
msgid ""
"More complete example modifying the default configuration, read the "
"configuration, and then override some parameters. Note that since 3.11, many "
@@ -1653,18 +1758,18 @@ msgid ""
"called will be left unchanged by initialization::"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1353
+#: c-api/init_config.rst:1464
msgid "Isolated Configuration"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1355
+#: c-api/init_config.rst:1466
msgid ""
":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:"
"`PyConfig_InitIsolatedConfig` functions create a configuration to isolate "
"Python from the system. For example, to embed Python into an application."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1360
+#: c-api/init_config.rst:1471
msgid ""
"This configuration ignores global configuration variables, environment "
"variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) "
@@ -1672,125 +1777,125 @@ msgid ""
"LC_CTYPE locale are left unchanged. Signal handlers are not installed."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1365
+#: c-api/init_config.rst:1476
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 ""
-#: ../Doc/c-api/init_config.rst:1373
+#: c-api/init_config.rst:1484
msgid "Python Configuration"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1375
+#: c-api/init_config.rst:1486
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 ""
-#: ../Doc/c-api/init_config.rst:1379
+#: c-api/init_config.rst:1490
msgid ""
"Environments variables and command line arguments are used to configure "
"Python, whereas global configuration variables are ignored."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1382
+#: c-api/init_config.rst:1493
msgid ""
"This function enables C locale coercion (:pep:`538`) and :ref:`Python UTF-8 "
"Mode ` (:pep:`540`) depending on the LC_CTYPE locale, :envvar:"
"`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment variables."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1391
+#: c-api/init_config.rst:1502
msgid "Python Path Configuration"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1393
+#: c-api/init_config.rst:1504
msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1395
+#: c-api/init_config.rst:1506
msgid "Path configuration inputs:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1397
+#: c-api/init_config.rst:1508
msgid ":c:member:`PyConfig.home`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1398
+#: c-api/init_config.rst:1509
msgid ":c:member:`PyConfig.platlibdir`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1399
+#: c-api/init_config.rst:1510
msgid ":c:member:`PyConfig.pathconfig_warnings`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1400
+#: c-api/init_config.rst:1511
msgid ":c:member:`PyConfig.program_name`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1401
+#: c-api/init_config.rst:1512
msgid ":c:member:`PyConfig.pythonpath_env`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1402
+#: c-api/init_config.rst:1513
msgid "current working directory: to get absolute paths"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1403
+#: c-api/init_config.rst:1514
msgid ""
"``PATH`` environment variable to get the program full path (from :c:member:"
"`PyConfig.program_name`)"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1405
+#: c-api/init_config.rst:1516
msgid "``__PYVENV_LAUNCHER__`` environment variable"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1406
+#: c-api/init_config.rst:1517
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 ""
-#: ../Doc/c-api/init_config.rst:1410
+#: c-api/init_config.rst:1521
msgid "Path configuration output fields:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1412
+#: c-api/init_config.rst:1523
msgid ":c:member:`PyConfig.base_exec_prefix`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1413
+#: c-api/init_config.rst:1524
msgid ":c:member:`PyConfig.base_executable`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1414
+#: c-api/init_config.rst:1525
msgid ":c:member:`PyConfig.base_prefix`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1415
+#: c-api/init_config.rst:1526
msgid ":c:member:`PyConfig.exec_prefix`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1416
+#: c-api/init_config.rst:1527
msgid ":c:member:`PyConfig.executable`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1417
+#: c-api/init_config.rst:1528
msgid ""
":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig."
"module_search_paths`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1419
+#: c-api/init_config.rst:1530
msgid ":c:member:`PyConfig.prefix`"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1421
+#: c-api/init_config.rst:1532
msgid ""
"If at least one \"output field\" is not set, Python calculates the path "
"configuration to fill unset fields. If :c:member:`~PyConfig."
@@ -1799,7 +1904,7 @@ msgid ""
"module_search_paths_set` is set to ``1``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1427
+#: c-api/init_config.rst:1538
msgid ""
"It is possible to completely ignore the function calculating the default "
"path configuration by setting explicitly all path configuration output "
@@ -1809,52 +1914,52 @@ msgid ""
"modification."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1434
+#: c-api/init_config.rst:1545
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 ""
-#: ../Doc/c-api/init_config.rst:1437
+#: c-api/init_config.rst:1548
msgid ""
"If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig."
"base_exec_prefix` fields are not set, they inherit their value from :c:"
"member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1441
+#: c-api/init_config.rst:1552
msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1443
+#: c-api/init_config.rst:1554
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 ""
-#: ../Doc/c-api/init_config.rst:1446
+#: c-api/init_config.rst:1557
msgid "If :c:member:`~PyConfig.isolated` is zero:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1448
+#: c-api/init_config.rst:1559
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 ""
-#: ../Doc/c-api/init_config.rst:1450
+#: c-api/init_config.rst:1561
msgid ""
"If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the "
"filename to :data:`sys.path`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1452
+#: c-api/init_config.rst:1563
msgid "Otherwise, prepend an empty string to :data:`sys.path`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1454
+#: c-api/init_config.rst:1565
msgid ""
"If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be "
"modified by the :mod:`site` module. If :c:member:`~PyConfig."
@@ -1863,172 +1968,170 @@ msgid ""
"data:`sys.path`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1460
+#: c-api/init_config.rst:1571
msgid "The following configuration files are used by the path configuration:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1462
+#: c-api/init_config.rst:1573
msgid "``pyvenv.cfg``"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1463
+#: c-api/init_config.rst:1574
msgid "``._pth`` file (ex: ``python._pth``)"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1464
+#: c-api/init_config.rst:1575
msgid "``pybuilddir.txt`` (Unix only)"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1466
+#: c-api/init_config.rst:1577
msgid "If a ``._pth`` file is present:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1468
+#: c-api/init_config.rst:1579
msgid "Set :c:member:`~PyConfig.isolated` to ``1``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1470
+#: c-api/init_config.rst:1580
+msgid "Set :c:member:`~PyConfig.use_environment` to ``0``."
+msgstr ""
+
+#: c-api/init_config.rst:1581
msgid "Set :c:member:`~PyConfig.site_import` to ``0``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1471
+#: c-api/init_config.rst:1582
msgid "Set :c:member:`~PyConfig.safe_path` to ``1``."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1473
+#: c-api/init_config.rst:1584
msgid ""
"The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:"
-"`PyConfig.base_executable`"
+"`PyConfig.base_executable`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1478
+#: c-api/init_config.rst:1589
msgid "Py_RunMain()"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1482
+#: c-api/init_config.rst:1593
msgid ""
"Execute 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."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1487
+#: c-api/init_config.rst:1598
msgid "By default and when if :option:`-i` option is used, run the REPL."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1489
+#: c-api/init_config.rst:1600
msgid ""
"Finally, finalizes Python and returns an exit status that can be passed to "
"the ``exit()`` function."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1492
+#: c-api/init_config.rst:1603
msgid ""
"See :ref:`Python Configuration ` for an example of "
"customized Python always running in isolated mode using :c:func:`Py_RunMain`."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1498
+#: c-api/init_config.rst:1609
msgid "Py_GetArgcArgv()"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1502
+#: c-api/init_config.rst:1613
msgid "Get the original command line arguments, before Python modified them."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1504
+#: c-api/init_config.rst:1615
msgid "See also :c:member:`PyConfig.orig_argv` member."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1508
+#: c-api/init_config.rst:1619
msgid "Multi-Phase Initialization Private Provisional API"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1510
+#: c-api/init_config.rst:1621
msgid ""
"This section is a private provisional API introducing multi-phase "
"initialization, the core feature of :pep:`432`:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1513
+#: c-api/init_config.rst:1624
msgid "\"Core\" initialization phase, \"bare minimum Python\":"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1515
+#: c-api/init_config.rst:1626
msgid "Builtin types;"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1516
+#: c-api/init_config.rst:1627
msgid "Builtin exceptions;"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1517
+#: c-api/init_config.rst:1628
msgid "Builtin and frozen modules;"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1518
+#: c-api/init_config.rst:1629
msgid ""
"The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` "
"doesn't exist yet)."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1521
+#: c-api/init_config.rst:1632
msgid "\"Main\" initialization phase, Python is fully initialized:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1523
+#: c-api/init_config.rst:1634
msgid "Install and configure :mod:`importlib`;"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1524
+#: c-api/init_config.rst:1635
msgid "Apply the :ref:`Path Configuration `;"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1525
+#: c-api/init_config.rst:1636
msgid "Install signal handlers;"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1526
+#: c-api/init_config.rst:1637
msgid ""
"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :"
"data:`sys.path`);"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1528
+#: c-api/init_config.rst:1639
msgid ""
"Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1529
+#: c-api/init_config.rst:1640
msgid "Import the :mod:`site` module;"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1530
+#: c-api/init_config.rst:1641
msgid "etc."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1532
+#: c-api/init_config.rst:1643
msgid "Private provisional API:"
msgstr ""
-#: ../Doc/c-api/init_config.rst:1534
+#: c-api/init_config.rst:1645
msgid ""
":c:member:`PyConfig._init_main`: if set to ``0``, :c:func:"
"`Py_InitializeFromConfig` stops at the \"Core\" initialization phase."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1536
-msgid ""
-":c:member:`PyConfig._isolated_interpreter`: if non-zero, disallow threads, "
-"subprocesses and fork."
-msgstr ""
-
-#: ../Doc/c-api/init_config.rst:1541
+#: c-api/init_config.rst:1650
msgid ""
"Move to the \"Main\" initialization phase, finish the Python initialization."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1543
+#: c-api/init_config.rst:1652
msgid ""
"No module is imported during the \"Core\" phase and the ``importlib`` module "
"is not configured: the :ref:`Path Configuration ` is only "
@@ -2037,14 +2140,14 @@ msgid ""
"maybe install a custom :data:`sys.meta_path` importer or an import hook, etc."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1549
+#: c-api/init_config.rst:1658
msgid ""
-"It may become possible to calculatin the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is "
"one of the :pep:`432` motivation."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1553
+#: c-api/init_config.rst:1662
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 "
@@ -2052,8 +2155,16 @@ msgid ""
"until a proper public API is designed."
msgstr ""
-#: ../Doc/c-api/init_config.rst:1558
+#: c-api/init_config.rst:1667
msgid ""
"Example running Python code between \"Core\" and \"Main\" initialization "
"phases::"
msgstr ""
+
+#: c-api/init_config.rst:558
+msgid "main()"
+msgstr ""
+
+#: c-api/init_config.rst:558
+msgid "argv (in module sys)"
+msgstr ""
diff --git a/c-api/intro.po b/c-api/intro.po
index 9318913..8173546 100644
--- a/c-api/intro.po
+++ b/c-api/intro.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/intro.rst:8
+#: c-api/intro.rst:8
msgid "Introduction"
msgstr ""
-#: ../Doc/c-api/intro.rst:10
+#: c-api/intro.rst:10
msgid ""
"The Application Programmer's Interface to Python gives C and C++ programmers "
"access to the Python interpreter at a variety of levels. The API is equally "
@@ -34,7 +34,7 @@ msgid ""
"`embedding` Python in an application."
msgstr ""
-#: ../Doc/c-api/intro.rst:20
+#: c-api/intro.rst:20
msgid ""
"Writing an extension module is a relatively well-understood process, where a "
"\"cookbook\" approach works well. There are several tools that automate the "
@@ -43,7 +43,7 @@ msgid ""
"less straightforward than writing an extension."
msgstr ""
-#: ../Doc/c-api/intro.rst:26
+#: c-api/intro.rst:26
msgid ""
"Many API functions are useful independent of whether you're embedding or "
"extending Python; moreover, most applications that embed Python will need "
@@ -52,11 +52,11 @@ msgid ""
"in a real application."
msgstr ""
-#: ../Doc/c-api/intro.rst:34
+#: c-api/intro.rst:34
msgid "Coding standards"
msgstr ""
-#: ../Doc/c-api/intro.rst:36
+#: c-api/intro.rst:36
msgid ""
"If you're writing C code for inclusion in CPython, you **must** follow the "
"guidelines and standards defined in :PEP:`7`. These guidelines apply "
@@ -65,37 +65,37 @@ msgid ""
"modules, unless you eventually expect to contribute them to Python."
msgstr ""
-#: ../Doc/c-api/intro.rst:46
+#: c-api/intro.rst:46
msgid "Include Files"
msgstr ""
-#: ../Doc/c-api/intro.rst:48
+#: c-api/intro.rst:48
msgid ""
"All function, type and macro definitions needed to use the Python/C API are "
"included in your code by the following line::"
msgstr ""
-#: ../Doc/c-api/intro.rst:54
+#: c-api/intro.rst:54
msgid ""
"This implies inclusion of the following standard headers: ````, "
"````, ````, ````, ```` and ```` (if available)."
msgstr ""
-#: ../Doc/c-api/intro.rst:60
+#: c-api/intro.rst:60
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 ""
-#: ../Doc/c-api/intro.rst:64
+#: c-api/intro.rst:64
msgid ""
"It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including "
"``Python.h``. See :ref:`arg-parsing` for a description of this macro."
msgstr ""
-#: ../Doc/c-api/intro.rst:67
+#: c-api/intro.rst:67
msgid ""
"All user visible names defined by Python.h (except those defined by the "
"included standard headers) have one of the prefixes ``Py`` or ``_Py``. "
@@ -104,7 +104,7 @@ msgid ""
"names do not have a reserved prefix."
msgstr ""
-#: ../Doc/c-api/intro.rst:74
+#: c-api/intro.rst:74
msgid ""
"User code should never define names that begin with ``Py`` or ``_Py``. This "
"confuses the reader, and jeopardizes the portability of the user code to "
@@ -112,40 +112,40 @@ msgid ""
"of these prefixes."
msgstr ""
-#: ../Doc/c-api/intro.rst:79
+#: c-api/intro.rst:79
msgid ""
"The header files are typically installed with Python. On Unix, these are "
"located in the directories :file:`{prefix}/include/pythonversion/` and :file:"
-"`{exec_prefix}/include/pythonversion/`, where :envvar:`prefix` and :envvar:"
-"`exec_prefix` are defined by the corresponding parameters to Python's :"
-"program:`configure` script and *version* is ``'%d.%d' % sys."
-"version_info[:2]``. On Windows, the headers are installed in :file:"
-"`{prefix}/include`, where :envvar:`prefix` is the installation directory "
+"`{exec_prefix}/include/pythonversion/`, where :option:`prefix <--prefix>` "
+"and :option:`exec_prefix <--exec-prefix>` are defined by the corresponding "
+"parameters to Python's :program:`configure` script and *version* is ``'%d."
+"%d' % sys.version_info[:2]``. On Windows, the headers are installed in :"
+"file:`{prefix}/include`, where ``prefix`` is the installation directory "
"specified to the installer."
msgstr ""
-#: ../Doc/c-api/intro.rst:88
+#: c-api/intro.rst:88
msgid ""
"To include the headers, place both directories (if different) on your "
"compiler's search path for includes. Do *not* place the parent directories "
"on the search path and then use ``#include ``; this will "
"break on multi-platform builds since the platform independent headers under :"
-"envvar:`prefix` include the platform specific headers from :envvar:"
-"`exec_prefix`."
+"option:`prefix <--prefix>` include the platform specific headers from :"
+"option:`exec_prefix <--exec-prefix>`."
msgstr ""
-#: ../Doc/c-api/intro.rst:95
+#: c-api/intro.rst:95
msgid ""
"C++ users should note that although the API is defined entirely using C, the "
"header files properly declare the entry points to be ``extern \"C\"``. As a "
"result, there is no need to do anything special to use the API from C++."
msgstr ""
-#: ../Doc/c-api/intro.rst:101
+#: c-api/intro.rst:101
msgid "Useful macros"
msgstr ""
-#: ../Doc/c-api/intro.rst:103
+#: c-api/intro.rst:103
msgid ""
"Several useful macros are defined in the Python header files. Many are "
"defined closer to where they are useful (e.g. :c:macro:`Py_RETURN_NONE`). "
@@ -153,96 +153,111 @@ msgid ""
"a complete listing."
msgstr ""
-#: ../Doc/c-api/intro.rst:110
+#: c-api/intro.rst:110
+msgid ""
+"Declare an extension module ``PyInit`` initialization function. The function "
+"return type is :c:expr:`PyObject*`. The macro declares any special linkage "
+"declarations required by the platform, and for C++ declares the function as "
+"``extern \"C\"``."
+msgstr ""
+
+#: c-api/intro.rst:115
+msgid ""
+"The initialization function must be named :samp:`PyInit_{name}`, where "
+"*name* is the name of the module, and should be the only non-\\ ``static`` "
+"item defined in the module file. Example::"
+msgstr ""
+
+#: c-api/intro.rst:134
msgid "Return the absolute value of ``x``."
msgstr ""
-#: ../Doc/c-api/intro.rst:116
+#: c-api/intro.rst:140
msgid ""
"Ask the compiler to always inline a static inline function. The compiler can "
"ignore it and decides to not inline the function."
msgstr ""
-#: ../Doc/c-api/intro.rst:119
+#: c-api/intro.rst:143
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 ""
-#: ../Doc/c-api/intro.rst:123
+#: c-api/intro.rst:147
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 ""
-#: ../Doc/c-api/intro.rst:127
+#: c-api/intro.rst:151
msgid ""
-"If Python is :ref:`built in debug mode ` (if the ``Py_DEBUG`` "
-"macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does nothing."
+"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 ""
-#: ../Doc/c-api/intro.rst:130
+#: c-api/intro.rst:154
msgid "It must be specified before the function return type. Usage::"
msgstr ""
-#: ../Doc/c-api/intro.rst:138
+#: c-api/intro.rst:162
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 ""
-#: ../Doc/c-api/intro.rst:143
+#: c-api/intro.rst:167
msgid ""
"Use this for deprecated declarations. The macro must be placed before the "
"symbol name."
msgstr ""
-#: ../Doc/c-api/intro.rst:146 ../Doc/c-api/intro.rst:232
-#: ../Doc/c-api/intro.rst:250
+#: c-api/intro.rst:256 c-api/intro.rst:274
msgid "Example::"
msgstr ""
-#: ../Doc/c-api/intro.rst:150
+#: c-api/intro.rst:174
msgid "MSVC support was added."
msgstr ""
-#: ../Doc/c-api/intro.rst:155
+#: c-api/intro.rst:179
msgid ""
"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the "
-"command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set)."
+"command line (see :c:member:`PyConfig.use_environment`)."
msgstr ""
-#: ../Doc/c-api/intro.rst:160
+#: c-api/intro.rst:184
msgid "Return the maximum value between ``x`` and ``y``."
msgstr ""
-#: ../Doc/c-api/intro.rst:166
+#: c-api/intro.rst:190
msgid "Return the size of a structure (``type``) ``member`` in bytes."
msgstr ""
-#: ../Doc/c-api/intro.rst:172
+#: c-api/intro.rst:196
msgid "Return the minimum value between ``x`` and ``y``."
msgstr ""
-#: ../Doc/c-api/intro.rst:178
+#: c-api/intro.rst:202
msgid ""
"Disable inlining on a function. For example, it reduces the C stack "
"consumption: useful on LTO+PGO builds which heavily inline code (see :issue:"
"`33720`)."
msgstr ""
-#: ../Doc/c-api/intro.rst:182
+#: c-api/intro.rst:206
msgid "Usage::"
msgstr ""
-#: ../Doc/c-api/intro.rst:190
+#: c-api/intro.rst:214
msgid ""
"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``."
msgstr ""
-#: ../Doc/c-api/intro.rst:197
+#: c-api/intro.rst:221
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 "
@@ -250,20 +265,20 @@ msgid ""
"where you might be tempted to put an ``assert(0)`` or ``abort()`` call."
msgstr ""
-#: ../Doc/c-api/intro.rst:202
+#: c-api/intro.rst:226
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 ""
-#: ../Doc/c-api/intro.rst:206
+#: c-api/intro.rst:230
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`."
msgstr ""
-#: ../Doc/c-api/intro.rst:209
+#: c-api/intro.rst:233
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 "
@@ -272,41 +287,41 @@ msgid ""
"reported to caller, :c:func:`Py_FatalError` can be used."
msgstr ""
-#: ../Doc/c-api/intro.rst:219
+#: c-api/intro.rst:243
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 ""
-#: ../Doc/c-api/intro.rst:226
+#: c-api/intro.rst:250
msgid ""
"Creates a variable with name ``name`` that can be used in docstrings. If "
"Python is built without docstrings, the value will be empty."
msgstr ""
-#: ../Doc/c-api/intro.rst:229
+#: c-api/intro.rst:253
msgid ""
"Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python "
"without docstrings, as specified in :pep:`7`."
msgstr ""
-#: ../Doc/c-api/intro.rst:244
+#: c-api/intro.rst:268
msgid ""
"Creates a docstring for the given input string or an empty string if "
"docstrings are disabled."
msgstr ""
-#: ../Doc/c-api/intro.rst:247
+#: c-api/intro.rst:271
msgid ""
"Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python "
"without docstrings, as specified in :pep:`7`."
msgstr ""
-#: ../Doc/c-api/intro.rst:262
+#: c-api/intro.rst:286
msgid "Objects, Types and Reference Counts"
msgstr ""
-#: ../Doc/c-api/intro.rst:266
+#: c-api/intro.rst:290
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 "
@@ -321,7 +336,7 @@ msgid ""
"objects."
msgstr ""
-#: ../Doc/c-api/intro.rst:277
+#: c-api/intro.rst:301
msgid ""
"All Python objects (even Python integers) have a :dfn:`type` and a :dfn:"
"`reference count`. An object's type determines what kind of object it is (e."
@@ -332,85 +347,88 @@ msgid ""
"a Python list."
msgstr ""
-#: ../Doc/c-api/intro.rst:288
+#: c-api/intro.rst:312
msgid "Reference Counts"
msgstr ""
-#: ../Doc/c-api/intro.rst:290
+#: c-api/intro.rst:314
msgid ""
"The reference count is important because today's computers have a finite "
-"(and often severely limited) memory size; it counts how many different "
-"places there are that have a reference to an object. Such a place could be "
-"another object, or a global (or static) C variable, or a local variable in "
-"some C function. When an object's reference count becomes zero, the object "
-"is deallocated. If it contains references to other objects, their "
-"reference count is decremented. Those other objects may be deallocated in "
-"turn, if this decrement makes their reference count become zero, and so on. "
-"(There's an obvious problem with objects that reference each other here; "
-"for now, the solution is \"don't do that.\")"
-msgstr ""
-
-#: ../Doc/c-api/intro.rst:305
-msgid ""
-"Reference counts are always manipulated explicitly. The normal way is to "
-"use the macro :c:func:`Py_INCREF` to increment an object's reference count "
-"by one, and :c:func:`Py_DECREF` to decrement it by one. The :c:func:"
+"(and often severely limited) memory size; it counts how many different "
+"places there are that have a :term:`strong reference` to an object. Such a "
+"place could be another object, or a global (or static) C variable, or a "
+"local variable in some C function. When the last :term:`strong reference` to "
+"an object is released (i.e. its reference count becomes zero), the object is "
+"deallocated. If it contains references to other objects, those references "
+"are released. Those other objects may be deallocated in turn, if there are "
+"no more references to them, and so on. (There's an obvious problem with "
+"objects that reference each other here; for now, the solution is \"don't do "
+"that.\")"
+msgstr ""
+
+#: c-api/intro.rst:331
+msgid ""
+"Reference counts are always manipulated explicitly. The normal way is to "
+"use the macro :c:func:`Py_INCREF` to take a new reference to an object (i.e. "
+"increment its reference count by one), and :c:func:`Py_DECREF` to release "
+"that reference (i.e. decrement the reference count by one). The :c:func:"
"`Py_DECREF` macro is considerably more complex than the incref one, since it "
"must check whether the reference count becomes zero and then cause the "
-"object's deallocator to be called. The deallocator is a function pointer "
+"object's deallocator to be called. The deallocator is a function pointer "
"contained in the object's type structure. The type-specific deallocator "
-"takes care of decrementing the reference counts for other objects contained "
-"in the object if this is a compound object type, such as a list, as well as "
-"performing any additional finalization that's needed. There's no chance "
-"that the reference count can overflow; at least as many bits are used to "
-"hold the reference count as there are distinct memory locations in virtual "
-"memory (assuming ``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the "
-"reference count increment is a simple operation."
-msgstr ""
-
-#: ../Doc/c-api/intro.rst:319
-msgid ""
-"It is not necessary to increment an object's reference count for every "
-"local variable that contains a pointer to an object. In theory, the "
-"object's reference count goes up by one when the variable is made to point "
-"to it and it goes down by one when the variable goes out of scope. "
-"However, these two cancel each other out, so at the end the reference count "
-"hasn't changed. The only real reason to use the reference count is to "
-"prevent the object from being deallocated as long as our variable is "
-"pointing to it. If we know that there is at least one other reference to "
-"the object that lives at least as long as our variable, there is no need to "
-"increment the reference count temporarily. An important situation where "
-"this arises is in objects that are passed as arguments to C functions in an "
-"extension module that are called from Python; the call mechanism guarantees "
-"to hold a reference to every argument for the duration of the call."
-msgstr ""
-
-#: ../Doc/c-api/intro.rst:333
+"takes care of releasing references for other objects contained in the object "
+"if this is a compound object type, such as a list, as well as performing any "
+"additional finalization that's needed. There's no chance that the reference "
+"count can overflow; at least as many bits are used to hold the reference "
+"count as there are distinct memory locations in virtual memory (assuming "
+"``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the reference count "
+"increment is a simple operation."
+msgstr ""
+
+#: c-api/intro.rst:347
+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 "
+"object. In theory, the object's reference count goes up by one when the "
+"variable is made to point to it and it goes down by one when the variable "
+"goes out of scope. However, these two cancel each other out, so at the end "
+"the reference count hasn't changed. The only real reason to use the "
+"reference count is to prevent the object from being deallocated as long as "
+"our variable is pointing to it. If we know that there is at least one "
+"other reference to the object that lives at least as long as our variable, "
+"there is no need to take a new :term:`strong reference` (i.e. increment the "
+"reference count) temporarily. An important situation where this arises is in "
+"objects that are passed as arguments to C functions in an extension module "
+"that are called from Python; the call mechanism guarantees to hold a "
+"reference to every argument for the duration of the call."
+msgstr ""
+
+#: c-api/intro.rst:363
msgid ""
"However, a common pitfall is to extract an object from a list and hold on to "
-"it for a while without incrementing its reference count. Some other "
-"operation might conceivably remove the object from the list, decrementing "
-"its reference count and possibly deallocating it. The real danger is that "
-"innocent-looking operations may invoke arbitrary Python code which could do "
-"this; there is a code path which allows control to flow back to the user "
-"from a :c:func:`Py_DECREF`, so almost any operation is potentially dangerous."
+"it for a while without taking a new reference. Some other operation might "
+"conceivably remove the object from the list, releasing that reference, and "
+"possibly deallocating it. The real danger is that innocent-looking "
+"operations may invoke arbitrary Python code which could do this; there is a "
+"code path which allows control to flow back to the user from a :c:func:"
+"`Py_DECREF`, so almost any operation is potentially dangerous."
msgstr ""
-#: ../Doc/c-api/intro.rst:341
+#: c-api/intro.rst:371
msgid ""
"A safe approach is to always use the generic operations (functions whose "
"name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or "
-"``PyMapping_``). These operations always increment the reference count of "
-"the object they return. This leaves the caller with the responsibility to "
-"call :c:func:`Py_DECREF` when they are done with the result; this soon "
-"becomes second nature."
+"``PyMapping_``). These operations always create a new :term:`strong "
+"reference` (i.e. increment the reference count) of the object they return. "
+"This leaves the caller with the responsibility to call :c:func:`Py_DECREF` "
+"when they are done with the result; this soon becomes second nature."
msgstr ""
-#: ../Doc/c-api/intro.rst:351
+#: c-api/intro.rst:382
msgid "Reference Count Details"
msgstr ""
-#: ../Doc/c-api/intro.rst:353
+#: c-api/intro.rst:384
msgid ""
"The reference count behavior of functions in the Python/C API is best "
"explained in terms of *ownership of references*. Ownership pertains to "
@@ -418,8 +436,8 @@ msgid ""
"shared). \"Owning a reference\" means being responsible for calling "
"Py_DECREF on it when the reference is no longer needed. Ownership can also "
"be transferred, meaning that the code that receives ownership of the "
-"reference then becomes responsible for eventually decref'ing it by calling :"
-"c:func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer needed---or "
+"reference then becomes responsible for eventually releasing it by calling :c:"
+"func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer needed---or "
"passing on this responsibility (usually to its caller). When a function "
"passes ownership of a reference on to its caller, the caller is said to "
"receive a *new* reference. When no ownership is transferred, the caller is "
@@ -427,7 +445,7 @@ msgid ""
"`borrowed reference`."
msgstr ""
-#: ../Doc/c-api/intro.rst:366
+#: c-api/intro.rst:397
msgid ""
"Conversely, when a calling function passes in a reference to an object, "
"there are two possibilities: the function *steals* a reference to the "
@@ -436,7 +454,7 @@ msgid ""
"reference, and you are not responsible for it any longer."
msgstr ""
-#: ../Doc/c-api/intro.rst:376
+#: c-api/intro.rst:407
msgid ""
"Few functions steal references; the two notable exceptions are :c:func:"
"`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to "
@@ -448,7 +466,7 @@ msgid ""
"below)::"
msgstr ""
-#: ../Doc/c-api/intro.rst:391
+#: c-api/intro.rst:422
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 "
@@ -456,7 +474,7 @@ msgid ""
"another reference before calling the reference-stealing function."
msgstr ""
-#: ../Doc/c-api/intro.rst:396
+#: c-api/intro.rst:427
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 "
@@ -464,13 +482,13 @@ msgid ""
"func:`PyTuple_SetItem` for tuples that you are creating yourself."
msgstr ""
-#: ../Doc/c-api/intro.rst:401
+#: c-api/intro.rst:432
msgid ""
"Equivalent code for populating a list can be written using :c:func:"
"`PyList_New` and :c:func:`PyList_SetItem`."
msgstr ""
-#: ../Doc/c-api/intro.rst:404
+#: c-api/intro.rst:435
msgid ""
"However, in practice, you will rarely use these ways of creating and "
"populating a tuple or list. There's a generic function, :c:func:"
@@ -479,18 +497,18 @@ msgid ""
"be replaced by the following (which also takes care of the error checking)::"
msgstr ""
-#: ../Doc/c-api/intro.rst:415
+#: c-api/intro.rst:446
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 "
"passed in to the function you are writing. In that case, their behaviour "
-"regarding reference counts is much saner, since you don't have to increment "
-"a reference count so you can give a reference away (\"have it be stolen\"). "
+"regarding references is much saner, since you don't have to take a new "
+"reference just so you can give that reference away (\"have it be stolen\"). "
"For example, this function sets all items of a list (actually, any mutable "
"sequence) to a given item::"
msgstr ""
-#: ../Doc/c-api/intro.rst:445
+#: c-api/intro.rst:476
msgid ""
"The situation is slightly different for function return values. While "
"passing a reference to most functions does not change your ownership "
@@ -503,7 +521,7 @@ msgid ""
"becomes the owner of the reference)."
msgstr ""
-#: ../Doc/c-api/intro.rst:454
+#: c-api/intro.rst:485
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 "
@@ -514,18 +532,18 @@ msgid ""
"the same arguments), you do own a reference to the returned object."
msgstr ""
-#: ../Doc/c-api/intro.rst:466
+#: c-api/intro.rst:497
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 ""
-#: ../Doc/c-api/intro.rst:530
+#: c-api/intro.rst:561
msgid "Types"
msgstr ""
-#: ../Doc/c-api/intro.rst:532
+#: c-api/intro.rst:563
msgid ""
"There are few other data types that play a significant role in the Python/C "
"API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:"
@@ -536,7 +554,7 @@ msgid ""
"that use them."
msgstr ""
-#: ../Doc/c-api/intro.rst:542
+#: c-api/intro.rst:573
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 "
@@ -544,11 +562,11 @@ msgid ""
"positive value of type :c:type:`Py_ssize_t`."
msgstr ""
-#: ../Doc/c-api/intro.rst:551
+#: c-api/intro.rst:582
msgid "Exceptions"
msgstr ""
-#: ../Doc/c-api/intro.rst:553
+#: c-api/intro.rst:584
msgid ""
"The Python programmer only needs to deal with exceptions if specific error "
"handling is required; unhandled exceptions are automatically propagated to "
@@ -557,7 +575,7 @@ msgid ""
"stack traceback."
msgstr ""
-#: ../Doc/c-api/intro.rst:561
+#: c-api/intro.rst:592
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 "
@@ -572,7 +590,7 @@ msgid ""
"explicitly documented."
msgstr ""
-#: ../Doc/c-api/intro.rst:576
+#: c-api/intro.rst:607
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 "
@@ -585,7 +603,7 @@ msgid ""
"clears the exception state."
msgstr ""
-#: ../Doc/c-api/intro.rst:586
+#: c-api/intro.rst:617
msgid ""
"The full exception state consists of three objects (all of which can be "
"``NULL``): the exception type, the corresponding exception value, and the "
@@ -598,7 +616,7 @@ msgid ""
"``sys.exc_info()`` and friends."
msgstr ""
-#: ../Doc/c-api/intro.rst:598
+#: c-api/intro.rst:629
msgid ""
"Note that starting with Python 1.5, the preferred, thread-safe way to access "
"the exception state from Python code is to call the function :func:`sys."
@@ -612,7 +630,7 @@ msgid ""
"referenced by the stack frames in the traceback."
msgstr ""
-#: ../Doc/c-api/intro.rst:609
+#: c-api/intro.rst:640
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 "
@@ -623,20 +641,20 @@ msgid ""
"of the error."
msgstr ""
-#: ../Doc/c-api/intro.rst:618
+#: c-api/intro.rst:649
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 "
+"the :c:func:`!sum_sequence` example above. It so happens that this example "
"doesn't need to clean up any owned references when it detects an error. The "
"following example function shows some error cleanup. First, to remind you "
"why you like Python, we show the equivalent Python code::"
msgstr ""
-#: ../Doc/c-api/intro.rst:633
+#: c-api/intro.rst:664
msgid "Here is the corresponding C code, in all its glory::"
msgstr ""
-#: ../Doc/c-api/intro.rst:685
+#: c-api/intro.rst:716
msgid ""
"This example represents an endorsed use of the ``goto`` statement in C! It "
"illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:"
@@ -649,11 +667,11 @@ msgid ""
"success after the final call made is successful."
msgstr ""
-#: ../Doc/c-api/intro.rst:699
+#: c-api/intro.rst:730
msgid "Embedding Python"
msgstr ""
-#: ../Doc/c-api/intro.rst:701
+#: c-api/intro.rst:732
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 "
@@ -661,7 +679,7 @@ msgid ""
"the interpreter can only be used after the interpreter has been initialized."
msgstr ""
-#: ../Doc/c-api/intro.rst:714
+#: c-api/intro.rst:745
msgid ""
"The basic initialization function is :c:func:`Py_Initialize`. This "
"initializes the table of loaded modules, and creates the fundamental "
@@ -669,7 +687,7 @@ msgid ""
"initializes the module search path (``sys.path``)."
msgstr ""
-#: ../Doc/c-api/intro.rst:719
+#: c-api/intro.rst:750
msgid ""
":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys."
"argv``). If this variable is needed by Python code that will be executed "
@@ -677,7 +695,7 @@ msgid ""
"must be set: see :ref:`Python Initialization Configuration `."
msgstr ""
-#: ../Doc/c-api/intro.rst:724
+#: c-api/intro.rst:755
msgid ""
"On most systems (in particular, on Unix and Windows, although the details "
"are slightly different), :c:func:`Py_Initialize` calculates the module "
@@ -689,7 +707,7 @@ msgid ""
"on the shell command search path (the environment variable :envvar:`PATH`)."
msgstr ""
-#: ../Doc/c-api/intro.rst:733
+#: c-api/intro.rst:764
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/"
@@ -700,18 +718,18 @@ msgid ""
"in front of the standard path by setting :envvar:`PYTHONPATH`."
msgstr ""
-#: ../Doc/c-api/intro.rst:748
+#: c-api/intro.rst:778
msgid ""
-"The embedding application can steer the search by calling "
-"``Py_SetProgramName(file)`` *before* calling :c:func:`Py_Initialize`. 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:"
+"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`)."
msgstr ""
-#: ../Doc/c-api/intro.rst:758
+#: c-api/intro.rst:789
msgid ""
"Sometimes, it is desirable to \"uninitialize\" Python. For instance, the "
"application may want to start over (make another call to :c:func:"
@@ -725,18 +743,18 @@ msgid ""
"released."
msgstr ""
-#: ../Doc/c-api/intro.rst:772
+#: c-api/intro.rst:803
msgid "Debugging Builds"
msgstr ""
-#: ../Doc/c-api/intro.rst:774
+#: c-api/intro.rst:805
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 ""
-#: ../Doc/c-api/intro.rst:778
+#: c-api/intro.rst:809
msgid ""
"A full list of the various types of debugging builds is in the file :file:"
"`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are "
@@ -746,24 +764,24 @@ msgid ""
"section."
msgstr ""
-#: ../Doc/c-api/intro.rst:784
+#: c-api/intro.rst:817
msgid ""
-"Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined "
+"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:"
+"build>`. :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 "
+"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."
msgstr ""
-#: ../Doc/c-api/intro.rst:792
+#: c-api/intro.rst:825
msgid ""
"In addition to the reference count debugging described below, extra checks "
"are performed, see :ref:`Python Debug Build `."
msgstr ""
-#: ../Doc/c-api/intro.rst:795
+#: c-api/intro.rst:828
msgid ""
"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:"
"`configure --with-trace-refs option <--with-trace-refs>`). When defined, a "
@@ -773,8 +791,132 @@ msgid ""
"this happens after every statement run by the interpreter.)"
msgstr ""
-#: ../Doc/c-api/intro.rst:802
+#: c-api/intro.rst:835
msgid ""
"Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source "
"distribution for more detailed information."
msgstr ""
+
+#: c-api/intro.rst:288
+msgid "object"
+msgstr ""
+
+#: c-api/intro.rst:288
+msgid "type"
+msgstr ""
+
+#: c-api/intro.rst:327
+msgid "Py_INCREF (C function)"
+msgstr ""
+
+#: c-api/intro.rst:327
+msgid "Py_DECREF (C function)"
+msgstr ""
+
+#: c-api/intro.rst:403
+msgid "PyList_SetItem (C function)"
+msgstr ""
+
+#: c-api/intro.rst:403
+msgid "PyTuple_SetItem (C function)"
+msgstr ""
+
+#: c-api/intro.rst:474
+msgid "set_all()"
+msgstr ""
+
+#: c-api/intro.rst:493
+msgid "PyList_GetItem (C function)"
+msgstr ""
+
+#: c-api/intro.rst:493
+msgid "PySequence_GetItem (C function)"
+msgstr ""
+
+#: c-api/intro.rst:523
+msgid "sum_list()"
+msgstr ""
+
+#: c-api/intro.rst:647
+msgid "sum_sequence()"
+msgstr ""
+
+#: c-api/intro.rst:590
+msgid "PyErr_Occurred (C function)"
+msgstr ""
+
+#: c-api/intro.rst:603
+msgid "PyErr_SetString (C function)"
+msgstr ""
+
+#: c-api/intro.rst:711
+msgid "PyErr_Clear (C function)"
+msgstr ""
+
+#: c-api/intro.rst:627
+msgid "exc_info (in module sys)"
+msgstr ""
+
+#: c-api/intro.rst:709
+msgid "incr_item()"
+msgstr ""
+
+#: c-api/intro.rst:711
+msgid "PyErr_ExceptionMatches (C function)"
+msgstr ""
+
+#: c-api/intro.rst:711
+msgid "Py_XDECREF (C function)"
+msgstr ""
+
+#: c-api/intro.rst:737
+msgid "Py_Initialize (C function)"
+msgstr ""
+
+#: c-api/intro.rst:737
+msgid "module"
+msgstr ""
+
+#: c-api/intro.rst:737
+msgid "builtins"
+msgstr ""
+
+#: c-api/intro.rst:737
+msgid "__main__"
+msgstr ""
+
+#: c-api/intro.rst:737
+msgid "sys"
+msgstr ""
+
+#: c-api/intro.rst:737
+msgid "search"
+msgstr ""
+
+#: c-api/intro.rst:737
+msgid "path"
+msgstr ""
+
+#: c-api/intro.rst:737
+msgid "path (in module sys)"
+msgstr ""
+
+#: c-api/intro.rst:772
+msgid "Py_GetPath (C function)"
+msgstr ""
+
+#: c-api/intro.rst:772
+msgid "Py_GetPrefix (C function)"
+msgstr ""
+
+#: c-api/intro.rst:772
+msgid "Py_GetExecPrefix (C function)"
+msgstr ""
+
+#: c-api/intro.rst:772
+msgid "Py_GetProgramFullPath (C function)"
+msgstr ""
+
+#: c-api/intro.rst:787
+msgid "Py_IsInitialized (C function)"
+msgstr ""
diff --git a/c-api/iter.po b/c-api/iter.po
index a81a20c..ce15f67 100644
--- a/c-api/iter.po
+++ b/c-api/iter.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,27 +17,27 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/iter.rst:6
+#: c-api/iter.rst:6
msgid "Iterator Protocol"
msgstr ""
-#: ../Doc/c-api/iter.rst:8
+#: c-api/iter.rst:8
msgid "There are two functions specifically for working with iterators."
msgstr ""
-#: ../Doc/c-api/iter.rst:12
+#: c-api/iter.rst:12
msgid ""
"Return non-zero if the object *o* can be safely passed to :c:func:"
"`PyIter_Next`, and ``0`` otherwise. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/iter.rst:17
+#: c-api/iter.rst:17
msgid ""
"Return non-zero if the object *o* provides the :class:`AsyncIterator` "
"protocol, and ``0`` otherwise. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/iter.rst:24
+#: c-api/iter.rst:24
msgid ""
"Return the next value from the iterator *o*. The object must be an iterator "
"according to :c:func:`PyIter_Check` (it is up to the caller to check this). "
@@ -46,32 +46,32 @@ msgid ""
"the exception."
msgstr ""
-#: ../Doc/c-api/iter.rst:30
+#: c-api/iter.rst:30
msgid ""
"To write a loop which iterates over an iterator, the C code should look "
"something like this::"
msgstr ""
-#: ../Doc/c-api/iter.rst:59
+#: c-api/iter.rst:59
msgid ""
"The enum value used to represent different results of :c:func:`PyIter_Send`."
msgstr ""
-#: ../Doc/c-api/iter.rst:66
+#: c-api/iter.rst:66
msgid "Sends the *arg* value into the iterator *iter*. Returns:"
msgstr ""
-#: ../Doc/c-api/iter.rst:68
+#: c-api/iter.rst:68
msgid ""
"``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*."
msgstr ""
-#: ../Doc/c-api/iter.rst:69
+#: c-api/iter.rst:69
msgid ""
"``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*."
msgstr ""
-#: ../Doc/c-api/iter.rst:70
+#: c-api/iter.rst:70
msgid ""
"``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to "
"``NULL``."
diff --git a/c-api/iterator.po b/c-api/iterator.po
index eeaa7dc..96c9a85 100644
--- a/c-api/iterator.po
+++ b/c-api/iterator.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,52 +17,52 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/iterator.rst:6
+#: c-api/iterator.rst:6
msgid "Iterator Objects"
msgstr ""
-#: ../Doc/c-api/iterator.rst:8
+#: c-api/iterator.rst:8
msgid ""
"Python provides two general-purpose iterator objects. The first, a sequence "
-"iterator, works with an arbitrary sequence supporting the :meth:"
-"`__getitem__` method. The second works with a callable object and a "
-"sentinel value, calling the callable for each item in the sequence, and "
-"ending the iteration when the sentinel value is returned."
+"iterator, works with an arbitrary sequence supporting the :meth:`~object."
+"__getitem__` method. The second works with a callable object and a sentinel "
+"value, calling the callable for each item in the sequence, and ending the "
+"iteration when the sentinel value is returned."
msgstr ""
-#: ../Doc/c-api/iterator.rst:17
+#: c-api/iterator.rst:17
msgid ""
"Type object for iterator objects returned by :c:func:`PySeqIter_New` and the "
"one-argument form of the :func:`iter` built-in function for built-in "
"sequence types."
msgstr ""
-#: ../Doc/c-api/iterator.rst:24
+#: c-api/iterator.rst:24
msgid ""
"Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function "
"always succeeds."
msgstr ""
-#: ../Doc/c-api/iterator.rst:30
+#: c-api/iterator.rst:30
msgid ""
"Return an iterator that works with a general sequence object, *seq*. The "
"iteration ends when the sequence raises :exc:`IndexError` for the "
"subscripting operation."
msgstr ""
-#: ../Doc/c-api/iterator.rst:37
+#: c-api/iterator.rst:37
msgid ""
"Type object for iterator objects returned by :c:func:`PyCallIter_New` and "
"the two-argument form of the :func:`iter` built-in function."
msgstr ""
-#: ../Doc/c-api/iterator.rst:43
+#: c-api/iterator.rst:43
msgid ""
"Return true if the type of *op* is :c:data:`PyCallIter_Type`. This function "
"always succeeds."
msgstr ""
-#: ../Doc/c-api/iterator.rst:49
+#: c-api/iterator.rst:49
msgid ""
"Return a new iterator. The first parameter, *callable*, can be any Python "
"callable object that can be called with no parameters; each call to it "
diff --git a/c-api/list.po b/c-api/list.po
index eaf62c1..f29476a 100644
--- a/c-api/list.po
+++ b/c-api/list.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,37 +17,37 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/list.rst:6
+#: c-api/list.rst:6
msgid "List Objects"
msgstr ""
-#: ../Doc/c-api/list.rst:13
+#: c-api/list.rst:13
msgid "This subtype of :c:type:`PyObject` represents a Python list object."
msgstr ""
-#: ../Doc/c-api/list.rst:18
+#: c-api/list.rst:18
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python list type. "
"This is the same object as :class:`list` in the Python layer."
msgstr ""
-#: ../Doc/c-api/list.rst:24
+#: c-api/list.rst:24
msgid ""
"Return true if *p* is a list object or an instance of a subtype of the list "
"type. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/list.rst:30
+#: c-api/list.rst:30
msgid ""
"Return true if *p* is a list object, but not an instance of a subtype of the "
"list type. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/list.rst:36
+#: c-api/list.rst:36
msgid "Return a new list of length *len* on success, or ``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/list.rst:40
+#: c-api/list.rst:40
msgid ""
"If *len* is greater than zero, the returned list object's items are set to "
"``NULL``. Thus you cannot use abstract API functions such as :c:func:"
@@ -55,69 +55,81 @@ msgid ""
"items to a real object with :c:func:`PyList_SetItem`."
msgstr ""
-#: ../Doc/c-api/list.rst:50
+#: c-api/list.rst:50
msgid ""
"Return the length of the list object in *list*; this is equivalent to "
"``len(list)`` on a list object."
msgstr ""
-#: ../Doc/c-api/list.rst:56
+#: c-api/list.rst:56
msgid "Similar to :c:func:`PyList_Size`, but without error checking."
msgstr ""
-#: ../Doc/c-api/list.rst:61
+#: c-api/list.rst:61
msgid ""
"Return the object at position *index* in the list pointed to by *list*. The "
"position must be non-negative; indexing from the end of the list is not "
-"supported. If *index* is out of bounds (<0 or >=len(list)), return ``NULL`` "
-"and set an :exc:`IndexError` exception."
+"supported. If *index* is out of bounds (:code:`<0 or >=len(list)`), return "
+"``NULL`` and set an :exc:`IndexError` exception."
msgstr ""
-#: ../Doc/c-api/list.rst:69
+#: c-api/list.rst:71
+msgid ""
+"Like :c:func:`PyList_GetItemRef`, but returns a :term:`borrowed reference` "
+"instead of a :term:`strong reference`."
+msgstr ""
+
+#: c-api/list.rst:77
msgid "Similar to :c:func:`PyList_GetItem`, but without error checking."
msgstr ""
-#: ../Doc/c-api/list.rst:74
+#: c-api/list.rst:82
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 ""
-#: ../Doc/c-api/list.rst:80
+#: c-api/list.rst:88
msgid ""
"This function \"steals\" a reference to *item* and discards a reference to "
"an item already in the list at the affected position."
msgstr ""
-#: ../Doc/c-api/list.rst:86
+#: c-api/list.rst:94
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 ""
-#: ../Doc/c-api/list.rst:91
+#: c-api/list.rst:97
+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:103
msgid ""
"This macro \"steals\" a reference to *item*, and, unlike :c:func:"
"`PyList_SetItem`, does *not* discard a reference to any item that is being "
"replaced; any reference in *list* at position *i* will be leaked."
msgstr ""
-#: ../Doc/c-api/list.rst:99
+#: c-api/list.rst:111
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 ""
-#: ../Doc/c-api/list.rst:106
+#: c-api/list.rst:118
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 ""
-#: ../Doc/c-api/list.rst:113
+#: c-api/list.rst:125
msgid ""
"Return a list of the objects in *list* containing the objects *between* "
"*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. "
@@ -125,7 +137,7 @@ msgid ""
"supported."
msgstr ""
-#: ../Doc/c-api/list.rst:120
+#: c-api/list.rst:132
msgid ""
"Set the slice of *list* between *low* and *high* to the contents of "
"*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may "
@@ -134,20 +146,66 @@ msgid ""
"list is not supported."
msgstr ""
-#: ../Doc/c-api/list.rst:129
+#: c-api/list.rst:141
+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:145
+msgid ""
+"Raise an exception and return ``-1`` if *list* is not a :class:`list` "
+"object. Return 0 on success."
+msgstr ""
+
+#: c-api/list.rst:153
+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:157
+msgid ""
+"Raise an exception and return ``-1`` if *list* is not a :class:`list` "
+"object. Return 0 on success."
+msgstr ""
+
+#: c-api/list.rst:165
msgid ""
"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on "
"failure. This is equivalent to ``list.sort()``."
msgstr ""
-#: ../Doc/c-api/list.rst:135
+#: c-api/list.rst:171
msgid ""
"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on "
"failure. This is the equivalent of ``list.reverse()``."
msgstr ""
-#: ../Doc/c-api/list.rst:143
+#: c-api/list.rst:179
msgid ""
"Return a new tuple object containing the contents of *list*; equivalent to "
"``tuple(list)``."
msgstr ""
+
+#: c-api/list.rst:8
+msgid "object"
+msgstr ""
+
+#: c-api/list.rst:8
+msgid "list"
+msgstr ""
+
+#: c-api/list.rst:177
+msgid "built-in function"
+msgstr ""
+
+#: c-api/list.rst:48
+msgid "len"
+msgstr ""
+
+#: c-api/list.rst:177
+msgid "tuple"
+msgstr ""
diff --git a/c-api/long.po b/c-api/long.po
index 820ced6..2488807 100644
--- a/c-api/long.po
+++ b/c-api/long.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,304 +17,341 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/long.rst:6
+#: c-api/long.rst:6
msgid "Integer Objects"
msgstr ""
-#: ../Doc/c-api/long.rst:11
+#: c-api/long.rst:11
msgid ""
"All integers are implemented as \"long\" integer objects of arbitrary size."
msgstr ""
-#: ../Doc/c-api/long.rst:13
+#: c-api/long.rst:13
msgid ""
"On error, most ``PyLong_As*`` APIs return ``(return type)-1`` which cannot "
"be distinguished from a number. Use :c:func:`PyErr_Occurred` to "
"disambiguate."
msgstr ""
-#: ../Doc/c-api/long.rst:18
+#: c-api/long.rst:18
msgid "This subtype of :c:type:`PyObject` represents a Python integer object."
msgstr ""
-#: ../Doc/c-api/long.rst:23
+#: c-api/long.rst:23
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python integer type. "
"This is the same object as :class:`int` in the Python layer."
msgstr ""
-#: ../Doc/c-api/long.rst:29
+#: c-api/long.rst:29
msgid ""
"Return true if its argument is a :c:type:`PyLongObject` or a subtype of :c:"
"type:`PyLongObject`. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/long.rst:35
+#: c-api/long.rst:35
msgid ""
"Return true if its argument is a :c:type:`PyLongObject`, but not a subtype "
"of :c:type:`PyLongObject`. This function always succeeds."
msgstr ""
-#: ../Doc/c-api/long.rst:41
+#: c-api/long.rst:41
msgid ""
"Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/long.rst:43
+#: c-api/long.rst:43
msgid ""
"The current implementation keeps an array of integer objects for all "
"integers between ``-5`` and ``256``. When you create an int in that range "
"you actually just get back a reference to the existing object."
msgstr ""
-#: ../Doc/c-api/long.rst:50
+#: c-api/long.rst:50
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, "
"or ``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/long.rst:56
+#: c-api/long.rst:56
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or "
"``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/long.rst:62
+#: c-api/long.rst:62
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or "
"``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/long.rst:68
+#: c-api/long.rst:68
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or "
"``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/long.rst:74
+#: c-api/long.rst:74
msgid ""
"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long "
"long`, or ``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/long.rst:80
+#: c-api/long.rst:80
msgid ""
"Return a new :c:type:`PyLongObject` object from the integer part of *v*, or "
"``NULL`` on failure."
msgstr ""
-#: ../Doc/c-api/long.rst:86
+#: c-api/long.rst:86
msgid ""
"Return a new :c:type:`PyLongObject` based on the string value in *str*, "
-"which is interpreted according to the radix in *base*. If *pend* is non-"
-"``NULL``, *\\*pend* will point to the first character in *str* which follows "
-"the representation of the number. If *base* is ``0``, *str* is interpreted "
-"using the :ref:`integers` definition; in this case, leading zeros in a non-"
-"zero decimal number raises a :exc:`ValueError`. If *base* is not ``0``, it "
-"must be between ``2`` and ``36``, inclusive. Leading spaces and single "
-"underscores after a base specifier and between digits are ignored. If there "
-"are no digits, :exc:`ValueError` will be raised."
+"which is interpreted according to the radix in *base*, or ``NULL`` on "
+"failure. If *pend* is non-``NULL``, *\\*pend* will point to the end of "
+"*str* on success or to the first character that could not be processed on "
+"error. If *base* is ``0``, *str* is interpreted using the :ref:`integers` "
+"definition; in this case, leading zeros in a non-zero decimal number raises "
+"a :exc:`ValueError`. If *base* is not ``0``, it must be between ``2`` and "
+"``36``, inclusive. Leading and trailing whitespace and single underscores "
+"after a base specifier and between digits are ignored. If there are no "
+"digits or *str* is not NULL-terminated following the digits and trailing "
+"whitespace, :exc:`ValueError` will be raised."
msgstr ""
-#: ../Doc/c-api/long.rst:99
+#: c-api/long.rst:97
+msgid ""
+"Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes` to convert a :"
+"c:type:`PyLongObject` to/from an array of bytes in base ``256``. You can "
+"call those from C using :c:func:`PyObject_CallMethod`."
+msgstr ""
+
+#: c-api/long.rst:104
msgid ""
"Convert a sequence of Unicode digits in the string *u* to a Python integer "
"value."
msgstr ""
-#: ../Doc/c-api/long.rst:107
+#: c-api/long.rst:112
msgid ""
"Create a Python integer from the pointer *p*. The pointer value can be "
"retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`."
msgstr ""
-#: ../Doc/c-api/long.rst:118 ../Doc/c-api/long.rst:136
+#: c-api/long.rst:118
+msgid ""
+"Create a Python integer from the value contained in the first *n_bytes* of "
+"*buffer*, interpreted as a two's-complement signed number."
+msgstr ""
+
+#: c-api/long.rst:121
+msgid ""
+"*flags* are as for :c:func:`PyLong_AsNativeBytes`. Passing ``-1`` will "
+"select the native endian that CPython was compiled with and assume that the "
+"most-significant bit is a sign bit. Passing "
+"``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` will produce the same result as "
+"calling :c:func:`PyLong_FromUnsignedNativeBytes`. Other flags are ignored."
+msgstr ""
+
+#: c-api/long.rst:132
+msgid ""
+"Create a Python integer from the value contained in the first *n_bytes* of "
+"*buffer*, interpreted as an unsigned number."
+msgstr ""
+
+#: c-api/long.rst:135
+msgid ""
+"*flags* are as for :c:func:`PyLong_AsNativeBytes`. Passing ``-1`` will "
+"select the native endian that CPython was compiled with and assume that the "
+"most-significant bit is not a sign bit. Flags other than endian are ignored."
+msgstr ""
+
+#: c-api/long.rst:175
msgid ""
"Return a C :c:expr:`long` representation of *obj*. If *obj* is not an "
-"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method "
-"(if present) to convert it to a :c:type:`PyLongObject`."
+"instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` "
+"method (if present) to convert it to a :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:122
+#: c-api/long.rst:153
msgid ""
"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:"
"expr:`long`."
msgstr ""
-#: ../Doc/c-api/long.rst:125 ../Doc/c-api/long.rst:145
-#: ../Doc/c-api/long.rst:166 ../Doc/c-api/long.rst:186
-#: ../Doc/c-api/long.rst:209
+#: c-api/long.rst:184 c-api/long.rst:225 c-api/long.rst:248
msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
msgstr ""
-#: ../Doc/c-api/long.rst:127 ../Doc/c-api/long.rst:147
-#: ../Doc/c-api/long.rst:168 ../Doc/c-api/long.rst:190
-#: ../Doc/c-api/long.rst:274 ../Doc/c-api/long.rst:294
-msgid "Use :meth:`__index__` if available."
+#: c-api/long.rst:186 c-api/long.rst:229 c-api/long.rst:333
+msgid "Use :meth:`~object.__index__` if available."
msgstr ""
-#: ../Doc/c-api/long.rst:130 ../Doc/c-api/long.rst:150
-#: ../Doc/c-api/long.rst:171 ../Doc/c-api/long.rst:193
-#: ../Doc/c-api/long.rst:277 ../Doc/c-api/long.rst:297
-msgid "This function will no longer use :meth:`__int__`."
+#: c-api/long.rst:189 c-api/long.rst:232 c-api/long.rst:336
+msgid "This function will no longer use :meth:`~object.__int__`."
msgstr ""
-#: ../Doc/c-api/long.rst:140
+#: c-api/long.rst:167
msgid ""
-"If the value of *obj* is greater than :const:`LONG_MAX` or less than :const:"
-"`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return "
-"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception "
-"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
+"Similar to :c:func:`PyLong_AsLong`, but store the result in a C :c:expr:"
+"`int` instead of a C :c:expr:`long`."
msgstr ""
-#: ../Doc/c-api/long.rst:159 ../Doc/c-api/long.rst:177
+#: c-api/long.rst:179
+msgid ""
+"If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than :c:"
+"macro:`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and "
+"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other "
+"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
+msgstr ""
+
+#: c-api/long.rst:216
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:`__index__` method "
-"(if present) to convert it to a :c:type:`PyLongObject`."
+"instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` "
+"method (if present) to convert it to a :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:163
+#: c-api/long.rst:202
msgid ""
"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:"
"expr:`long long`."
msgstr ""
-#: ../Doc/c-api/long.rst:181
+#: c-api/long.rst:220
msgid ""
-"If the value of *obj* is greater than :const:`LLONG_MAX` or less than :const:"
-"`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return "
-"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception "
-"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
+"If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than :c:"
+"macro:`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and "
+"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other "
+"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
msgstr ""
-#: ../Doc/c-api/long.rst:203
+#: c-api/long.rst:242
msgid ""
"Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must "
"be an instance of :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:206
+#: c-api/long.rst:245
msgid ""
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
"type:`Py_ssize_t`."
msgstr ""
-#: ../Doc/c-api/long.rst:218
+#: c-api/long.rst:257
msgid ""
"Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* "
"must be an instance of :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:221
+#: c-api/long.rst:260
msgid ""
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
"expr:`unsigned long`."
msgstr ""
-#: ../Doc/c-api/long.rst:224
+#: c-api/long.rst:263
msgid ""
"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
"disambiguate."
msgstr ""
-#: ../Doc/c-api/long.rst:234
+#: c-api/long.rst:273
msgid ""
"Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an "
"instance of :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:237
+#: c-api/long.rst:276
msgid ""
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
"type:`size_t`."
msgstr ""
-#: ../Doc/c-api/long.rst:240
+#: c-api/long.rst:279
msgid ""
"Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to "
"disambiguate."
msgstr ""
-#: ../Doc/c-api/long.rst:249
+#: c-api/long.rst:288
msgid ""
"Return a C :c:expr:`unsigned long long` representation of *pylong*. "
"*pylong* must be an instance of :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:252
+#: c-api/long.rst:291
msgid ""
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :"
"c:expr:`unsigned long long`."
msgstr ""
-#: ../Doc/c-api/long.rst:255
+#: c-api/long.rst:294
msgid ""
"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
"disambiguate."
msgstr ""
-#: ../Doc/c-api/long.rst:258
+#: c-api/long.rst:297
msgid ""
"A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`."
msgstr ""
-#: ../Doc/c-api/long.rst:264
+#: c-api/long.rst:303
msgid ""
"Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not "
-"an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` "
-"method (if present) to convert it to a :c:type:`PyLongObject`."
+"an instance of :c:type:`PyLongObject`, first call its :meth:`~object."
+"__index__` method (if present) to convert it to a :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:268
+#: c-api/long.rst:307
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 ""
-#: ../Doc/c-api/long.rst:271
+#: c-api/long.rst:310
msgid ""
"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
"disambiguate."
msgstr ""
-#: ../Doc/c-api/long.rst:283
+#: c-api/long.rst:322
msgid ""
"Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* "
-"is not an instance of :c:type:`PyLongObject`, first call its :meth:"
-"`__index__` method (if present) to convert it to a :c:type:`PyLongObject`."
+"is not an instance of :c:type:`PyLongObject`, first call its :meth:`~object."
+"__index__` method (if present) to convert it to a :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:288
+#: c-api/long.rst:327
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 ""
-#: ../Doc/c-api/long.rst:291
+#: c-api/long.rst:330
msgid ""
"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` "
"to disambiguate."
msgstr ""
-#: ../Doc/c-api/long.rst:303
+#: c-api/long.rst:342
msgid ""
"Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an "
"instance of :c:type:`PyLongObject`."
msgstr ""
-#: ../Doc/c-api/long.rst:306
+#: c-api/long.rst:345
msgid ""
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
"expr:`double`."
msgstr ""
-#: ../Doc/c-api/long.rst:309
+#: c-api/long.rst:348
msgid ""
"Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
msgstr ""
-#: ../Doc/c-api/long.rst:314
+#: c-api/long.rst:353
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 "
@@ -322,7 +359,225 @@ msgid ""
"c:func:`PyLong_FromVoidPtr`."
msgstr ""
-#: ../Doc/c-api/long.rst:319
+#: c-api/long.rst:358
msgid ""
"Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
msgstr ""
+
+#: c-api/long.rst:363
+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:367
+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:371
+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."
+msgstr ""
+
+#: c-api/long.rst:376
+msgid ""
+"If the returned value is greater than than *n_bytes*, the value was "
+"truncated: as many of the lowest bits of the value as could fit are written, "
+"and the higher bits are ignored. This matches the typical behavior of a C-"
+"style downcast."
+msgstr ""
+
+#: c-api/long.rst:383
+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:386
+msgid "``0`` will never be returned."
+msgstr ""
+
+#: c-api/long.rst:388
+msgid "Values are always copied as two's-complement."
+msgstr ""
+
+#: c-api/long.rst:390
+msgid "Usage example::"
+msgstr ""
+
+#: c-api/long.rst:406
+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."
+msgstr ""
+
+#: c-api/long.rst:412
+msgid ""
+"Passing *n_bytes=0* to this function is not an accurate way to determine the "
+"bit length of a value."
+msgstr ""
+
+#: c-api/long.rst:415
+msgid "If *n_bytes=0*, *buffer* may be ``NULL``."
+msgstr ""
+
+#: c-api/long.rst:417
+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:448
+msgid ""
+"*flags* is either ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) to select defaults "
+"that behave most like a C cast, or a combintation of the other flags in the "
+"table below. Note that ``-1`` cannot be combined with other flags."
+msgstr ""
+
+#: c-api/long.rst:453
+msgid ""
+"Currently, ``-1`` corresponds to ``Py_ASNATIVEBYTES_NATIVE_ENDIAN | "
+"Py_ASNATIVEBYTES_UNSIGNED_BUFFER``."
+msgstr ""
+
+#: c-api/long.rst:457
+msgid "Flag"
+msgstr ""
+
+#: c-api/long.rst:457
+msgid "Value"
+msgstr ""
+
+#: c-api/long.rst:459
+msgid "``-1``"
+msgstr ""
+
+#: c-api/long.rst:460
+msgid "``0``"
+msgstr ""
+
+#: c-api/long.rst:461
+msgid "``1``"
+msgstr ""
+
+#: c-api/long.rst:462
+msgid "``3``"
+msgstr ""
+
+#: c-api/long.rst:463
+msgid "``4``"
+msgstr ""
+
+#: c-api/long.rst:464
+msgid "``8``"
+msgstr ""
+
+#: c-api/long.rst:467
+msgid ""
+"Specifying ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` will override any other endian "
+"flags. Passing ``2`` is reserved."
+msgstr ""
+
+#: c-api/long.rst:470
+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:474
+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 "
+"single-byte buffer. If the destination buffer is later treated as signed, a "
+"positive input value may become negative. Note that the flag does not affect "
+"handling of negative values: for those, space for a sign bit is always "
+"requested."
+msgstr ""
+
+#: c-api/long.rst:481
+msgid ""
+"Specifying ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` causes an exception to be "
+"set if *pylong* is negative. Without this flag, negative values will be "
+"copied provided there is enough space for at least one sign bit, regardless "
+"of whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified."
+msgstr ""
+
+#: c-api/long.rst:488
+msgid ""
+"With the default *flags* (``-1``, or *UNSIGNED_BUFFER* without "
+"*REJECT_NEGATIVE*), multiple Python integers can map to a single value "
+"without overflow. For example, both ``255`` and ``-1`` fit a single-byte "
+"buffer and set all its bits. This matches typical C cast behavior."
+msgstr ""
+
+#: c-api/long.rst:499
+msgid "Return 1 if *op* is compact, 0 otherwise."
+msgstr ""
+
+#: c-api/long.rst:501
+msgid ""
+"This function makes it possible for performance-critical code to implement a "
+"“fast path” for small integers. For compact values use :c:func:"
+"`PyUnstable_Long_CompactValue`; for others fall back to a :c:func:"
+"`PyLong_As* ` function or :c:func:`PyLong_AsNativeBytes`."
+msgstr ""
+
+#: c-api/long.rst:507
+msgid "The speedup is expected to be negligible for most users."
+msgstr ""
+
+#: c-api/long.rst:509
+msgid ""
+"Exactly what values are considered compact is an implementation detail and "
+"is subject to change."
+msgstr ""
+
+#: c-api/long.rst:514
+msgid ""
+"If *op* is compact, as determined by :c:func:`PyUnstable_Long_IsCompact`, "
+"return its value."
+msgstr ""
+
+#: c-api/long.rst:517
+msgid "Otherwise, the return value is undefined."
+msgstr ""
+
+#: c-api/long.rst:8
+msgid "object"
+msgstr ""
+
+#: c-api/long.rst:8
+msgid "long integer"
+msgstr ""
+
+#: c-api/long.rst:8
+msgid "integer"
+msgstr ""
+
+#: c-api/long.rst:145
+msgid "LONG_MAX (C macro)"
+msgstr ""
+
+#: c-api/long.rst:195 c-api/long.rst:253 c-api/long.rst:285
+msgid "OverflowError (built-in exception)"
+msgstr ""
+
+#: c-api/long.rst:238
+msgid "PY_SSIZE_T_MAX (C macro)"
+msgstr ""
+
+#: c-api/long.rst:253
+msgid "ULONG_MAX (C macro)"
+msgstr ""
+
+#: c-api/long.rst:269
+msgid "SIZE_MAX (C macro)"
+msgstr ""
diff --git a/c-api/mapping.po b/c-api/mapping.po
index 1591e47..faa94df 100644
--- a/c-api/mapping.po
+++ b/c-api/mapping.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,99 +17,149 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/mapping.rst:6
+#: c-api/mapping.rst:6
msgid "Mapping Protocol"
msgstr ""
-#: ../Doc/c-api/mapping.rst:8
+#: c-api/mapping.rst:8
msgid ""
"See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and :c:func:"
"`PyObject_DelItem`."
msgstr ""
-#: ../Doc/c-api/mapping.rst:14
+#: c-api/mapping.rst:14
msgid ""
"Return ``1`` if the object provides the mapping protocol or supports "
"slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes "
-"with a :meth:`__getitem__` method, since in general it is impossible to "
-"determine what type of keys the class supports. This function always "
+"with a :meth:`~object.__getitem__` method, since in general it is impossible "
+"to determine what type of keys the class supports. This function always "
"succeeds."
msgstr ""
-#: ../Doc/c-api/mapping.rst:25
+#: c-api/mapping.rst:25
msgid ""
"Returns the number of keys in object *o* on success, and ``-1`` on failure. "
"This is equivalent to the Python expression ``len(o)``."
msgstr ""
-#: ../Doc/c-api/mapping.rst:31
+#: c-api/mapping.rst:31
msgid ""
-"Return element of *o* corresponding to the string *key* or ``NULL`` on "
-"failure. This is the equivalent of the Python expression ``o[key]``. See "
-"also :c:func:`PyObject_GetItem`."
+"This is the same as :c:func:`PyObject_GetItem`, but *key* is specified as a :"
+"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
+"`PyObject*`."
msgstr ""
-#: ../Doc/c-api/mapping.rst:38
+#: c-api/mapping.rst:38
msgid ""
-"Map the string *key* to the value *v* in object *o*. Returns ``-1`` on "
-"failure. This is the equivalent of the Python statement ``o[key] = v``. See "
-"also :c:func:`PyObject_SetItem`. This function *does not* steal a reference "
-"to *v*."
+"Variant of :c:func:`PyObject_GetItem` which doesn't raise :exc:`KeyError` if "
+"the key is not found."
msgstr ""
-#: ../Doc/c-api/mapping.rst:46
+#: c-api/mapping.rst:41
msgid ""
-"Remove the mapping for the object *key* from the object *o*. Return ``-1`` "
-"on failure. This is equivalent to the Python statement ``del o[key]``. This "
-"is an alias of :c:func:`PyObject_DelItem`."
+"If the key is found, return ``1`` and set *\\*result* to a new :term:`strong "
+"reference` to the corresponding value. If the key is not found, return ``0`` "
+"and set *\\*result* to ``NULL``; the :exc:`KeyError` is silenced. If an "
+"error other than :exc:`KeyError` is raised, return ``-1`` and set "
+"*\\*result* to ``NULL``."
msgstr ""
-#: ../Doc/c-api/mapping.rst:53
+#: c-api/mapping.rst:53
msgid ""
-"Remove the mapping for the string *key* from the object *o*. Return ``-1`` "
-"on failure. This is equivalent to the Python statement ``del o[key]``."
+"This is the same as :c:func:`PyMapping_GetOptionalItem`, but *key* is "
+"specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
-#: ../Doc/c-api/mapping.rst:59 ../Doc/c-api/mapping.rst:70
+#: c-api/mapping.rst:62
+msgid ""
+"This is the same as :c:func:`PyObject_SetItem`, but *key* is specified as a :"
+"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
+"`PyObject*`."
+msgstr ""
+
+#: c-api/mapping.rst:69
+msgid "This is an alias of :c:func:`PyObject_DelItem`."
+msgstr ""
+
+#: c-api/mapping.rst:74
+msgid ""
+"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :"
+"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
+"`PyObject*`."
+msgstr ""
+
+#: c-api/mapping.rst:81
+msgid ""
+"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. "
+"This is equivalent to the Python expression ``key in o``. On failure, return "
+"``-1``."
+msgstr ""
+
+#: c-api/mapping.rst:90
+msgid ""
+"This is the same as :c:func:`PyMapping_HasKeyWithError`, but *key* is "
+"specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
+msgstr ""
+
+#: c-api/mapping.rst:99
msgid ""
"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. "
"This is equivalent to the Python expression ``key in o``. This function "
"always succeeds."
msgstr ""
-#: ../Doc/c-api/mapping.rst:63
+#: c-api/mapping.rst:105
msgid ""
-"Note that exceptions which occur while calling the :meth:`__getitem__` "
-"method will get suppressed. To get error reporting use :c:func:"
+"Exceptions which occur when this calls :meth:`~object.__getitem__` method "
+"are silently ignored. For proper error handling, use :c:func:"
+"`PyMapping_HasKeyWithError`, :c:func:`PyMapping_GetOptionalItem` or :c:func:"
"`PyObject_GetItem()` instead."
msgstr ""
-#: ../Doc/c-api/mapping.rst:74
+#: c-api/mapping.rst:113
msgid ""
-"Note that exceptions which occur while calling the :meth:`__getitem__` "
-"method and creating a temporary string object will get suppressed. To get "
-"error reporting use :c:func:`PyMapping_GetItemString()` instead."
+"This is the same as :c:func:`PyMapping_HasKey`, but *key* is specified as a :"
+"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
+"`PyObject*`."
msgstr ""
-#: ../Doc/c-api/mapping.rst:81
+#: c-api/mapping.rst:119
+msgid ""
+"Exceptions that occur when this calls :meth:`~object.__getitem__` method or "
+"while creating the temporary :class:`str` object are silently ignored. For "
+"proper error handling, use :c:func:`PyMapping_HasKeyStringWithError`, :c:"
+"func:`PyMapping_GetOptionalItemString` or :c:func:`PyMapping_GetItemString` "
+"instead."
+msgstr ""
+
+#: c-api/mapping.rst:129
msgid ""
"On success, return a list of the keys in object *o*. On failure, return "
"``NULL``."
msgstr ""
-#: ../Doc/c-api/mapping.rst:84 ../Doc/c-api/mapping.rst:93
-#: ../Doc/c-api/mapping.rst:102
+#: c-api/mapping.rst:141 c-api/mapping.rst:150
msgid "Previously, the function returned a list or a tuple."
msgstr ""
-#: ../Doc/c-api/mapping.rst:90
+#: c-api/mapping.rst:138
msgid ""
"On success, return a list of the values in object *o*. On failure, return "
"``NULL``."
msgstr ""
-#: ../Doc/c-api/mapping.rst:99
+#: c-api/mapping.rst:147
msgid ""
"On success, return a list of the items in object *o*, where each item is a "
"tuple containing a key-value pair. On failure, return ``NULL``."
msgstr ""
+
+#: c-api/mapping.rst:23
+msgid "built-in function"
+msgstr ""
+
+#: c-api/mapping.rst:23
+msgid "len"
+msgstr ""
diff --git a/c-api/marshal.po b/c-api/marshal.po
index f4a0bda..7a7f87c 100644
--- a/c-api/marshal.po
+++ b/c-api/marshal.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/marshal.rst:6
+#: c-api/marshal.rst:6
msgid "Data marshalling support"
msgstr ""
-#: ../Doc/c-api/marshal.rst:8
+#: c-api/marshal.rst:8
msgid ""
"These routines allow C code to work with serialized objects using the same "
"data format as the :mod:`marshal` module. There are functions to write data "
@@ -30,11 +30,11 @@ msgid ""
"binary mode."
msgstr ""
-#: ../Doc/c-api/marshal.rst:14
+#: c-api/marshal.rst:14
msgid "Numeric values are stored with the least significant byte first."
msgstr ""
-#: ../Doc/c-api/marshal.rst:16
+#: c-api/marshal.rst:16
msgid ""
"The module supports two versions of the data format: version 0 is the "
"historical version, version 1 shares interned strings in the file, and upon "
@@ -42,63 +42,68 @@ msgid ""
"``Py_MARSHAL_VERSION`` indicates the current file format (currently 2)."
msgstr ""
-#: ../Doc/c-api/marshal.rst:24
+#: c-api/marshal.rst:24
msgid ""
"Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write "
"the least-significant 32 bits of *value*; regardless of the size of the "
"native :c:expr:`long` type. *version* indicates the file format."
msgstr ""
-#: ../Doc/c-api/marshal.rst:31
+#: c-api/marshal.rst:36
+msgid ""
+"This function can fail, in which case it sets the error indicator. Use :c:"
+"func:`PyErr_Occurred` to check for that."
+msgstr ""
+
+#: c-api/marshal.rst:33
msgid ""
"Marshal a Python object, *value*, to *file*. *version* indicates the file "
"format."
msgstr ""
-#: ../Doc/c-api/marshal.rst:37
+#: c-api/marshal.rst:41
msgid ""
"Return a bytes object containing the marshalled representation of *value*. "
"*version* indicates the file format."
msgstr ""
-#: ../Doc/c-api/marshal.rst:41
+#: c-api/marshal.rst:45
msgid "The following functions allow marshalled values to be read back in."
msgstr ""
-#: ../Doc/c-api/marshal.rst:46
+#: c-api/marshal.rst:50
msgid ""
"Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened "
"for reading. Only a 32-bit value can be read in using this function, "
"regardless of the native size of :c:expr:`long`."
msgstr ""
-#: ../Doc/c-api/marshal.rst:50 ../Doc/c-api/marshal.rst:60
+#: c-api/marshal.rst:64
msgid ""
"On error, sets the appropriate exception (:exc:`EOFError`) and returns "
"``-1``."
msgstr ""
-#: ../Doc/c-api/marshal.rst:56
+#: c-api/marshal.rst:60
msgid ""
"Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened "
"for reading. Only a 16-bit value can be read in using this function, "
"regardless of the native size of :c:expr:`short`."
msgstr ""
-#: ../Doc/c-api/marshal.rst:66
+#: c-api/marshal.rst:70
msgid ""
"Return a Python object from the data stream in a :c:expr:`FILE*` opened for "
"reading."
msgstr ""
-#: ../Doc/c-api/marshal.rst:69 ../Doc/c-api/marshal.rst:83
-#: ../Doc/c-api/marshal.rst:92
+#: c-api/marshal.rst:87 c-api/marshal.rst:96
msgid ""
"On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` "
"or :exc:`TypeError`) and returns ``NULL``."
msgstr ""
-#: ../Doc/c-api/marshal.rst:75
+#: c-api/marshal.rst:79
msgid ""
"Return a Python object from the data stream in a :c:expr:`FILE*` opened for "
"reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function "
@@ -109,7 +114,7 @@ msgid ""
"anything else from the file."
msgstr ""
-#: ../Doc/c-api/marshal.rst:89
+#: c-api/marshal.rst:93
msgid ""
"Return a Python object from the data stream in a byte buffer containing "
"*len* bytes pointed to by *data*."
diff --git a/c-api/memory.po b/c-api/memory.po
index f6498f3..1fce874 100644
--- a/c-api/memory.po
+++ b/c-api/memory.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-11-18 00:29+0100\n"
+"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,15 +17,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Doc/c-api/memory.rst:8
+#: c-api/memory.rst:8
msgid "Memory Management"
msgstr ""
-#: ../Doc/c-api/memory.rst:17
+#: c-api/memory.rst:17
msgid "Overview"
msgstr ""
-#: ../Doc/c-api/memory.rst:19
+#: c-api/memory.rst:19
msgid ""
"Memory management in Python involves a private heap containing all Python "
"objects and data structures. The management of this private heap is ensured "
@@ -34,7 +34,7 @@ msgid ""
"aspects, like sharing, segmentation, preallocation or caching."
msgstr ""
-#: ../Doc/c-api/memory.rst:25
+#: c-api/memory.rst:25
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 "
@@ -48,7 +48,7 @@ msgid ""
"but ensures that the latter operate within the bounds of the private heap."
msgstr ""
-#: ../Doc/c-api/memory.rst:36
+#: c-api/memory.rst:36
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 "
@@ -58,7 +58,7 @@ msgid ""
"the Python/C API functions listed in this document."
msgstr ""
-#: ../Doc/c-api/memory.rst:49
+#: c-api/memory.rst:49
msgid ""
"To avoid memory corruption, extension writers should never try to operate on "
"Python objects with the functions exported by the C library: :c:func:"
@@ -70,14 +70,14 @@ msgid ""
"in the following example::"
msgstr ""
-#: ../Doc/c-api/memory.rst:68
+#: c-api/memory.rst:68
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 ""
-#: ../Doc/c-api/memory.rst:72
+#: c-api/memory.rst:72
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 "
@@ -95,24 +95,24 @@ msgid ""
"completely the Python memory manager."
msgstr ""
-#: ../Doc/c-api/memory.rst:88
+#: c-api/memory.rst:88
msgid ""
"The :envvar:`PYTHONMALLOC` environment variable can be used to configure the "
"memory allocators used by Python."
msgstr ""
-#: ../Doc/c-api/memory.rst:91
+#: c-api/memory.rst:91
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 ""
-#: ../Doc/c-api/memory.rst:96
+#: c-api/memory.rst:96
msgid "Allocator Domains"
msgstr ""
-#: ../Doc/c-api/memory.rst:100
+#: c-api/memory.rst:100
msgid ""
"All allocating functions belong to one of three different \"domains\" (see "
"also :c:type:`PyMemAllocatorDomain`). These domains represent different "
@@ -128,11 +128,11 @@ msgid ""
"`PyObject_Malloc` for allocating memory for buffers."
msgstr ""
-#: ../Doc/c-api/memory.rst:112
+#: c-api/memory.rst:112
msgid "The three allocation domains are:"
msgstr ""
-#: ../Doc/c-api/memory.rst:114
+#: c-api/memory.rst:114
msgid ""
"Raw domain: intended for allocating memory for general-purpose memory "
"buffers where the allocation *must* go to the system allocator or where the "
@@ -140,20 +140,20 @@ msgid ""
"directly to the system."
msgstr ""
-#: ../Doc/c-api/memory.rst:119
+#: c-api/memory.rst:119
msgid ""
"\"Mem\" domain: intended for allocating memory for Python buffers and "
"general-purpose memory buffers where the allocation must be performed with "
"the :term:`GIL` held. The memory is taken from the Python private heap."
msgstr ""
-#: ../Doc/c-api/memory.rst:123
+#: c-api/memory.rst:123
msgid ""
"Object domain: intended for allocating memory belonging to Python objects. "
"The memory is taken from the Python private heap."
msgstr ""
-#: ../Doc/c-api/memory.rst:126
+#: c-api/memory.rst:126
msgid ""
"When freeing memory previously allocated by the allocating functions "
"belonging to a given domain,the matching specific deallocating functions "
@@ -161,82 +161,79 @@ msgid ""
"allocated using :c:func:`PyMem_Malloc`."
msgstr ""
-#: ../Doc/c-api/memory.rst:131
+#: c-api/memory.rst:131
msgid "Raw Memory Interface"
msgstr ""
-#: ../Doc/c-api/memory.rst:133
+#: c-api/memory.rst:133
msgid ""
"The following function sets are wrappers to the system allocator. These "
"functions are thread-safe, the :term:`GIL ` does "
"not need to be held."
msgstr ""
-#: ../Doc/c-api/memory.rst:137
+#: c-api/memory.rst:137
msgid ""
"The :ref:`default raw memory allocator ` uses the "
"following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` "
-"and :c:func:`free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when requesting "
-"zero bytes."
+"and :c:func:`!free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when "
+"requesting zero bytes."
msgstr ""
-#: ../Doc/c-api/memory.rst:146 ../Doc/c-api/memory.rst:217
-#: ../Doc/c-api/memory.rst:325
+#: c-api/memory.rst:217 c-api/memory.rst:325
msgid ""
"Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the "
"allocated memory, or ``NULL`` if the request fails."
msgstr ""
-#: ../Doc/c-api/memory.rst:149
+#: c-api/memory.rst:149
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 ""
-#: ../Doc/c-api/memory.rst:156 ../Doc/c-api/memory.rst:227
-#: ../Doc/c-api/memory.rst:335
+#: c-api/memory.rst:227 c-api/memory.rst:335
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 ""
-#: ../Doc/c-api/memory.rst:160
+#: c-api/memory.rst:160
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 ""
-#: ../Doc/c-api/memory.rst:169 ../Doc/c-api/memory.rst:240
-#: ../Doc/c-api/memory.rst:348
+#: c-api/memory.rst:240 c-api/memory.rst:348
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 ""
-#: ../Doc/c-api/memory.rst:172
+#: c-api/memory.rst:172
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 ""
-#: ../Doc/c-api/memory.rst:176
+#: c-api/memory.rst:176
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 ""
-#: ../Doc/c-api/memory.rst:180
+#: c-api/memory.rst:180
msgid ""
"If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* "
"remains a valid pointer to the previous memory area."
msgstr ""
-#: ../Doc/c-api/memory.rst:186
+#: c-api/memory.rst:186
msgid ""
"Frees the memory block pointed to by *p*, which must have been returned by a "
"previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:"
@@ -244,73 +241,72 @@ msgid ""
"called before, undefined behavior occurs."
msgstr ""
-#: ../Doc/c-api/memory.rst:191 ../Doc/c-api/memory.rst:261
-#: ../Doc/c-api/memory.rst:369
+#: c-api/memory.rst:261 c-api/memory.rst:369
msgid "If *p* is ``NULL``, no operation is performed."
msgstr ""
-#: ../Doc/c-api/memory.rst:197
+#: c-api/memory.rst:197
msgid "Memory Interface"
msgstr ""
-#: ../Doc/c-api/memory.rst:199 ../Doc/c-api/memory.rst:305
+#: c-api/memory.rst:305
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 ""
-#: ../Doc/c-api/memory.rst:203
+#: c-api/memory.rst:203
msgid ""
"The :ref:`default memory allocator ` uses the :"
"ref:`pymalloc memory allocator `."
msgstr ""
-#: ../Doc/c-api/memory.rst:208 ../Doc/c-api/memory.rst:320
+#: c-api/memory.rst:320
msgid ""
"The :term:`GIL ` must be held when using these "
"functions."
msgstr ""
-#: ../Doc/c-api/memory.rst:213
+#: c-api/memory.rst:213
msgid ""
"The default allocator is now pymalloc instead of system :c:func:`malloc`."
msgstr ""
-#: ../Doc/c-api/memory.rst:220
+#: c-api/memory.rst:220
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 ""
-#: ../Doc/c-api/memory.rst:231
+#: c-api/memory.rst:231
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 ""
-#: ../Doc/c-api/memory.rst:243
+#: c-api/memory.rst:243
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 ""
-#: ../Doc/c-api/memory.rst:247
+#: c-api/memory.rst:247
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 ""
-#: ../Doc/c-api/memory.rst:250
+#: c-api/memory.rst:250
msgid ""
"If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* "
"remains a valid pointer to the previous memory area."
msgstr ""
-#: ../Doc/c-api/memory.rst:256
+#: c-api/memory.rst:256
msgid ""
"Frees the memory block pointed to by *p*, which must have been returned by a "
"previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:"
@@ -318,38 +314,38 @@ msgid ""
"undefined behavior occurs."
msgstr ""
-#: ../Doc/c-api/memory.rst:263
+#: c-api/memory.rst:263
msgid ""
"The following type-oriented macros are provided for convenience. Note that "
"*TYPE* refers to any C type."
msgstr ""
-#: ../Doc/c-api/memory.rst:269
+#: c-api/memory.rst:269
msgid ""
"Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes "
-"of memory. Returns a pointer cast to :c:expr:`TYPE*`. The memory will not "
-"have been initialized in any way."
+"of memory. Returns a pointer cast to ``TYPE*``. The memory will not have "
+"been initialized in any way."
msgstr ""
-#: ../Doc/c-api/memory.rst:276
+#: c-api/memory.rst:276
msgid ""
"Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * "
-"sizeof(TYPE))`` bytes. Returns a pointer cast to :c:expr:`TYPE*`. On "
-"return, *p* will be a pointer to the new memory area, or ``NULL`` in the "
-"event of failure."
+"sizeof(TYPE))`` bytes. Returns a pointer cast to ``TYPE*``. On return, *p* "
+"will be a pointer to the new memory area, or ``NULL`` in the event of "
+"failure."
msgstr ""
-#: ../Doc/c-api/memory.rst:281
+#: c-api/memory.rst:281
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 ""
-#: ../Doc/c-api/memory.rst:287
+#: c-api/memory.rst:287
msgid "Same as :c:func:`PyMem_Free`."
msgstr ""
-#: ../Doc/c-api/memory.rst:289
+#: c-api/memory.rst:289
msgid ""
"In addition, the following macro sets are provided for calling the Python "
"memory allocator directly, without involving the C API functions listed "
@@ -357,35 +353,35 @@ msgid ""
"across Python versions and is therefore deprecated in extension modules."
msgstr ""
-#: ../Doc/c-api/memory.rst:294
+#: c-api/memory.rst:294
msgid "``PyMem_MALLOC(size)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:295
+#: c-api/memory.rst:295
msgid "``PyMem_NEW(type, size)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:296
+#: c-api/memory.rst:296
msgid "``PyMem_REALLOC(ptr, size)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:297
+#: c-api/memory.rst:297
msgid "``PyMem_RESIZE(ptr, type, size)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:298
+#: c-api/memory.rst:298
msgid "``PyMem_FREE(ptr)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:299
+#: c-api/memory.rst:299
msgid "``PyMem_DEL(ptr)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:303
+#: c-api/memory.rst:303
msgid "Object allocators"
msgstr ""
-#: ../Doc/c-api/memory.rst:310
+#: c-api/memory.rst:310
msgid ""
"There is no guarantee that the memory returned by these allocators can be "
"successfully cast to a Python object when intercepting the allocating "
@@ -393,47 +389,47 @@ msgid ""
"Memory Allocators ` section."
msgstr ""
-#: ../Doc/c-api/memory.rst:315
+#: c-api/memory.rst:315
msgid ""
"The :ref:`default object allocator ` uses the :"
"ref:`pymalloc memory allocator `."
msgstr ""
-#: ../Doc/c-api/memory.rst:328
+#: c-api/memory.rst:328
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 ""
-#: ../Doc/c-api/memory.rst:339
+#: c-api/memory.rst:339
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 ""
-#: ../Doc/c-api/memory.rst:351
+#: c-api/memory.rst:351
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 ""
-#: ../Doc/c-api/memory.rst:355
+#: c-api/memory.rst:355
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 ""
-#: ../Doc/c-api/memory.rst:358
+#: c-api/memory.rst:358
msgid ""
"If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* "
"remains a valid pointer to the previous memory area."
msgstr ""
-#: ../Doc/c-api/memory.rst:364
+#: c-api/memory.rst:364
msgid ""
"Frees the memory block pointed to by *p*, which must have been returned by a "
"previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:"
@@ -441,270 +437,282 @@ msgid ""
"called before, undefined behavior occurs."
msgstr ""
-#: ../Doc/c-api/memory.rst:375
+#: c-api/memory.rst:375
msgid "Default Memory Allocators"
msgstr ""
-#: ../Doc/c-api/memory.rst:377
+#: c-api/memory.rst:377
msgid "Default memory allocators:"
msgstr ""
-#: ../Doc/c-api/memory.rst:380
+#: c-api/memory.rst:380
msgid "Configuration"
msgstr ""
-#: ../Doc/c-api/memory.rst:380
+#: c-api/memory.rst:380
msgid "Name"
msgstr ""
-#: ../Doc/c-api/memory.rst:380
+#: c-api/memory.rst:380
msgid "PyMem_RawMalloc"
msgstr ""
-#: ../Doc/c-api/memory.rst:380
+#: c-api/memory.rst:380
msgid "PyMem_Malloc"
msgstr ""
-#: ../Doc/c-api/memory.rst:380
+#: c-api/memory.rst:380
msgid "PyObject_Malloc"
msgstr ""
-#: ../Doc/c-api/memory.rst:382
+#: c-api/memory.rst:382
msgid "Release build"
msgstr ""
-#: ../Doc/c-api/memory.rst:382
+#: c-api/memory.rst:382
msgid "``\"pymalloc\"``"
msgstr ""
-#: ../Doc/c-api/memory.rst:382 ../Doc/c-api/memory.rst:384
+#: c-api/memory.rst:384
msgid "``malloc``"
msgstr ""
-#: ../Doc/c-api/memory.rst:382
+#: c-api/memory.rst:382
msgid "``pymalloc``"
msgstr ""
-#: ../Doc/c-api/memory.rst:383
+#: c-api/memory.rst:383
msgid "Debug build"
msgstr ""
-#: ../Doc/c-api/memory.rst:383
+#: c-api/memory.rst:383
msgid "``\"pymalloc_debug\"``"
msgstr ""
-#: ../Doc/c-api/memory.rst:383 ../Doc/c-api/memory.rst:385
+#: c-api/memory.rst:385
msgid "``malloc`` + debug"
msgstr ""
-#: ../Doc/c-api/memory.rst:383
+#: c-api/memory.rst:383
msgid "``pymalloc`` + debug"
msgstr ""
-#: ../Doc/c-api/memory.rst:384
+#: c-api/memory.rst:384
msgid "Release build, without pymalloc"
msgstr ""
-#: ../Doc/c-api/memory.rst:384
+#: c-api/memory.rst:384
msgid "``\"malloc\"``"
msgstr ""
-#: ../Doc/c-api/memory.rst:385
+#: c-api/memory.rst:385
msgid "Debug build, without pymalloc"
msgstr ""
-#: ../Doc/c-api/memory.rst:385
+#: c-api/memory.rst:385
msgid "``\"malloc_debug\"``"
msgstr ""
-#: ../Doc/c-api/memory.rst:388
+#: c-api/memory.rst:388
msgid "Legend:"
msgstr ""
-#: ../Doc/c-api/memory.rst:390
+#: c-api/memory.rst:390
msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable."
msgstr ""
-#: ../Doc/c-api/memory.rst:391
+#: c-api/memory.rst:391
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 ""
-#: ../Doc/c-api/memory.rst:393
+#: c-api/memory.rst:393
msgid "``pymalloc``: :ref:`pymalloc memory allocator `."
msgstr ""
-#: ../Doc/c-api/memory.rst:394
+#: c-api/memory.rst:394
+msgid ""
+"``mimalloc``: :ref:`mimalloc memory allocator `. The pymalloc "
+"allocator will be used if mimalloc support isn't available."
+msgstr ""
+
+#: c-api/memory.rst:396
msgid ""
"\"+ debug\": with :ref:`debug hooks on the Python memory allocators `."
msgstr ""
-#: ../Doc/c-api/memory.rst:396
+#: c-api/memory.rst:398
msgid "\"Debug build\": :ref:`Python build in debug mode `."
msgstr ""
-#: ../Doc/c-api/memory.rst:401
+#: c-api/memory.rst:403
msgid "Customize Memory Allocators"
msgstr ""
-#: ../Doc/c-api/memory.rst:407
+#: c-api/memory.rst:409
msgid ""
"Structure used to describe a memory block allocator. The structure has the "
"following fields:"
msgstr ""
-#: ../Doc/c-api/memory.rst:411 ../Doc/c-api/memory.rst:649
+#: c-api/memory.rst:660
msgid "Field"
msgstr ""
-#: ../Doc/c-api/memory.rst:411 ../Doc/c-api/memory.rst:649
+#: c-api/memory.rst:660
msgid "Meaning"
msgstr ""
-#: ../Doc/c-api/memory.rst:413 ../Doc/c-api/memory.rst:651
+#: c-api/memory.rst:662
msgid "``void *ctx``"
msgstr ""
-#: ../Doc/c-api/memory.rst:413 ../Doc/c-api/memory.rst:651
+#: c-api/memory.rst:662
msgid "user context passed as first argument"
msgstr ""
-#: ../Doc/c-api/memory.rst:415
+#: c-api/memory.rst:417
msgid "``void* malloc(void *ctx, size_t size)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:415
+#: c-api/memory.rst:417
msgid "allocate a memory block"
msgstr ""
-#: ../Doc/c-api/memory.rst:417
+#: c-api/memory.rst:419
msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:417
+#: c-api/memory.rst:419
msgid "allocate a memory block initialized with zeros"
msgstr ""
-#: ../Doc/c-api/memory.rst:420
+#: c-api/memory.rst:422
msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:420
+#: c-api/memory.rst:422
msgid "allocate or resize a memory block"
msgstr ""
-#: ../Doc/c-api/memory.rst:422
+#: c-api/memory.rst:424
msgid "``void free(void *ctx, void *ptr)``"
msgstr ""
-#: ../Doc/c-api/memory.rst:422
+#: c-api/memory.rst:424
msgid "free a memory block"
msgstr ""
-#: ../Doc/c-api/memory.rst:425
+#: c-api/memory.rst:427
msgid ""
-"The :c:type:`PyMemAllocator` structure was renamed to :c:type:"
+"The :c:type:`!PyMemAllocator` structure was renamed to :c:type:"
"`PyMemAllocatorEx` and a new ``calloc`` field was added."
msgstr ""
-#: ../Doc/c-api/memory.rst:432
+#: c-api/memory.rst:434
msgid "Enum used to identify an allocator domain. Domains:"
msgstr ""
-#: ../Doc/c-api/memory.rst:436 ../Doc/c-api/memory.rst:445
-#: ../Doc/c-api/memory.rst:454
+#: c-api/memory.rst:449 c-api/memory.rst:458
msgid "Functions:"
msgstr ""
-#: ../Doc/c-api/memory.rst:438
+#: c-api/memory.rst:442
msgid ":c:func:`PyMem_RawMalloc`"
msgstr ""
-#: ../Doc/c-api/memory.rst:439
+#: c-api/memory.rst:443
msgid ":c:func:`PyMem_RawRealloc`"
msgstr ""
-#: ../Doc/c-api/memory.rst:440
+#: c-api/memory.rst:444
msgid ":c:func:`PyMem_RawCalloc`"
msgstr ""
-#: ../Doc/c-api/memory.rst:441
+#: c-api/memory.rst:445
msgid ":c:func:`PyMem_RawFree`"
msgstr ""
-#: ../Doc/c-api/memory.rst:447
+#: c-api/memory.rst:451
msgid ":c:func:`PyMem_Malloc`,"
msgstr ""
-#: ../Doc/c-api/memory.rst:448
+#: c-api/memory.rst:452
msgid ":c:func:`PyMem_Realloc`"
msgstr ""
-#: ../Doc/c-api/memory.rst:449
+#: c-api/memory.rst:453
msgid ":c:func:`PyMem_Calloc`"
msgstr ""
-#: ../Doc/c-api/memory.rst:450
+#: c-api/memory.rst:454
msgid ":c:func:`PyMem_Free`"
msgstr ""
-#: ../Doc/c-api/memory.rst:456
+#: c-api/memory.rst:460
msgid ":c:func:`PyObject_Malloc`"
msgstr ""
-#: ../Doc/c-api/memory.rst:457
+#: c-api/memory.rst:461
msgid ":c:func:`PyObject_Realloc`"
msgstr ""
-#: ../Doc/c-api/memory.rst:458
+#: c-api/memory.rst:462
msgid ":c:func:`PyObject_Calloc`"
msgstr ""
-#: ../Doc/c-api/memory.rst:459
+#: c-api/memory.rst:463
msgid ":c:func:`PyObject_Free`"
msgstr ""
-#: ../Doc/c-api/memory.rst:463
+#: c-api/memory.rst:467
msgid "Get the memory block allocator of the specified domain."
msgstr ""
-#: ../Doc/c-api/memory.rst:468
+#: c-api/memory.rst:472
msgid "Set the memory block allocator of the specified domain."
msgstr ""
-#: ../Doc/c-api/memory.rst:470
+#: c-api/memory.rst:474
msgid ""
"The new allocator must return a distinct non-``NULL`` pointer when "
"requesting zero bytes."
msgstr ""
-#: ../Doc/c-api/memory.rst:473
+#: c-api/memory.rst:477
msgid ""
-"For the :c:data:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-"
+"For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-"
"safe: the :term:`GIL ` is not held when the "
"allocator is called."
msgstr ""
-#: ../Doc/c-api/memory.rst:477
+#: c-api/memory.rst:481
+msgid ""
+"For the remaining domains, the allocator must also be thread-safe: the "
+"allocator may be called in different interpreters that do not share a "
+"``GIL``."
+msgstr ""
+
+#: c-api/memory.rst:485
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 ""
-#: ../Doc/c-api/memory.rst:481
+#: c-api/memory.rst:489
msgid ""
"See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python "
"with PyPreConfig `."
msgstr ""
-#: ../Doc/c-api/memory.rst:486
+#: c-api/memory.rst:494
msgid ":c:func:`PyMem_SetAllocator` does have the following contract:"
msgstr ""
-#: ../Doc/c-api/memory.rst:488
+#: c-api/memory.rst:496
msgid ""
"It can be called after :c:func:`Py_PreInitialize` and before :c:func:"
"`Py_InitializeFromConfig` to install a custom memory allocator. There are no "
@@ -714,7 +722,7 @@ msgid ""
"domains>` for more information."
msgstr ""
-#: ../Doc/c-api/memory.rst:496
+#: c-api/memory.rst:504
msgid ""
"If called after Python has finish initializing (after :c:func:"
"`Py_InitializeFromConfig` has been called) the allocator **must** wrap the "
@@ -722,17 +730,21 @@ msgid ""
"arbitrary one is **not supported**."
msgstr ""
-#: ../Doc/c-api/memory.rst:505
+#: c-api/memory.rst:509
+msgid "All allocators must be thread-safe."
+msgstr ""
+
+#: c-api/memory.rst:515
msgid ""
"Setup :ref:`debug hooks in the Python memory allocators ` "
"to detect memory errors."
msgstr ""
-#: ../Doc/c-api/memory.rst:512
+#: c-api/memory.rst:522
msgid "Debug hooks on the Python memory allocators"
msgstr ""
-#: ../Doc/c-api/memory.rst:514
+#: c-api/memory.rst:524
msgid ""
"When :ref:`Python is built in debug mode `, the :c:func:"
"`PyMem_SetupDebugHooks` function is called at the :ref:`Python "
@@ -740,19 +752,19 @@ msgid ""
"allocators to detect memory errors."
msgstr ""
-#: ../Doc/c-api/memory.rst:519
+#: c-api/memory.rst:529
msgid ""
"The :envvar:`PYTHONMALLOC` environment variable can be used to install debug "
"hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)."
msgstr ""
-#: ../Doc/c-api/memory.rst:522
+#: c-api/memory.rst:532
msgid ""
"The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks "
"after calling :c:func:`PyMem_SetAllocator`."
msgstr ""
-#: ../Doc/c-api/memory.rst:525
+#: c-api/memory.rst:535
msgid ""
"These debug hooks fill dynamically allocated memory blocks with special, "
"recognizable bit patterns. Newly allocated memory is filled with the byte "
@@ -762,32 +774,33 @@ msgid ""
"these bytes are unlikely to be valid addresses, floats, or ASCII strings."
msgstr ""
-#: ../Doc/c-api/memory.rst:532
+#: c-api/memory.rst:542
msgid "Runtime checks:"
msgstr ""
-#: ../Doc/c-api/memory.rst:534
+#: c-api/memory.rst:544
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 ""
-#: ../Doc/c-api/memory.rst:536
+#: c-api/memory.rst:546
msgid "Detect write before the start of the buffer (buffer underflow)."
msgstr ""
-#: ../Doc/c-api/memory.rst:537
+#: c-api/memory.rst:547
msgid "Detect write after the end of the buffer (buffer overflow)."
msgstr ""
-#: ../Doc/c-api/memory.rst:538
+#: c-api/memory.rst:548
msgid ""
"Check that the :term:`GIL ` is held when allocator "
-"functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and :"
-"c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called."
+"functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) "
+"and :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are "
+"called."
msgstr ""
-#: ../Doc/c-api/memory.rst:543
+#: c-api/memory.rst:553
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 "
@@ -795,7 +808,7 @@ msgid ""
"memory block was traced."
msgstr ""
-#: ../Doc/c-api/memory.rst:548
+#: c-api/memory.rst:558
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 "
@@ -805,49 +818,49 @@ msgid ""
"from a Python slice):"
msgstr ""
-#: ../Doc/c-api/memory.rst:555
+#: c-api/memory.rst:564
msgid "``p[-2*S:-S]``"
msgstr ""
-#: ../Doc/c-api/memory.rst:555
+#: c-api/memory.rst:565
msgid ""
"Number of bytes originally asked for. This is a size_t, big-endian (easier "
"to read in a memory dump)."
msgstr ""
-#: ../Doc/c-api/memory.rst:562
+#: c-api/memory.rst:567
msgid "``p[-S]``"
msgstr ""
-#: ../Doc/c-api/memory.rst:558
+#: c-api/memory.rst:568
msgid "API identifier (ASCII character):"
msgstr ""
-#: ../Doc/c-api/memory.rst:560
-msgid "``'r'`` for :c:data:`PYMEM_DOMAIN_RAW`."
+#: c-api/memory.rst:570
+msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`."
msgstr ""
-#: ../Doc/c-api/memory.rst:561
-msgid "``'m'`` for :c:data:`PYMEM_DOMAIN_MEM`."
+#: c-api/memory.rst:571
+msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`."
msgstr ""
-#: ../Doc/c-api/memory.rst:562
-msgid "``'o'`` for :c:data:`PYMEM_DOMAIN_OBJ`."
+#: c-api/memory.rst:572
+msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`."
msgstr ""
-#: ../Doc/c-api/memory.rst:565
+#: c-api/memory.rst:574
msgid "``p[-S+1:0]``"
msgstr ""
-#: ../Doc/c-api/memory.rst:565
+#: c-api/memory.rst:575
msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads."
msgstr ""
-#: ../Doc/c-api/memory.rst:574
+#: c-api/memory.rst:577
msgid "``p[0:N]``"
msgstr ""
-#: ../Doc/c-api/memory.rst:568
+#: c-api/memory.rst:578
msgid ""
"The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch "
"reference to uninitialized memory. When a realloc-like function is called "
@@ -858,35 +871,35 @@ msgid ""
"bytes are also filled with PYMEM_DEADBYTE."
msgstr ""
-#: ../Doc/c-api/memory.rst:577
+#: c-api/memory.rst:586
msgid "``p[N:N+S]``"
msgstr ""
-#: ../Doc/c-api/memory.rst:577
+#: c-api/memory.rst:587
msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads."
msgstr ""
-#: ../Doc/c-api/memory.rst:588
+#: c-api/memory.rst:589
msgid "``p[N+S:N+2*S]``"
msgstr ""
-#: ../Doc/c-api/memory.rst:580
+#: c-api/memory.rst:590
msgid ""
"Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by "
"default)."
msgstr ""
-#: ../Doc/c-api/memory.rst:583
+#: c-api/memory.rst:593
msgid ""
"A serial number, incremented by 1 on each call to a malloc-like or realloc-"
-"like function. Big-endian ``size_t``. If \"bad memory\" is detected later, "
-"the serial number gives an excellent way to set a breakpoint on the next "
-"run, to capture the instant at which this block was passed out. The static "
-"function bumpserialno() in obmalloc.c is the only place the serial number is "
-"incremented, and exists so you can set such a breakpoint easily."
+"like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected "
+"later, the serial number gives an excellent way to set a breakpoint on the "
+"next run, to capture the instant at which this block was passed out. The "
+"static function bumpserialno() in obmalloc.c is the only place the serial "
+"number is incremented, and exists so you can set such a breakpoint easily."
msgstr ""
-#: ../Doc/c-api/memory.rst:590
+#: c-api/memory.rst:600
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, "
@@ -899,16 +912,16 @@ msgid ""
"getting used)."
msgstr ""
-#: ../Doc/c-api/memory.rst:599
+#: c-api/memory.rst:609
msgid ""
"The :c:func:`PyMem_SetupDebugHooks` function now also works on Python "
"compiled in release mode. On error, the debug hooks now use :mod:"
"`tracemalloc` to get the traceback where a memory block was allocated. The "
-"debug hooks now also check if the GIL is held when functions of :c:data:"
-"`PYMEM_DOMAIN_OBJ` and :c:data:`PYMEM_DOMAIN_MEM` domains are called."
+"debug hooks now also check if the GIL is held when functions of :c:macro:"
+"`PYMEM_DOMAIN_OBJ` and :c:macro:`PYMEM_DOMAIN_MEM` domains are called."
msgstr ""
-#: ../Doc/c-api/memory.rst:607
+#: c-api/memory.rst:617
msgid ""
"Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) "
"and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, "
@@ -916,127 +929,139 @@ msgid ""
"``malloc()`` and ``free()``."
msgstr ""
-#: ../Doc/c-api/memory.rst:617
+#: c-api/memory.rst:627
msgid "The pymalloc allocator"
msgstr ""
-#: ../Doc/c-api/memory.rst:619
+#: c-api/memory.rst:629
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 256 KiB. It falls back to :c:func:"
-"`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations larger than "
-"512 bytes."
+"\"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."
msgstr ""
-#: ../Doc/c-api/memory.rst:624
+#: c-api/memory.rst:635
msgid ""
"*pymalloc* is the :ref:`default allocator