]> granicus.if.org Git - python/commitdiff
bpo-35346: Drop Mac OS 9 support from platform (GH-10959)
authorVictor Stinner <vstinner@redhat.com>
Wed, 12 Dec 2018 16:48:08 +0000 (17:48 +0100)
committerGitHub <noreply@github.com>
Wed, 12 Dec 2018 16:48:08 +0000 (17:48 +0100)
Drop Mac OS 9 and Rhapsody support from the platform module:

* Rhapsody: last release in 2000
* Mac OS 9: last release in 2001

Lib/platform.py
Misc/NEWS.d/next/Library/2018-12-05-22-52-21.bpo-35346.Okm9-S.rst [new file with mode: 0644]

index 5f9491819169d47dd348cfc4c7a11d1cd6f572cb..ab0cf254bc69cf018df04dd5684c35c4ba45ee0a 100755 (executable)
@@ -406,7 +406,7 @@ def _mac_ver_xml():
 
 def mac_ver(release='', versioninfo=('', '', ''), machine=''):
 
-    """ Get MacOS version information and return it as tuple (release,
+    """ Get macOS version information and return it as tuple (release,
         versioninfo, machine) with versioninfo being a tuple (version,
         dev_stage, non_release_version).
 
@@ -478,12 +478,7 @@ def system_alias(system, release, version):
         where it would otherwise cause confusion.
 
     """
-    if system == 'Rhapsody':
-        # Apple's BSD derivative
-        # XXX How can we determine the marketing release number ?
-        return 'MacOS X Server', system+release, version
-
-    elif system == 'SunOS':
+    if system == 'SunOS':
         # Sun's OS
         if release < '5':
             # These releases use the old name SunOS
@@ -1166,7 +1161,6 @@ def platform(aliased=0, terse=0):
         # macOS (darwin kernel)
         macos_release = mac_ver()[0]
         if macos_release:
-            # note: 'macOS' is different than 'MacOS' used below
             system = 'macOS'
             release = macos_release
 
@@ -1194,13 +1188,6 @@ def platform(aliased=0, terse=0):
                                  'on',
                                  os_name, os_version, os_arch)
 
-    elif system == 'MacOS':
-        # MacOS platforms
-        if terse:
-            platform = _platform(system, release)
-        else:
-            platform = _platform(system, release, machine)
-
     else:
         # Generic handler
         if terse:
diff --git a/Misc/NEWS.d/next/Library/2018-12-05-22-52-21.bpo-35346.Okm9-S.rst b/Misc/NEWS.d/next/Library/2018-12-05-22-52-21.bpo-35346.Okm9-S.rst
new file mode 100644 (file)
index 0000000..047a1c8
--- /dev/null
@@ -0,0 +1,2 @@
+Drop Mac OS 9 and Rhapsody support from the :mod:`platform` module. Rhapsody
+last release was in 2000. Mac OS 9 last release was in 2001.