This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients ned.deily, skrah, vstinner, xdegaye, yan12125
Date 2016-07-03.08:40:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The information that the interpreter is an Android built, is needed in issue 16353 [1][2]. In msg266135, the corresponding patch adds the 'is_android' attribute to the already bloated sys module. I had thought then about using sysconfig.get_config_var() as you are suggesting, but this means that the os module would need now to import sysconfig on all linux platforms and build this big dictionary (about 650 entries on linux).

So it seems that the choice is between:
(1) adding an attribute (is_android or android_api) to the bloated sys module
(2) bloating sys.implementation with platform-specific data

I think that (2) would be better since _android_api is an information about the implementation, it tells that in these binaries, such and such features are available or not (issue 26857 for example). The drawback is that it would not be documented except in Misc/NEWS [2].

Do you mean a public attribute of sys.implementation ?
Adding a new sys.implementation required attribute is described in pep 421. In that case the attribute name could be 'libc_version' or 'libc'.

[1] msg175006 suggested another approach though, but this seems to be abandoned.
[2] For completeness, Stefan has submitted a feature request to google in msg266089.
Date User Action Args
2016-07-03 08:40:42xdegayesetrecipients: + xdegaye, vstinner, ned.deily, skrah, yan12125
2016-07-03 08:40:42xdegayesetmessageid: <>
2016-07-03 08:40:42xdegayelinkissue27442 messages
2016-07-03 08:40:41xdegayecreate