Skip to content

Commit 81af68e

Browse files
Remove references to platform 'mac'
The 'mac' platform (that is, os.name == 'mac') was used for the MacOS 9 port, which is no longer supported (as of Python 2.4 IIRC).
1 parent 6a0a368 commit 81af68e

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

Lib/os.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
r"""OS routines for Mac, NT, or Posix depending on what system we're on.
22
33
This exports:
4-
- all functions from posix, nt, os2, mac, or ce, e.g. unlink, stat, etc.
5-
- os.path is one of the modules posixpath, ntpath, or macpath
6-
- os.name is 'posix', 'nt', 'os2', 'mac', 'ce' or 'riscos'
4+
- all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
5+
- os.path is one of the modules posixpath, or ntpath
6+
- os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos'
77
- os.curdir is a string representing the current directory ('.' or ':')
88
- os.pardir is a string representing the parent directory ('..' or '::')
99
- os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')
@@ -84,20 +84,6 @@ def _get_exports_list(module):
8484
__all__.extend(_get_exports_list(os2))
8585
del os2
8686

87-
elif 'mac' in _names:
88-
name = 'mac'
89-
linesep = '\r'
90-
from mac import *
91-
try:
92-
from mac import _exit
93-
except ImportError:
94-
pass
95-
import macpath as path
96-
97-
import mac
98-
__all__.extend(_get_exports_list(mac))
99-
del mac
100-
10187
elif 'ce' in _names:
10288
name = 'ce'
10389
linesep = '\r\n'

Lib/tempfile.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
import errno as _errno
3434
from random import Random as _Random
3535

36-
if _os.name == 'mac':
37-
import Carbon.Folder as _Folder
38-
import Carbon.Folders as _Folders
39-
4036
try:
4137
from cStringIO import StringIO as _StringIO
4238
except ImportError:
@@ -153,15 +149,7 @@ def _candidate_tempdir_list():
153149
if dirname: dirlist.append(dirname)
154150

155151
# Failing that, try OS-specific locations.
156-
if _os.name == 'mac':
157-
try:
158-
fsr = _Folder.FSFindFolder(_Folders.kOnSystemDisk,
159-
_Folders.kTemporaryFolderType, 1)
160-
dirname = fsr.as_pathname()
161-
dirlist.append(dirname)
162-
except _Folder.error:
163-
pass
164-
elif _os.name == 'riscos':
152+
if _os.name == 'riscos':
165153
dirname = _os.getenv('Wimp$ScrapDir')
166154
if dirname: dirlist.append(dirname)
167155
elif _os.name == 'nt':

0 commit comments

Comments
 (0)