dev-python/pexpect: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2023-06-27 13:59:10 +02:00
parent c179bc418a
commit 31373f95a2
5 changed files with 0 additions and 159 deletions

View File

@@ -1,2 +1 @@
DIST pexpect-4.8.0.tar.gz 157037 BLAKE2B 742642bd6b9ec3f6cdfad054d4fd22db56b4a55b746d675c27a8cdf824ea749ec4589e296dffa08778195f3ccd20feb56bc0fd5212984396ea5aa0555c41ca96 SHA512 7447ae2d1e13be422c894a8fd51c5aaa788e37ea7f0c798c88b77afd401fb3631400a637077ccbb83c2e3876b0d0c5e1dbd5fdc9d3739d785b4d5ad7c0192580
DIST pexpect-4.8.0_p20230402.gh.tar.gz 169420 BLAKE2B 4780621f5876506c5ad2dbf03656d8c336d5aadef99b1ae99e841b5d0a945ab54177cb04a79b526e422cd4df7393c723000e4a28960bd5f57a5e0173b0a3bc69 SHA512 72cdf226ec5c7d60a10fbcecf81cd1ae422467652e104bb818908bf6d1a4a4bcadab9a06d58475a9609580d973956e18e2ab144ab13a0b700072474ff3087259

View File

@@ -1,16 +0,0 @@
From: whitley-delamora <62795654+whitley-delamora@users.noreply.github.com>
Date: Sat, 28 Mar 2020 13:46:47 +0100
Subject: [PATCH] REPLWrapTestCase.test_bash_env(): export variable PS1
https://github.com/pexpect/pexpect/commit/51c0b09f92f140eda10b62d234710f65ad56dee2
--- a/tests/test_replwrap.py
+++ b/tests/test_replwrap.py
@@ -45,6 +45,7 @@ def test_bash_env(self):
"""env, which displays PS1=..., should not mess up finding the prompt.
"""
bash = replwrap.bash()
+ res = bash.run_command("export PS1")
res = bash.run_command("env")
self.assertIn('PS1', res)
res = bash.run_command("echo $HOME")

View File

@@ -1,67 +0,0 @@
From 52af5b0ae0627139524448a3f2e83d9f40802bc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 24 Mar 2022 15:15:33 +0100
Subject: [PATCH] Convert @asyncio.coroutine to async def
This is required for Python 3.11+ support.
Fixes https://github.com/pexpect/pexpect/issues/677
---
pexpect/_async.py | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/pexpect/_async.py b/pexpect/_async.py
index dfbfeef5..bc83261d 100644
--- a/pexpect/_async.py
+++ b/pexpect/_async.py
@@ -4,8 +4,7 @@
from pexpect import EOF
-@asyncio.coroutine
-def expect_async(expecter, timeout=None):
+async def expect_async(expecter, timeout=None):
# First process data that was previously read - if it maches, we don't need
# async stuff.
idx = expecter.existing_data()
@@ -14,7 +13,7 @@ def expect_async(expecter, timeout=None):
if not expecter.spawn.async_pw_transport:
pw = PatternWaiter()
pw.set_expecter(expecter)
- transport, pw = yield from asyncio.get_event_loop()\
+ transport, pw = await asyncio.get_event_loop()\
.connect_read_pipe(lambda: pw, expecter.spawn)
expecter.spawn.async_pw_transport = pw, transport
else:
@@ -22,26 +21,25 @@ def expect_async(expecter, timeout=None):
pw.set_expecter(expecter)
transport.resume_reading()
try:
- return (yield from asyncio.wait_for(pw.fut, timeout))
+ return (await asyncio.wait_for(pw.fut, timeout))
except asyncio.TimeoutError as e:
transport.pause_reading()
return expecter.timeout(e)
-@asyncio.coroutine
-def repl_run_command_async(repl, cmdlines, timeout=-1):
+async def repl_run_command_async(repl, cmdlines, timeout=-1):
res = []
repl.child.sendline(cmdlines[0])
for line in cmdlines[1:]:
- yield from repl._expect_prompt(timeout=timeout, async_=True)
+ await repl._expect_prompt(timeout=timeout, async_=True)
res.append(repl.child.before)
repl.child.sendline(line)
# Command was fully submitted, now wait for the next prompt
- prompt_idx = yield from repl._expect_prompt(timeout=timeout, async_=True)
+ prompt_idx = await repl._expect_prompt(timeout=timeout, async_=True)
if prompt_idx == 1:
# We got the continuation prompt - command was incomplete
repl.child.kill(signal.SIGINT)
- yield from repl._expect_prompt(timeout=1, async_=True)
+ await repl._expect_prompt(timeout=1, async_=True)
raise ValueError("Continuation prompt found - input was incomplete:")
return u''.join(res + [repl.child.before])

View File

@@ -1,25 +0,0 @@
From 506bcd97fa1d20d1412d399353c38f0ff3546a1a Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Mon, 13 Apr 2020 23:26:09 +0200
Subject: [PATCH] Fix compilation of docs with Sphinx 3.0.1
https://github.com/pexpect/pexpect/issues/637
---
doc/sphinxext/github.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/doc/sphinxext/github.py b/doc/sphinxext/github.py
index 519e146..771dccc 100644
--- a/doc/sphinxext/github.py
+++ b/doc/sphinxext/github.py
@@ -146,7 +146,6 @@ def setup(app):
:param app: Sphinx application context.
"""
- app.info('Initializing GitHub plugin')
app.add_role('ghissue', ghissue_role)
app.add_role('ghpull', ghissue_role)
app.add_role('ghuser', ghuser_role)
--
2.26.0

View File

@@ -1,50 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 pypi
DESCRIPTION="Python module for spawning child apps and responding to expected patterns"
HOMEPAGE="
https://pexpect.readthedocs.io/
https://pypi.org/project/pexpect/
https://github.com/pexpect/pexpect/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
IUSE="examples"
RDEPEND="
>=dev-python/ptyprocess-0.5[${PYTHON_USEDEP}]
"
PATCHES=(
"${FILESDIR}"/${P}-sphinx-3.patch
"${FILESDIR}"/${P}-fix-PS1.patch
"${FILESDIR}"/${P}-py311.patch
)
distutils_enable_tests pytest
distutils_enable_sphinx doc
src_test() {
# workaround new readline defaults
echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
local -x INPUTRC="${T}"/inputrc
distutils-r1_src_test
}
python_install_all() {
if use examples; then
dodoc -r examples
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
}