summaryrefslogtreecommitdiff
path: root/dev-python/pexpect
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pexpect')
-rw-r--r--dev-python/pexpect/Manifest3
-rw-r--r--dev-python/pexpect/files/pexpect-4.8.0-py311.patch67
-rw-r--r--dev-python/pexpect/pexpect-4.8.0-r3.ebuild5
3 files changed, 72 insertions, 3 deletions
diff --git a/dev-python/pexpect/Manifest b/dev-python/pexpect/Manifest
index 9f0045f3d564..34313584d433 100644
--- a/dev-python/pexpect/Manifest
+++ b/dev-python/pexpect/Manifest
@@ -1,6 +1,7 @@
AUX pexpect-4.8.0-fix-PS1.patch 662 BLAKE2B 93bf985deee0b14690fe08abbb21be09044e0c7da372a3c0162b5fabbb6a12a9bdb37d67df94c2e3695e8ee4cf1559eaa88b39a3a82d1579fe3044218e9e8ad7 SHA512 91b5897a0dd45bf85854fa89c59cf218d166fa6565384443fdd061819350ea5a6b7fb9c05f686099e2ac3c4dd741a84931e40a81bbf76869a5e55b75443ece5c
+AUX pexpect-4.8.0-py311.patch 2672 BLAKE2B 994d46c09777b972354ce27ce4908f60f02c47c3a173d0b5021d16742e690310036056c5145a96a00561e1f379d08d34d49e4a592c397091a77d94fbcae27642 SHA512 a5b1e07bef7c2aecd82eafe5dd559039b5e5bed3f71fe20b18f0a2a17c47b14ffb2b4e2550ea315df74c12910d5dcda55d78bac812ac45d56bd85523f08921b2
AUX pexpect-4.8.0-sphinx-3.patch 761 BLAKE2B 609849b3587cd5eeada58ba5065111f3d5d38514d525c49682a9554fe5b21c4b5994ad3cc70725c1a73e19daf03c66644a7fa0ac880d87e912620263396df3d9 SHA512 d6cd0c3554c83c0092f46a2254dbe1752773abd76c220e0eeecd4a416f01ec57ecd51f26011e17d03537746d24f913472467d9ac8b569bdc168b6975292b4cab
DIST pexpect-4.8.0.tar.gz 157037 BLAKE2B 742642bd6b9ec3f6cdfad054d4fd22db56b4a55b746d675c27a8cdf824ea749ec4589e296dffa08778195f3ccd20feb56bc0fd5212984396ea5aa0555c41ca96 SHA512 7447ae2d1e13be422c894a8fd51c5aaa788e37ea7f0c798c88b77afd401fb3631400a637077ccbb83c2e3876b0d0c5e1dbd5fdc9d3739d785b4d5ad7c0192580
EBUILD pexpect-4.8.0-r2.ebuild 1182 BLAKE2B fdc67f66d369333f3f8b356c2e16d800311ccc4b38e2a53d5ee850cfee53a78d67cee56a217820e6f5befec113ba7d36c21a49be914325d76a19914c4a1a9854 SHA512 a215279bd237b49cdc12af2c4a7957649fddff7247ab351b302a674288bbfd913a439d953ed2f66efcc51c499d654f816058822d040a2c13cd11f3f0ebb03ae1
-EBUILD pexpect-4.8.0-r3.ebuild 1202 BLAKE2B ebc9a0382a86bc19b67c5124e03db54b3a92b2fd520954a1cde3fa4a0cc8ff096c1c3012ef51e16c574270623defd9ab7c7a83755dec9fd4102004b0919d8b0e SHA512 13b55bcf51f702dcae1620f613e3d5c2d0871f1d0f13566efdf27fa29a2ee6febb7469afd9104f8a91fc9956123073794051887cb1ca18a42e381ee34a50e00b
+EBUILD pexpect-4.8.0-r3.ebuild 1241 BLAKE2B 45b8c4dd77d97dffa617b131f397b7a0bf48838be00e5cd618b60089f5758517b40de5304a6bca92914bf57dfe5a6cd74f225f657fea0caa257706f1b962c5fe SHA512 8831bb701e670e177a37f078bb598502a6f886324a6eb75d4760faaa0de0eedaf766931bfccb4c8525d7139d796e27c29c61b054aba77c885c4169412b66301e
MISC metadata.xml 403 BLAKE2B 0e07f64f32ee9f6776e53f5e59b91e0e22675ebb0e8c8b98eadfb9a46d29af3e7daaafbf4e60fd7fa20bf57d42619ebdf26994b087ed0773a943acd6fddc8ab4 SHA512 4c3e18b98b69213899a6af8366ade2ebfaa4eabef76f880cd71c300b03fc7725246200bc00491942b3f7b4b4f87bdfbc9181663fe5c8b7c5325f1e7c6e76356d
diff --git a/dev-python/pexpect/files/pexpect-4.8.0-py311.patch b/dev-python/pexpect/files/pexpect-4.8.0-py311.patch
new file mode 100644
index 000000000000..b7de17a68785
--- /dev/null
+++ b/dev-python/pexpect/files/pexpect-4.8.0-py311.patch
@@ -0,0 +1,67 @@
+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])
+
diff --git a/dev-python/pexpect/pexpect-4.8.0-r3.ebuild b/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
index 4fbf5faed1a0..67a37a70dcc5 100644
--- a/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
+++ b/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
@@ -19,7 +19,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+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="
@@ -29,6 +29,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${P}-sphinx-3.patch
"${FILESDIR}"/${P}-fix-PS1.patch
+ "${FILESDIR}"/${P}-py311.patch
)
distutils_enable_tests pytest