[Python-checkins] fixes bpo-31866: remove code pertaining to AtheOS support (#4115)

Benjamin Peterson webhook-mailer at python.org
Thu Oct 26 02:55:16 EDT 2017


https://github.com/python/cpython/commit/4eaf7f949069882e385f2297c9e70031caf9144c
commit: 4eaf7f949069882e385f2297c9e70031caf9144c
branch: master
author: Benjamin Peterson <benjamin at python.org>
committer: GitHub <noreply at github.com>
date: 2017-10-25T23:55:14-07:00
summary:

fixes bpo-31866: remove code pertaining to AtheOS support (#4115)

We stop support this OS in 2007 with commit
19fab761b71a1687aee3415db3a937b5ce31975d. Let's finish.

files:
A Misc/NEWS.d/next/Build/2017-10-24-23-21-13.bpo-31866.MkNO66.rst
M Lib/distutils/command/build_ext.py
M Lib/test/test_os.py
M Modules/_cryptmodule.c

diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 74445655621..8fad9cdc2b4 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -215,9 +215,9 @@ def finalize_options(self):
                 new_lib = os.path.join(new_lib, suffix)
             self.library_dirs.append(new_lib)
 
-        # for extensions under Cygwin and AtheOS Python's library directory must be
+        # For extensions under Cygwin, Python's library directory must be
         # appended to library_dirs
-        if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos':
+        if sys.platform[:6] == 'cygwin':
             if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
                 # building third party extensions
                 self.library_dirs.append(os.path.join(sys.prefix, "lib",
@@ -715,22 +715,6 @@ def get_libraries(self, ext):
                 return ext.libraries + [pythonlib]
             else:
                 return ext.libraries
-        elif sys.platform[:6] == "atheos":
-            from distutils import sysconfig
-
-            template = "python%d.%d"
-            pythonlib = (template %
-                   (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
-            # Get SHLIBS from Makefile
-            extra = []
-            for lib in sysconfig.get_config_var('SHLIBS').split():
-                if lib.startswith('-l'):
-                    extra.append(lib[2:])
-                else:
-                    extra.append(lib)
-            # don't extend ext.libraries, it may be shared with other
-            # extensions, it is a reference to the original list
-            return ext.libraries + [pythonlib, "m"] + extra
         elif sys.platform == 'darwin':
             # Don't use the default code below
             return ext.libraries
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 18edbcda652..eb73af51ac8 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -341,12 +341,7 @@ def test_stat_result_pickle(self):
 
     @unittest.skipUnless(hasattr(os, 'statvfs'), 'test needs os.statvfs()')
     def test_statvfs_attributes(self):
-        try:
-            result = os.statvfs(self.fname)
-        except OSError as e:
-            # On AtheOS, glibc always returns ENOSYS
-            if e.errno == errno.ENOSYS:
-                self.skipTest('os.statvfs() failed with ENOSYS')
+        result = os.statvfs(self.fname)
 
         # Make sure direct access works
         self.assertEqual(result.f_bfree, result[3])
@@ -386,12 +381,7 @@ def test_statvfs_attributes(self):
     @unittest.skipUnless(hasattr(os, 'statvfs'),
                          "need os.statvfs()")
     def test_statvfs_result_pickle(self):
-        try:
-            result = os.statvfs(self.fname)
-        except OSError as e:
-            # On AtheOS, glibc always returns ENOSYS
-            if e.errno == errno.ENOSYS:
-                self.skipTest('os.statvfs() failed with ENOSYS')
+        result = os.statvfs(self.fname)
 
         for proto in range(pickle.HIGHEST_PROTOCOL + 1):
             p = pickle.dumps(result, proto)
diff --git a/Misc/NEWS.d/next/Build/2017-10-24-23-21-13.bpo-31866.MkNO66.rst b/Misc/NEWS.d/next/Build/2017-10-24-23-21-13.bpo-31866.MkNO66.rst
new file mode 100644
index 00000000000..bc99382a418
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2017-10-24-23-21-13.bpo-31866.MkNO66.rst
@@ -0,0 +1 @@
+Finish removing support for AtheOS.
diff --git a/Modules/_cryptmodule.c b/Modules/_cryptmodule.c
index 8e4737c7b44..58d179e6a3d 100644
--- a/Modules/_cryptmodule.c
+++ b/Modules/_cryptmodule.c
@@ -34,8 +34,6 @@ static PyObject *
 crypt_crypt_impl(PyObject *module, const char *word, const char *salt)
 /*[clinic end generated code: output=0512284a03d2803c input=0e8edec9c364352b]*/
 {
-    /* On some platforms (AtheOS) crypt returns NULL for an invalid
-       salt. Return None in that case. XXX Maybe raise an exception?  */
     return Py_BuildValue("s", crypt(word, salt));
 }
 



More information about the Python-checkins mailing list