mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
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().
This commit is contained in:
parent
58498bc717
commit
fb4ae152a9
10 changed files with 185 additions and 51 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue