◐ Shell
clean mode source ↗

Message 282211 - Python tracker

> 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 sys.getandroidapilevel().

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 :-)