[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2018-01-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset dc6b9462c00873c8404a7966b7ca210717718af5 by Victor Stinner in 
branch 'master':
bpo-20361: Remove workaround for a now fixed bug (#5283)
https://github.com/python/cpython/commit/dc6b9462c00873c8404a7966b7ca210717718af5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2018-01-23 Thread STINNER Victor

Change by STINNER Victor :


--
versions: +Python 3.7 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2018-01-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +5129

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

Ok, I merged Nick's PR: -b and -bb options now have the highest priority. I 
close the issue.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 747f48e2e92390c44c72f52a1239959601cde157 by Victor Stinner in 
branch 'master':
bpo-32230: Set sys.warnoptions with -X dev (#4820)
https://github.com/python/cpython/commit/747f48e2e92390c44c72f52a1239959601cde157


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-12 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4711

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-06 Thread Nick Coghlan

Nick Coghlan  added the comment:

The approach I've taken in my PR is similar to the one that Arfrever proposed 
(albeit different in the details due to other changes in the startup code since 
that patch was written).

For the embedding case, I've simply noted in the What's New section of the 
porting guide that embedding applications need to configure a 
`error::BytesWarning` filter explicitly if they want to treat BytesWarning as 
errors (in addition to setting the flag to request that the warnings be emitted 
in the first place).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-06 Thread Nick Coghlan

Change by Nick Coghlan :


--
pull_requests: +4647
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-06 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +ncoghlan, vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2016-10-19 Thread Jon Dufresne

Changes by Jon Dufresne :


--
nosy: +jdufresne

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-06-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: patch review - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-04-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The patch is a bit problematic, because Py_BytesWarningFlag may also be set by 
e.g. an application embedding Python, but then Python's main.c won't be 
executed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-04-03 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy:  -skrah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Final patch should remove a workaround in Tools/scripts/run_tests.py.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-02-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-02-10 Thread Jakub Wilk

Changes by Jakub Wilk jw...@jwilk.net:


--
nosy: +jwilk

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-02-06 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-01-23 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-01-23 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

Currently -W command line options and PYTHONWARNINGS environmental variable 
non-intuitively override settings specified by -b / -bb command line options.

$ python3.4 -c 'print( == b)'
False
$ python3.4 -b -c 'print( == b)'
-c:1: BytesWarning: Comparison between bytes and string
False
$ python3.4 -bb -c 'print( == b)'
Traceback (most recent call last):
  File string, line 1, in module
BytesWarning: Comparison between bytes and string
$ python3.4 -We -b -c 'print( == b)'
Traceback (most recent call last):
  File string, line 1, in module
BytesWarning: Comparison between bytes and string
$ python3.4 -Wd -bb -c 'print( == b)'
-c:1: BytesWarning: Comparison between bytes and string
False
$ python3.4 -Wi -b -c 'print( == b)'
False
$ python3.4 -Wi -bb -c 'print( == b)'
False
$


I suggest to increase priority of -b / -bb command line options.
The attached patch should be applied after patch from issue #20355.

(Test suite of Python triggers some BytesWarnings, so firstly they will have to 
be fixed.)

--
components: Interpreter Core
files: python-bytes_warnings.patch
keywords: patch
messages: 208894
nosy: Arfrever, barry, brett.cannon, brian.curtin, eric.araujo, larry, pitrou, 
pjenvey, skrah
priority: normal
severity: normal
status: open
title: -W command line options and PYTHONWARNINGS environmental variable should 
not override -b / -bb command line options
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33648/python-bytes_warnings.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-01-23 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

By the way, Tools/scripts/run_tests.py (used by 'test' target in Makefile) 
passes '-W default -bb', which currently fails work as intended (i.e. treating 
BytesWarnings as errors).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-01-23 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
dependencies: +BytesWarnings triggerred by test suite

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com