Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue38317

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:PyConfig (PEP 587): PyConfig.warnoptions should have the highest priority
Type:Stage:resolved
Components:Interpreter CoreVersions:Python 3.9, Python 3.8
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: miss-islington, ncoghlan, vstinner
Priority:normalKeywords:patch

Created on2019-09-29 22:54 byvstinner, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 16478mergedvstinner,2019-09-29 22:59
PR 16479mergedmiss-islington,2019-09-29 23:40
Messages (4)
msg353513 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2019-09-29 22:54
ThePEP 587 says that PyConfig.warnoptions has the highest priority for warnings options:https://www.python.org/dev/peps/pep-0587/#priority-and-rulesBut in the current implementation, PyConfig.warnoptions has... the lowest priority :-(Attached PR not only fix the issue but also add tests to ensure that every ways to set warnings options have the expected priority.Priority of warnings options, lowest to highest:- any implicit filters added by _warnings.c/warnings.py- PyConfig.dev_mode: "default" filter- PYTHONWARNINGS environment variable- '-W' command line options- PyConfig.bytes_warning ('-b', '-bb'): "default::BytesWarning"  or "error::BytesWarning" filter- early PySys_AddWarnOption() calls- PyConfig.warnoptions
msg353514 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2019-09-29 23:40
New changesetfb4ae152a9930f0e00cae8b2807f534058cf341a by Victor Stinner in branch 'master':bpo-38317: Fix PyConfig.warnoptions priority (GH-16478)https://github.com/python/cpython/commit/fb4ae152a9930f0e00cae8b2807f534058cf341a
msg353516 -(view)Author: miss-islington (miss-islington)Date: 2019-09-29 23:59
New changesetc9ed9e6fc76323ed537fb79d4232bcd27d82c57e by Miss Islington (bot) in branch '3.8':bpo-38317: Fix PyConfig.warnoptions priority (GH-16478)https://github.com/python/cpython/commit/c9ed9e6fc76323ed537fb79d4232bcd27d82c57e
msg353518 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2019-09-30 00:29
Oh, the documentation in thePEP 587 was also wrong. I updated it:https://github.com/python/peps/commit/16bc2821eeb09b4692c372a5a359fd28993cd29bThe "warnings options priority" is currently not documented at:https://docs.python.org/dev/c-api/init_config.htmlThe latest major change wasbpo-20361 when -b command line option changed to get the highest priority (-b > -W).cc Nick Coghlan
History
DateUserActionArgs
2022-04-11 14:59:21adminsetgithub: 82498
2019-09-30 00:29:52vstinnersetstatus: open -> closed

nosy: +ncoghlan
messages: +msg353518

resolution: fixed
stage: patch review -> resolved
2019-09-29 23:59:00miss-islingtonsetnosy: +miss-islington
messages: +msg353516
2019-09-29 23:40:38miss-islingtonsetpull_requests: +pull_request16064
2019-09-29 23:40:21vstinnersetmessages: +msg353514
2019-09-29 22:59:04vstinnersetkeywords: +patch
stage: patch review
pull_requests: +pull_request16063
2019-09-29 22:54:37vstinnercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp