Message269756
@Ned
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].
@Victor
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:42 | xdegaye | set | recipients:
+ xdegaye, vstinner, ned.deily, skrah, yan12125 |
2016-07-03 08:40:42 | xdegaye | set | messageid: <1467535242.11.0.028803319889.issue27442@psf.upfronthosting.co.za> |
2016-07-03 08:40:42 | xdegaye | link | issue27442 messages |
2016-07-03 08:40:41 | xdegaye | create | |
|