summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-09-29 23:40:17 (GMT)
committerGitHub <noreply@github.com>2019-09-29 23:40:17 (GMT)
commitfb4ae152a9930f0e00cae8b2807f534058cf341a (patch)
tree557401018629793ae3de044ca7024384a0e4f3fa /Doc/c-api
parent58498bc7178608b1ab031994ca09c43889ce3e76 (diff)
downloadcpython-fb4ae152a9930f0e00cae8b2807f534058cf341a.zip
cpython-fb4ae152a9930f0e00cae8b2807f534058cf341a.tar.gz
cpython-fb4ae152a9930f0e00cae8b2807f534058cf341a.tar.bz2
bpo-38317: Fix PyConfig.warnoptions priority (GH-16478)
Fix warnings options priority: PyConfig.warnoptions has the highest priority, as stated in the PEP 587. * Document options order in PyConfig.warnoptions documentation. * Make PyWideStringList_INIT macro private: replace "Py" prefix with "_Py". * test_embed: add test_init_warnoptions().
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/init_config.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst
index 58e4174..4c77d5d 100644
--- a/Doc/c-api/init_config.rst
+++ b/Doc/c-api/init_config.rst
@@ -704,7 +704,13 @@ PyConfig
.. c:member:: PyWideStringList warnoptions
- Options of the :mod:`warnings` module to build warnings filters.
+ :data:`sys.warnoptions`: options of the :mod:`warnings` module to build
+ warnings filters: lowest to highest priority.
+
+ 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).
.. c:member:: int write_bytecode