[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2016-03-25 Thread STINNER Victor
STINNER Victor added the comment: I lost interest in this issue. It really looks like a corner case, so I prefer to keep the current code. I'm not interested to work on the abiflags on Windows. -- resolution: -> out of date status: open -> closed

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2016-01-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Implementing sys.abiflags on Windows looks more general solution, and it doesn't increase the complexity of the stdlib. -- ___ Python tracker

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2016-01-01 Thread STINNER Victor
STINNER Victor added the comment: The consensus was to add a new flag to sys.implementation. -- ___ Python tracker ___

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: If there is consensus about adding this to sys, then the latest patch LGTM (module a couple of unaddressed comments on Rietveld). If not, you should probably bring this up to python-dev. -- ___ Python tracker

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2015-10-01 Thread Berker Peksag
Berker Peksag added the comment: LGTM > Alternative: Add a new sys.implementation.debug_build flag. According to the sys.implementation documentation and PEP 421, we can only add a private attribute without writing a PEP. But I find sys.implementation._debug_build too long and ``from sys

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2015-10-01 Thread STINNER Victor
STINNER Victor added the comment: > I don't like this. The sys module is one of most used module, but it has too > many members, and adding yet one makes the situation worse. Hum, what is the problem of adding a symbol? How does it make the module less usable? > Checking for debug mode is

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2015-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't like this. The sys module is one of most used module, but it has too many members, and adding yet one makes the situation worse. >>> len(dir(sys)) 81 Checking for debug mode is not often needed, and mainly in tests. Current way ``hasattr(sys,

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2015-10-01 Thread STINNER Victor
STINNER Victor added the comment: FYI the sys module has 5 more symbols when CPython is compiled in debug mode: * getobjects() * gettotalrefcount() * last_traceback, last_type, last_value -- ___ Python tracker

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2015-10-01 Thread STINNER Victor
STINNER Victor added the comment: >> You also can check ``'d' in sys.abiflags`` if it looks cleaner to you. > For me, it doesn't look correct to have various ways to check if python was > compiled in debug mode. It doesn't look portable neither. (...) Oops, I didn't notice that sys.abiflags