➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 vstinner
收信人 ncoghlan, vstinner
日期 2017-12-06.11:48:33
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1512560913.5.0.213398074469.issue32230@psf.upfronthosting.co.za>
In-reply-to
内容
I prefer to not talk about sys.warnoptions since, as you wrote, the order is reversed.

IMHO the priority should be (high priority > low priority):

  -W options > PYTHONWARNINGS > BytesWarning > -X dev > default filters

With:

* BytesWarning: "ignore" by default, "default" for -b, "error" for -bb.
* default filters: 4 filters added in release mode

[('ignore', None, <class 'DeprecationWarning'>, None, 0),
 ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0),
 ('ignore', None, <class 'ImportWarning'>, None, 0),
 ('ignore', None, <class 'ResourceWarning'>, None, 0)]

  or 1 filter for pydebug build:

[('default', None, <class 'ResourceWarning'>, None, 0)]


Currently, only "-W options > PYTHONWARNINGS" goes into sys.warnoptions, whereas "BytesWarning > -X dev > default filters" is added by the warnings module ("init_filters()").
历史
日期 用户 动作 参数
2017-12-06 11:48:33vstinner修改recipients: + vstinner, ncoghlan
2017-12-06 11:48:33vstinner修改messageid: <1512560913.5.0.213398074469.issue32230@psf.upfronthosting.co.za>
2017-12-06 11:48:33vstinner链接issue32230 messages
2017-12-06 11:48:33vstinner创建