Message339869
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 setup.py (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/unix_events.py: if is_socket or (is_fifo and not sys.platform.startswith("aix")):
./Lib/ctypes/__init__.py: if _sys.platform.startswith("aix"):
./Lib/ctypes/util.py:elif sys.platform.startswith("aix"):
./Lib/ctypes/util.py: elif sys.platform.startswith("aix"):
./Lib/distutils/command/build_ext.py: elif sys.platform[:3] == 'aix':
./Lib/distutils/util.py: elif osname[:3] == "aix":
./Lib/sysconfig.py: elif osname[:3] == "aix":
./Lib/test/test_asyncio/test_events.py: if sys.platform.startswith("aix"):
./Lib/test/test_faulthandler.py: @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_strftime.py: or sys.platform.startswith(("aix", "sunos", "solaris"))):
./Lib/test/test_strptime.py: @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_locale.py: @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_locale.py: @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_fileio.py: not sys.platform.startswith(('sunos', 'aix')):
./Lib/test/test_tools/test_i18n.py: @unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_wait4.py: if sys.platform.startswith('aix'):
./Lib/test/test_c_locale_coercion.py:elif sys.platform.startswith("aix"):
./Lib/test/test_shutil.py:AIX = sys.platform[:3] == 'aix'
./Lib/test/test_utf8_mode.py: elif sys.platform.startswith("aix"):
I'll write the patch - if I recall it should be a one-liner in configure.ac, 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:50 | Michael.Felt | set | recipients:
+ Michael.Felt |
2019-04-10 15:04:50 | Michael.Felt | set | messageid: <1554908690.57.0.898884397677.issue36588@roundup.psfhosted.org> |
2019-04-10 15:04:50 | Michael.Felt | link | issue36588 messages |
2019-04-10 15:04:50 | Michael.Felt | create | |
|