Compare commits
10 Commits
d41ec65ab7
...
00a6568ba3
Author | SHA1 | Date |
---|---|---|
pxinwr | 00a6568ba3 | |
pxinwr | 6a273fdc2a | |
pxinwr | a86a274b72 | |
pxinwr | 996a1ef8ae | |
pxinwr | 64c8f81047 | |
Zackery Spytz | 7a240aef15 | |
Andre Delfino | fa840cc81d | |
Andre Delfino | 4b44472966 | |
Soumendra Ganguly | 74311aeb45 | |
pxinwr | aa1b8a168d |
|
@ -861,7 +861,7 @@ All of the following opcodes use their arguments.
|
|||
|
||||
.. opcode:: LIST_TO_TUPLE
|
||||
|
||||
Pops a list from the stack and pushes a tuple containing the same values.
|
||||
Pops a list from the stack and pushes a tuple containing the same values.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
|
@ -889,7 +889,7 @@ All of the following opcodes use their arguments.
|
|||
|
||||
.. opcode:: DICT_MERGE
|
||||
|
||||
Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys.
|
||||
Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
|
@ -907,14 +907,14 @@ All of the following opcodes use their arguments.
|
|||
|
||||
.. opcode:: IS_OP (invert)
|
||||
|
||||
Performs ``is`` comparison, or ``is not`` if ``invert`` is 1.
|
||||
Performs ``is`` comparison, or ``is not`` if ``invert`` is 1.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
|
||||
.. opcode:: CONTAINS_OP (invert)
|
||||
|
||||
Performs ``in`` comparison, or ``not in`` if ``invert`` is 1.
|
||||
Performs ``in`` comparison, or ``not in`` if ``invert`` is 1.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
|
@ -955,8 +955,8 @@ All of the following opcodes use their arguments.
|
|||
|
||||
.. opcode:: JUMP_IF_NOT_EXC_MATCH (target)
|
||||
|
||||
Tests whether the second value on the stack is an exception matching TOS,
|
||||
and jumps if it is not. Pops two values from the stack.
|
||||
Tests whether the second value on the stack is an exception matching TOS,
|
||||
and jumps if it is not. Pops two values from the stack.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
|
|
|
@ -2569,9 +2569,9 @@ Address Formats
|
|||
filesystem.
|
||||
|
||||
* An ``'AF_PIPE'`` address is a string of the form
|
||||
:samp:`r'\\\\.\\pipe\\{PipeName}'`. To use :func:`Client` to connect to a named
|
||||
pipe on a remote computer called *ServerName* one should use an address of the
|
||||
form :samp:`r'\\\\{ServerName}\\pipe\\{PipeName}'` instead.
|
||||
:samp:`r'\\\\.\\pipe\\{PipeName}'`. To use :func:`Client` to connect to a named
|
||||
pipe on a remote computer called *ServerName* one should use an address of the
|
||||
form :samp:`r'\\\\{ServerName}\\pipe\\{PipeName}'` instead.
|
||||
|
||||
Note that any string beginning with two backslashes is assumed by default to be
|
||||
an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.
|
||||
|
|
|
@ -17,6 +17,8 @@ The :mod:`pipes` module defines a class to abstract the concept of a *pipeline*
|
|||
Because the module uses :program:`/bin/sh` command lines, a POSIX or compatible
|
||||
shell for :func:`os.system` and :func:`os.popen` is required.
|
||||
|
||||
.. availability:: Unix. Not available on VxWorks.
|
||||
|
||||
The :mod:`pipes` module defines the following class:
|
||||
|
||||
|
||||
|
|
|
@ -421,7 +421,7 @@ is_jython = sys.platform.startswith('java')
|
|||
|
||||
is_android = hasattr(sys, 'getandroidapilevel')
|
||||
|
||||
if sys.platform != 'win32':
|
||||
if sys.platform not in ('win32', 'vxworks'):
|
||||
unix_shell = '/system/bin/sh' if is_android else '/bin/sh'
|
||||
else:
|
||||
unix_shell = None
|
||||
|
|
|
@ -4,6 +4,7 @@ import copy
|
|||
import test.support
|
||||
from test.support import os_helper
|
||||
import unittest
|
||||
import sys
|
||||
|
||||
# Location of mailcap file
|
||||
MAILCAPFILE = test.support.findfile("mailcap.txt")
|
||||
|
@ -214,6 +215,7 @@ class FindmatchTest(unittest.TestCase):
|
|||
self._run_cases(cases)
|
||||
|
||||
@unittest.skipUnless(os.name == "posix", "Requires 'test' command on system")
|
||||
@unittest.skipIf(sys.platform == "vxworks", "'test' command is not supported on VxWorks")
|
||||
def test_test(self):
|
||||
# findmatch() will automatically check any "test" conditions and skip
|
||||
# the entry if the check fails.
|
||||
|
|
|
@ -116,6 +116,10 @@ class MiscTests(unittest.TestCase):
|
|||
# than MAX_PATH if long paths support is disabled:
|
||||
# see RtlAreLongPathsEnabled().
|
||||
min_len = 2000 # characters
|
||||
# On VxWorks, PATH_MAX is defined as 1024 bytes. Creating a path
|
||||
# longer than PATH_MAX will fail.
|
||||
if sys.platform == 'vxworks':
|
||||
min_len = 1000
|
||||
dirlen = 200 # characters
|
||||
dirname = 'python_test_dir_'
|
||||
dirname = dirname + ('a' * (dirlen - len(dirname)))
|
||||
|
|
|
@ -2219,6 +2219,8 @@ class _BasePathTest(object):
|
|||
self.assertIs((P / 'fileA\x00').is_fifo(), False)
|
||||
|
||||
@unittest.skipUnless(hasattr(os, "mkfifo"), "os.mkfifo() required")
|
||||
@unittest.skipIf(sys.platform == "vxworks",
|
||||
"fifo requires special path on VxWorks")
|
||||
def test_is_fifo_true(self):
|
||||
P = self.cls(BASE, 'myfifo')
|
||||
try:
|
||||
|
|
|
@ -3,13 +3,16 @@ import os
|
|||
import string
|
||||
import unittest
|
||||
import shutil
|
||||
from test.support import run_unittest, reap_children
|
||||
from test.support import run_unittest, reap_children, unix_shell
|
||||
from test.support.os_helper import TESTFN, unlink
|
||||
|
||||
|
||||
if os.name != 'posix':
|
||||
raise unittest.SkipTest('pipes module only works on posix')
|
||||
|
||||
if not (unix_shell and os.path.exists(unix_shell)):
|
||||
raise unittest.SkipTest('pipes module requires a shell')
|
||||
|
||||
TESTFN2 = TESTFN + "2"
|
||||
|
||||
# tr a-z A-Z is not portable, so make the ranges explicit
|
||||
|
|
|
@ -17,7 +17,6 @@ import unittest
|
|||
import struct
|
||||
import tty
|
||||
import fcntl
|
||||
import platform
|
||||
import warnings
|
||||
|
||||
TEST_STRING_1 = b"I wish to buy a fish license.\n"
|
||||
|
@ -82,12 +81,6 @@ def expectedFailureIfStdinIsTTY(fun):
|
|||
pass
|
||||
return fun
|
||||
|
||||
def expectedFailureOnBSD(fun):
|
||||
PLATFORM = platform.system()
|
||||
if PLATFORM.endswith("BSD") or PLATFORM == "Darwin":
|
||||
return unittest.expectedFailure(fun)
|
||||
return fun
|
||||
|
||||
def _get_term_winsz(fd):
|
||||
s = struct.pack("HHHH", 0, 0, 0, 0)
|
||||
return fcntl.ioctl(fd, _TIOCGWINSZ, s)
|
||||
|
@ -314,7 +307,6 @@ class PtyTest(unittest.TestCase):
|
|||
|
||||
os.close(master_fd)
|
||||
|
||||
@expectedFailureOnBSD
|
||||
def test_master_read(self):
|
||||
debug("Calling pty.openpty()")
|
||||
master_fd, slave_fd = pty.openpty()
|
||||
|
@ -324,10 +316,13 @@ class PtyTest(unittest.TestCase):
|
|||
os.close(slave_fd)
|
||||
|
||||
debug("Reading from master_fd")
|
||||
with self.assertRaises(OSError):
|
||||
os.read(master_fd, 1)
|
||||
try:
|
||||
data = os.read(master_fd, 1)
|
||||
except OSError: # Linux
|
||||
data = b""
|
||||
|
||||
os.close(master_fd)
|
||||
self.assertEqual(data, b"")
|
||||
|
||||
class SmallPtyTests(unittest.TestCase):
|
||||
"""These tests don't spawn children or hang."""
|
||||
|
|
|
@ -683,6 +683,8 @@ class TestCopyTree(BaseTest, unittest.TestCase):
|
|||
# Issue #3002: copyfile and copytree block indefinitely on named pipes
|
||||
@unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
|
||||
@os_helper.skip_unless_symlink
|
||||
@unittest.skipIf(sys.platform == "vxworks",
|
||||
"fifo requires special path on VxWorks")
|
||||
def test_copytree_named_pipe(self):
|
||||
os.mkdir(TESTFN)
|
||||
try:
|
||||
|
@ -1206,6 +1208,8 @@ class TestCopy(BaseTest, unittest.TestCase):
|
|||
|
||||
# Issue #3002: copyfile and copytree block indefinitely on named pipes
|
||||
@unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
|
||||
@unittest.skipIf(sys.platform == "vxworks",
|
||||
"fifo requires special path on VxWorks")
|
||||
def test_copyfile_named_pipe(self):
|
||||
try:
|
||||
os.mkfifo(TESTFN)
|
||||
|
|
|
@ -1738,6 +1738,7 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
@unittest.skipUnless(socket_helper.IPV6_ENABLED, 'IPv6 required for this test.')
|
||||
@unittest.skipIf(sys.platform == 'win32', 'does not work on Windows')
|
||||
@unittest.skipIf(AIX, 'Symbolic scope id does not work')
|
||||
@unittest.skipUnless(hasattr(socket, 'if_nameindex'), "test needs socket.if_nameindex()")
|
||||
def test_getaddrinfo_ipv6_scopeid_symbolic(self):
|
||||
# Just pick up any network interface (Linux, Mac OS X)
|
||||
(ifindex, test_interface) = socket.if_nameindex()[0]
|
||||
|
@ -1770,6 +1771,7 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
@unittest.skipUnless(socket_helper.IPV6_ENABLED, 'IPv6 required for this test.')
|
||||
@unittest.skipIf(sys.platform == 'win32', 'does not work on Windows')
|
||||
@unittest.skipIf(AIX, 'Symbolic scope id does not work')
|
||||
@unittest.skipUnless(hasattr(socket, 'if_nameindex'), "test needs socket.if_nameindex()")
|
||||
def test_getnameinfo_ipv6_scopeid_symbolic(self):
|
||||
# Just pick up any network interface.
|
||||
(ifindex, test_interface) = socket.if_nameindex()[0]
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
remove libnet dependency from detect_socket() for VxWorks
|
|
@ -1 +1,2 @@
|
|||
Port _posixshmem extension module to multiphase initialization (:pep:`489`).
|
||||
Port _posixsubprocess extension module to multiphase initialization
|
||||
(:pep:`489`).
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix test_master_read() so that it succeeds on all platforms that either raise OSError or return b"" upon reading from master.
|
|
@ -0,0 +1 @@
|
|||
Fix os module failures for VxWorks RTOS.
|
|
@ -0,0 +1 @@
|
|||
skip some tests related to fifo on VxWorks
|
|
@ -0,0 +1 @@
|
|||
add shell requirement for test_pipes
|
|
@ -0,0 +1 @@
|
|||
skip test_test of test_mailcap on VxWorks
|
|
@ -0,0 +1 @@
|
|||
skip test_getaddrinfo_ipv6_scopeid_symbolic and test_getnameinfo_ipv6_scopeid_symbolic on VxWorks
|
6
setup.py
6
setup.py
|
@ -1132,11 +1132,7 @@ class PyBuildExt(build_ext):
|
|||
def detect_socket(self):
|
||||
# socket(2)
|
||||
kwargs = {'depends': ['socketmodule.h']}
|
||||
if VXWORKS:
|
||||
if not self.compiler.find_library_file(self.lib_dirs, 'net'):
|
||||
return
|
||||
kwargs['libraries'] = ['net']
|
||||
elif MACOS:
|
||||
if MACOS:
|
||||
# Issue #35569: Expose RFC 3542 socket options.
|
||||
kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
|
||||
|
||||
|
|
Loading…
Reference in New Issue