[issue37406] Disable runtime checks in release mode

2019-07-16 Thread STINNER Victor
STINNER Victor added the comment: I didn't find time to write a proper a rationale for this change, and I will not be available next weeks. So I prefer to close this issue. I may reopen it later once I have a strong rationale :-) In the meanwhile, have a look at the new PyHandle API idea

[issue37406] Disable runtime checks in release mode

2019-07-01 Thread STINNER Victor
STINNER Victor added the comment: FYI I'm finishing an article to explain the problem that I am trying to solve here. Sorry for the delay, I will reply later :-) -- ___ Python tracker

[issue37406] Disable runtime checks in release mode

2019-07-01 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Python's exception mechanism is a much better way to signal and handle such > errors at the application level. I disagree. There is a difference between exceptions which are possible in normal usage of the code and real bugs, which shouldn't ever happen.

[issue37406] Disable runtime checks in release mode

2019-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that the public C API should have runtime checks for its arguments, except performance sensitive functions and macros (like PyTuple_GET_ITEM). The internal C API can use just asserts. I have a work-in-progress patch which adds tests for the public

[issue37406] Disable runtime checks in release mode

2019-06-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Given that extensions call these APIs, I find it highly risky to disable these checks in any version of the Python runtime and am -1 on such a change. Using assert() in C is a pretty bad alternative, since this crashes the whole process. It should really

[issue37406] Disable runtime checks in release mode

2019-06-25 Thread STINNER Victor
New submission from STINNER Victor : A Python debug build is ABI compatible with a Python release build since Python 3.8 on most platforms (except Windows, Cygwin and Android): https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build It should now be way