mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
#16135: Removal of OS/2 support (Remove OS2 and OS/2 references)
This commit is contained in:
parent
080a2c087e
commit
f1af705720
18 changed files with 14 additions and 878 deletions
|
@ -27,7 +27,7 @@ TEST_STR = b"hello world\n"
|
|||
HOST = test.support.HOST
|
||||
|
||||
HAVE_UNIX_SOCKETS = hasattr(socket, "AF_UNIX")
|
||||
HAVE_FORKING = hasattr(os, "fork") and os.name != "os2"
|
||||
HAVE_FORKING = hasattr(os, "fork")
|
||||
|
||||
def signal_alarm(n):
|
||||
"""Call signal.alarm when it exists (i.e. not on Windows)."""
|
||||
|
@ -93,21 +93,7 @@ class SocketServerTest(unittest.TestCase):
|
|||
# XXX: We need a way to tell AF_UNIX to pick its own name
|
||||
# like AF_INET provides port==0.
|
||||
dir = None
|
||||
if os.name == 'os2':
|
||||
dir = '\socket'
|
||||
fn = tempfile.mktemp(prefix='unix_socket.', dir=dir)
|
||||
if os.name == 'os2':
|
||||
# AF_UNIX socket names on OS/2 require a specific prefix
|
||||
# which can't include a drive letter and must also use
|
||||
# backslashes as directory separators
|
||||
if fn[1] == ':':
|
||||
fn = fn[2:]
|
||||
if fn[0] in (os.sep, os.altsep):
|
||||
fn = fn[1:]
|
||||
if os.sep == '/':
|
||||
fn = fn.replace(os.sep, os.altsep)
|
||||
else:
|
||||
fn = fn.replace(os.altsep, os.sep)
|
||||
self.test_files.append(fn)
|
||||
return fn
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue