Message208854
Currently Python has non-intuitive behavior such that PYTHONWARNINGS environmental variable has higher priority than -W command line options.
$ python3.4 -c '__import__("warnings").warn("xxx", DeprecationWarning)'
$ python3.4 -Wd -c '__import__("warnings").warn("xxx", DeprecationWarning)'
-c:1: DeprecationWarning: xxx
$ python3.4 -We -c '__import__("warnings").warn("xxx", DeprecationWarning)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
DeprecationWarning: xxx
$ PYTHONWARNINGS="e" python3.4 -Wd -c '__import__("warnings").warn("xxx", DeprecationWarning)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
DeprecationWarning: xxx
$ PYTHONWARNINGS="d" python3.4 -We -c '__import__("warnings").warn("xxx", DeprecationWarning)'
-c:1: DeprecationWarning: xxx
$
I think that settings from -W command line options should have higher priority than PYTHONWARNINGS environmental variable.
(Adding people from issue #7301 to nosy list.) |
|
Date |
User |
Action |
Args |
2014-01-22 21:41:47 | Arfrever | set | recipients:
+ Arfrever, barry, pitrou, pjenvey, eric.araujo, brian.curtin, skrah |
2014-01-22 21:41:46 | Arfrever | set | messageid: <1390426906.93.0.692922610327.issue20355@psf.upfronthosting.co.za> |
2014-01-22 21:41:46 | Arfrever | link | issue20355 messages |
2014-01-22 21:41:46 | Arfrever | create | |
|