Author Michael.Felt
Recipients Michael.Felt
Date 2019-04-10.15:04:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This is something that probably shouts - boring - but back in 2012 it was a hot topic for linux2 and linux3.

Maybe - as far back as 1996 (when AIX4 was new) "aix3" and "aix4" made sense. Whether that is true, or not - is pointless these days - for Python3.

In the python code I have reviewed - for various reasons - I have never seen any code with "sys.platform() == "aixX" (where X is any of 5, 6, 7).

There was a reference to "aix3" and "aix4" in (recently removed, and there is no replacement for aix5, aix6, or aix7 - not needed!)

What I mostly see is sys.platform.startswith("aix"). The other form of the same test is sys.platform[:3] == 'aix'

sys.platform is "build" related, e.g., potentially bound to libc issues. Even if this was the case (AIX offers since 2007 - official binary compatibility from old to new (when libc is dynamically linked, not static linked), was "unofficial" for aix3 and aix4).

Yes, I am sure there are arguments along the line of "why change" since we have been updating it - always, and/or the documentation says so.

linux2 had to stay, because there was known code that compared with linux2 (and that code was having problems when python was built on linux3 - hence the change to make sys.platform return linux2 for all Python3.2 and younger).

FYI: in Cpython (master) there are no references to "aixX".

All the references there are (in .py) are:

michael@x071:[/data/prj/python/git/cpython-master]find . -name \*.py | xargs egrep "[\"']aix"
./Lib/asyncio/        if is_socket or (is_fifo and not sys.platform.startswith("aix")):
./Lib/ctypes/        if _sys.platform.startswith("aix"):
./Lib/ctypes/ sys.platform.startswith("aix"):
./Lib/ctypes/        elif sys.platform.startswith("aix"):
./Lib/distutils/command/        elif sys.platform[:3] == 'aix':
./Lib/distutils/    elif osname[:3] == "aix":
./Lib/    elif osname[:3] == "aix":
./Lib/test/test_asyncio/    if sys.platform.startswith("aix"):
./Lib/test/    @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/        or sys.platform.startswith(("aix", "sunos", "solaris"))):
./Lib/test/    @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/    @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/    @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/                       not sys.platform.startswith(('sunos', 'aix')):
./Lib/test/test_tools/    @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/        if sys.platform.startswith('aix'):
./Lib/test/ sys.platform.startswith("aix"):
./Lib/test/ = sys.platform[:3] == 'aix'
./Lib/test/        elif sys.platform.startswith("aix"):

I'll write the patch - if I recall it should be a one-liner in, but I think some discussion (or blessing) first is appropriate.

Maybe even review whether other platforms no longer rely on the X for the platform.

Hoping this helps!
Date User Action Args
2019-04-10 15:04:50Michael.Feltsetrecipients: + Michael.Felt
2019-04-10 15:04:50Michael.Feltsetmessageid: <>
2019-04-10 15:04:50Michael.Feltlinkissue36588 messages
2019-04-10 15:04:50Michael.Feltcreate