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 Michael.Felt
Recipients Arfrever, Dima.Tisnek, Michael.Felt, djones, eric.araujo, jaraco, jkloth, madprog, ned.deily, pitrou, sferencik, tarek
Date 2016-10-31.20:09:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There are so many places where there are references to where 32-bit and 64-bit are referred to - and, in particular, the value of os.uname()[4]

For the discussion I went back to 32-bit Python on AIX

Python 2.7.3 (default, Sep 26 2013, 20:43:10) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.platform()
>>> import os
>>> os.uname()[4]
>>> import sys
>>> sys.maxsize

root@x066:~# python
Python 2.7.3 (default, Mar 14 2014, 12:37:29)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.platform()
>>> import os
>>> os.uname()[4]
>>> import sys
>>> sys.maxsize

The data comes from the same hardware - just different OS.

re: os.uname()[4] and platform.platform()
for AIX os.uname()[4] says next to nothing - the only bit relavant to the "machine" are the letters C4 and those are likely to be found on any POWER 32 and 64-bit (no longer have direct access to 32-bit hardware so must trust the documentation on that one) - for AIX platform.platform() does give proper machine and interpreter size.

For Linux (debian in this case) os.uname()[4] identifies the hardware platform, and platform.platform() "looks" 64-bit to me, but sys.maxsize clearly shows this is 32-bit.

I am willing to work on a patch - even digging on the POWER Linux side as well - but to write a patch the desired output is needed.

And, I would suggest replacing the -m output with either -M or -p output:
michael@x071:[/data/prj/python/archive/Python-2.7.3]uname -m -M
00C291F54C00 IBM,8203-E4A
michael@x071:[/data/prj/python/archive/Python-2.7.3]uname -m -p
00C291F54C00 powerpc

Again - what is the preferred output. IMHO - platform.platform() comes very close for what I would be expecting.
AIX (noise) powerpc 32bit 
AIX (noise) powerpc 64bit

Comments? (and has this ever been discussed/specified in a PEP? In another discussion someone mentioned something about a wheel specification - but that refers back to distutils and IMHO this is "core" first, and distutils (should be) following)
Date User Action Args
2016-10-31 20:09:50Michael.Feltsetrecipients: + Michael.Felt, jaraco, pitrou, tarek, jkloth, ned.deily, eric.araujo, Arfrever, madprog, Dima.Tisnek, sferencik, djones
2016-10-31 20:09:49Michael.Feltsetmessageid: <>
2016-10-31 20:09:49Michael.Feltlinkissue18987 messages
2016-10-31 20:09:49Michael.Feltcreate