misc/py-pexpect: Update to 4.9.0
- Update WWW Changes: https://github.com/pexpect/pexpect/releases https://pexpect.readthedocs.io/en/stable/history.html
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
PORTNAME= pexpect
|
||||
PORTVERSION= 4.8.0
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 4.9.0
|
||||
CATEGORIES= misc python
|
||||
MASTER_SITES= PYPI
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= sunpoet@FreeBSD.org
|
||||
COMMENT= Python module for controlling interactive programs in pseudo-terminal
|
||||
WWW= https://pexpect.readthedocs.io/
|
||||
WWW= https://pexpect.readthedocs.io/en/stable/ \
|
||||
https://github.com/pexpect/pexpect
|
||||
|
||||
LICENSE= ISCL
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1579684146
|
||||
SHA256 (pexpect-4.8.0.tar.gz) = fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c
|
||||
SIZE (pexpect-4.8.0.tar.gz) = 157037
|
||||
TIMESTAMP = 1701083398
|
||||
SHA256 (pexpect-4.9.0.tar.gz) = ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f
|
||||
SIZE (pexpect-4.9.0.tar.gz) = 166450
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
--- pexpect/bashrc.sh.orig 2020-01-17 17:08:15 UTC
|
||||
+++ pexpect/bashrc.sh
|
||||
@@ -14,3 +14,5 @@ PS1="$"
|
||||
|
||||
# Unset PROMPT_COMMAND, so that it can't change PS1 to something unexpected.
|
||||
unset PROMPT_COMMAND
|
||||
+
|
||||
+bind 'set enable-bracketed-paste off'
|
||||
@@ -1,11 +0,0 @@
|
||||
--- tests/PexpectTestCase.py.orig 2020-01-17 17:08:15 UTC
|
||||
+++ tests/PexpectTestCase.py
|
||||
@@ -97,7 +97,7 @@ class PexpectTestCase(unittest.TestCase):
|
||||
raise AssertionError("%s was not raised" % excClass)
|
||||
|
||||
@contextlib.contextmanager
|
||||
- def assertRaisesRegexp(self, excClass, pattern):
|
||||
+ def assertRaisesRegex(self, excClass, pattern):
|
||||
import re
|
||||
try:
|
||||
yield
|
||||
@@ -1,47 +0,0 @@
|
||||
--- tests/test_expect.py.orig 2021-09-22 12:21:58 UTC
|
||||
+++ tests/test_expect.py
|
||||
@@ -411,7 +411,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
|
||||
def test_before_across_chunks(self):
|
||||
# https://github.com/pexpect/pexpect/issues/478
|
||||
child = pexpect.spawn(
|
||||
- '''/bin/bash -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2),
|
||||
+ '''/bin/sh -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl -n rz -w 5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2),
|
||||
searchwindowsize=128
|
||||
)
|
||||
child.expect(['PATTERN'])
|
||||
@@ -456,7 +456,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
|
||||
child = pexpect.spawn('cat', echo=False)
|
||||
child.sendline('BEGIN')
|
||||
for i in range(100):
|
||||
- child.sendline('foo' * 100)
|
||||
+ child.sendline('foo' * 10)
|
||||
e = child.expect([b'xyzzy', pexpect.TIMEOUT],
|
||||
searchwindowsize=10, timeout=0.001)
|
||||
self.assertEqual(e, 1)
|
||||
@@ -473,7 +473,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
|
||||
child = pexpect.spawn('cat', echo=False)
|
||||
child.sendline('BEGIN')
|
||||
for i in range(100):
|
||||
- child.sendline('foo' * 100)
|
||||
+ child.sendline('foo' * 10)
|
||||
e = child.expect([b'xyzzy', pexpect.TIMEOUT],
|
||||
searchwindowsize=10, timeout=0.5)
|
||||
self.assertEqual(e, 1)
|
||||
@@ -569,13 +569,13 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase)
|
||||
|
||||
def test_bad_arg(self):
|
||||
p = pexpect.spawn('cat')
|
||||
- with self.assertRaisesRegexp(TypeError, '.*must be one of'):
|
||||
+ with self.assertRaisesRegex(TypeError, '.*must be one of'):
|
||||
p.expect(1)
|
||||
- with self.assertRaisesRegexp(TypeError, '.*must be one of'):
|
||||
+ with self.assertRaisesRegex(TypeError, '.*must be one of'):
|
||||
p.expect([1, b'2'])
|
||||
- with self.assertRaisesRegexp(TypeError, '.*must be one of'):
|
||||
+ with self.assertRaisesRegex(TypeError, '.*must be one of'):
|
||||
p.expect_exact(1)
|
||||
- with self.assertRaisesRegexp(TypeError, '.*must be one of'):
|
||||
+ with self.assertRaisesRegex(TypeError, '.*must be one of'):
|
||||
p.expect_exact([1, b'2'])
|
||||
|
||||
def test_timeout_none(self):
|
||||
@@ -1,20 +0,0 @@
|
||||
--- tests/test_misc.py.orig 2020-01-17 17:08:15 UTC
|
||||
+++ tests/test_misc.py
|
||||
@@ -214,7 +214,7 @@ class TestCaseMisc(PexpectTestCase.PexpectTestCase):
|
||||
# Force an invalid state to test isalive
|
||||
child.ptyproc.terminated = 0
|
||||
try:
|
||||
- with self.assertRaisesRegexp(pexpect.ExceptionPexpect,
|
||||
+ with self.assertRaisesRegex(pexpect.ExceptionPexpect,
|
||||
".*" + expect_errmsg):
|
||||
child.isalive()
|
||||
finally:
|
||||
@@ -224,7 +224,7 @@ class TestCaseMisc(PexpectTestCase.PexpectTestCase):
|
||||
def test_bad_arguments_suggest_fdpsawn(self):
|
||||
" assert custom exception for spawn(int). "
|
||||
expect_errmsg = "maybe you want to use fdpexpect.fdspawn"
|
||||
- with self.assertRaisesRegexp(pexpect.ExceptionPexpect,
|
||||
+ with self.assertRaisesRegex(pexpect.ExceptionPexpect,
|
||||
".*" + expect_errmsg):
|
||||
pexpect.spawn(1)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
--- tests/test_popen_spawn.py.orig 2020-01-17 17:08:15 UTC
|
||||
+++ tests/test_popen_spawn.py
|
||||
@@ -110,13 +110,13 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase)
|
||||
|
||||
def test_bad_arg(self):
|
||||
p = PopenSpawn('cat')
|
||||
- with self.assertRaisesRegexp(TypeError, '.*must be one of'):
|
||||
+ with self.assertRaisesRegex(TypeError, '.*must be one of'):
|
||||
p.expect(1)
|
||||
- with self.assertRaisesRegexp(TypeError, '.*must be one of'):
|
||||
+ with self.assertRaisesRegex(TypeError, '.*must be one of'):
|
||||
p.expect([1, b'2'])
|
||||
- with self.assertRaisesRegexp(TypeError, '.*must be one of'):
|
||||
+ with self.assertRaisesRegex(TypeError, '.*must be one of'):
|
||||
p.expect_exact(1)
|
||||
- with self.assertRaisesRegexp(TypeError, '.*must be one of'):
|
||||
+ with self.assertRaisesRegex(TypeError, '.*must be one of'):
|
||||
p.expect_exact([1, b'2'])
|
||||
|
||||
def test_timeout_none(self):
|
||||
@@ -1,11 +0,0 @@
|
||||
--- tests/test_replwrap.py.orig 2021-09-22 14:15:55 UTC
|
||||
+++ tests/test_replwrap.py
|
||||
@@ -24,7 +24,7 @@ class REPLWrapTestCase(unittest.TestCase):
|
||||
|
||||
def test_bash(self):
|
||||
bash = replwrap.bash()
|
||||
- res = bash.run_command("alias")
|
||||
+ res = bash.run_command("alias xyzzy=true; alias")
|
||||
assert 'alias' in res, res
|
||||
|
||||
try:
|
||||
Reference in New Issue
Block a user