STINNER Victor added the comment:
> The version > 0 check was done because sysconfig.get_config_var() returns 0
> when a variable is found as '#undef' in pyconfig.h.
Oh right, I see. In this case, we don't need to have a special case in
I pushed getandroidapilevel-3.patch with a change: I added a small unit test.
It checks that level > 0. I hesitated to also check for a maximum, but I'm not
sure that it makes sense.
Xavier: can please double test that sys.getandroidapilevel() works on Android?
If it's the case, we can move on the issue #28596 :-)
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list